This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Crashes when removing and adding annotations on regionDidChangeAnimated #2681
Copy link
Copy link
Closed
Labels
Description
Activity
@Zakay Would you mind posting the crash log here, as well? Thanks.
Looks like
SymbolBucket::needsDependenciesis being passed a bogus string.Thread 18 name: Worker Thread 18 Crashed: 0 Mapbox GL std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > mbgl::util::replaceTokens<mbgl::SymbolBucket::needsDependencies(mbgl::GeometryTileLayer const&, mapbox::util::variant<mbgl::NullExpression, mbgl::EqualsExpression, mbgl::NotEqualsExpression, mbgl::LessThanExpression, mbgl::LessThanEqualsExpression, mbgl::GreaterThanExpression, mbgl::GreaterThanEqualsExpression, mbgl::InExpression, mbgl::NotInExpression, mbgl::AnyExpression, mbgl::AllExpression, mbgl::NoneExpression> const&, mbgl::GlyphStore&, mbgl::Sprite&)::$_0>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, mbgl::SymbolBucket::needsDependencies(mbgl::GeometryTileLayer const&, mapbox::util::variant<mbgl::NullExpression, mbgl::EqualsExpression, mbgl::NotEqualsExpression, mbgl::LessThanExpression, mbgl::LessThanEqualsExpression, mbgl::GreaterThanExpression, mbgl::GreaterThanEqualsExpression, mbgl::InExpression, mbgl::NotInExpression, mbgl::AnyExpression, mbgl::AllExpression, mbgl::NoneExpression> const&, mbgl::GlyphStore&, mbgl::Sprite&)::$_0 const&) (symbol_bucket.cpp:117) 1 Mapbox GL std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > mbgl::util::replaceTokens<mbgl::SymbolBucket::needsDependencies(mbgl::GeometryTileLayer const&, mapbox::util::variant<mbgl::NullExpression, mbgl::EqualsExpression, mbgl::NotEqualsExpression, mbgl::LessThanExpression, mbgl::LessThanEqualsExpression, mbgl::GreaterThanExpression, mbgl::GreaterThanEqualsExpression, mbgl::InExpression, mbgl::NotInExpression, mbgl::AnyExpression, mbgl::AllExpression, mbgl::NoneExpression> const&, mbgl::GlyphStore&, mbgl::Sprite&)::$_0>(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, mbgl::SymbolBucket::needsDependencies(mbgl::GeometryTileLayer const&, mapbox::util::variant<mbgl::NullExpression, mbgl::EqualsExpression, mbgl::NotEqualsExpression, mbgl::LessThanExpression, mbgl::LessThanEqualsExpression, mbgl::GreaterThanExpression, mbgl::GreaterThanEqualsExpression, mbgl::InExpression, mbgl::NotInExpression, mbgl::AnyExpression, mbgl::AllExpression, mbgl::NoneExpression> const&, mbgl::GlyphStore&, mbgl::Sprite&)::$_0 const&) (token.hpp:27) 2 Mapbox GL mbgl::SymbolBucket::needsDependencies(mbgl::GeometryTileLayer const&, mapbox::util::variant<mbgl::NullExpression, mbgl::EqualsExpression, mbgl::NotEqualsExpression, mbgl::LessThanExpression, mbgl::LessThanEqualsExpression, mbgl::GreaterThanExpression, mbgl::GreaterThanEqualsExpression, mbgl::InExpression, mbgl::NotInExpression, mbgl::AnyExpression, mbgl::AllExpression, mbgl::NoneExpression> const&, mbgl::GlyphStore&, mbgl::Sprite&) (string:2438) 3 Mapbox GL mbgl::TileWorker::createSymbolBucket(mbgl::GeometryTileLayer const&, mbgl::StyleBucket const&) (tile_worker.cpp:266) 4 Mapbox GL mbgl::TileWorker::parseLayer(mbgl::StyleLayer const&, mbgl::GeometryTile const&) (tile_worker.cpp:151) 5 Mapbox GL mbgl::TileWorker::parse(mbgl::GeometryTile const&) (vector:1468) 6 Mapbox GL mbgl::Worker::Impl::parseLiveTile(mbgl::TileWorker*, mbgl::LiveTile const*, std::__1::function<void (mapbox::util::variant<mbgl::TileData::State, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >)>) (functional:1790)/cc @jfirebaugh
Has something been updated these last couple of days in the underlying code for this issue? I just merged from upstream, and I still haven't been able to reproduce the bug which I was able to 100% of the times before. I'm going to keep on testing, if I'm not able to reproduce it by the end of the day, then this issue can be closed.
This may have been addressed incidentally by #2617.
Yes, this is now fixed since #2617
Purpose of adding/removing annotations on regionDidChange is very clear, user pans the map and we update the result set for that region.
With a simple test, I can reproduce a crash every time.
Patch included, repositions the map on viewDidLoad, and then on regionDidChange is removes all annotations and re-adds a random amount of annotations.
Steps to reproduce:
(Ignore that some annotations aren't visible after switching layers, there is already a issue reported on this matter, in our own fork we've solved this issue temporarily)