mapbox/tilelive-s3

C++ Objects clash with node-blend objects

springmeyer opened this issue · 0 comments

The C++ bits in tilelive-s3 to decode images were ported from node-blend. And they have the same names, so it appears that it is very easy to have the objects clash in memory and cause crashes like:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   blend.node                      0x0000000100f9ac06 std::tr1::_Sp_counted_base_impl<Image*, std::tr1::_Sp_deleter<Image>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() + 22 (memory:258)
1   decoder.node                    0x0000000100fe792f DecodeBaton::~DecodeBaton() + 223 (atomicity.h:51)
2   decoder.node                    0x0000000100fe7191 Work_AfterDecode(uv_work_s*) + 577 (decode.cpp:133)
3   node                            0x000000010004c936 uv__after_work + 36
4   node                            0x0000000100044b54 eio_finish + 37
5   node                            0x0000000100042edc eio_poll + 149
6   node                            0x0000000100051ecf uv_eio_want_poll_notifier_cb + 29
7   node                            0x0000000100041eed uv__async_io + 160
8   node                            0x0000000100047834 ev_invoke_pending + 67
9   node                            0x00000001000421d1 uv__run + 193
10  node                            0x0000000100042103 uv_run + 17
11  node                            0x000000010000862b node::Start(int, char**) + 407 (node.cc:2972)
12  node                            0x0000000100000df4 start + 52