maplibre / maplibre-native

MapLibre Native - Interactive vector tile maps for iOS, Android and other platforms.
https://maplibre.org
BSD 2-Clause "Simplified" License
1.09k stars 322 forks source link

Crash in GeometryTileWorker #2661

Open agurbovich-lyft opened 4 months ago

agurbovich-lyft commented 4 months ago

Describe the bug We are getting a new error upon rolling out metal.

SIGABRT: 

0  libsystem_kernel.dylib +0x6bbc  ___pthread_kill
1  libsystem_pthread.dylib +0xd840 _pthread_kill
2  libsystem_c.dylib +0x1f6a8      _abort
3  libsystem_malloc.dylib +0x1b9d4 _malloc_vreport
4  libsystem_malloc.dylib +0x1bb84 _malloc_report
5  libsystem_malloc.dylib +0x1cfc  _free
6  App +0x627c7c4                  void std::__1::__libcpp_operator_delete[abi:ue170006]<void*>(void*) (new:308:3)
7  App +0x645d648                  mbgl::GeometryTileWorker::finalizeLayout() (geometry_tile_worker.cpp:481:21)
8  App +0x645d840                  mbgl::GeometryTileWorker::coalesced() (geometry_tile_worker.cpp:267:43)
9  App +0x6219428                  mbgl::Mailbox::receive() (mailbox.cpp:128:5)
10 App +0x621a328                  std::__1::__function::__func<mbgl::Mailbox::makeClosure(std::__1::weak_ptr<mbgl::Mailbox>)::$_2, std::__1::allocator<mbgl::Mailbox::makeClosure(std::__1::weak_ptr<mbgl::Mailbox>)::$_2>, void ()>::operator()() (mailbox.cpp:143:17)
11 App +0x6490fac                  void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadedSchedulerBase::makeSchedulerThread(unsigned long)::$_0> >(void*) (function.h:518:16)
12 libsystem_pthread.dylib +0x3334 __pthread_start
SIGABRT: 

0  libsystem_kernel.dylib +0xc42c  ___pthread_kill
1  libsystem_pthread.dylib +0x7c08 _pthread_kill
2  libsystem_c.dylib +0x75b9c      _abort
3  libsystem_malloc.dylib +0x9584  _malloc_vreport
4  libsystem_malloc.dylib +0x91f4  _malloc_report
5  libsystem_malloc.dylib +0x87ac  _find_zone_and_free
6  App +0x62d7534                  void std::__1::__libcpp_operator_delete[abi:ue170006]<void*>(void*) (new:308:3)
7  App +0x62dac90                  mbgl::SymbolLayout::~SymbolLayout() (allocator.h:172:15)
8  App +0x62d0024                  mbgl::SymbolLayout::~SymbolLayout() (symbol_layout.hpp:33:35)
9  App +0x64aade4                  mbgl::GeometryTileWorker::~GeometryTileWorker() (unique_ptr.h:68:5)
10 App +0x6485cd8                  mbgl::EstablishedActor<mbgl::GeometryTileWorker>::~EstablishedActor() (established_actor.hpp:55:26)
11 App +0x64b746c                  mbgl::VectorTile::~VectorTile() (vector_tile.cpp:20:1)
12 App +0x64b6c38                  std::__1::__function::__func<mbgl::TileCache::deferredRelease(std::__1::unique_ptr<mbgl::Tile, std::__1::default_delete<mbgl::Tile> >&&)::$_0, std::__1::allocator<mbgl::TileCache::deferredRelease(std::__1::unique_ptr<mbgl::Tile, std::__1::default_delete<mbgl::Tile> >&&)::$_0>, void ()>::destroy_deallocate() (shared_ptr.h:173:9)
13 App +0x64dfe68                  void* std::__1::__thread_proxy[abi:ue170006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, mbgl::ThreadedSchedulerBase::makeSchedulerThread(unsigned long)::$_0> >(void*) (function.h)
14 libsystem_pthread.dylib +0x6068 __pthread_start

To Reproduce Currently, unsure about repro steps

Platform information (please complete the following information):

Additional context It appears to be happening across all versions of ios and models.

cc @bsudekum

agurbovich-lyft commented 4 months ago

Could it be related to the recent update (https://github.com/maplibre/maplibre-native/pull/2443)?

louwers commented 4 months ago

@agurbovich-lyft Thanks for the report. Are you using raster tiles?

bsudekum commented 4 months ago

@louwers we do add raster layers via MLNRasterStyleLayer. The style at run time does not contain raster sources.

bsudekum commented 4 months ago

@TimSylvester do you think this could be related to https://github.com/maplibre/maplibre-native/pull/2443?

TimSylvester commented 4 months ago

I don't see how, but I can't rule it out.

sjg-wdw commented 3 months ago

Any thoughts on reproducing this? It came up during our meeting.