-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Segfault clustering an empty feature collection — KDBush::select<>() #7622
Comments
In addition, and separate to the crash above, I am also getting the same exact crash signature when later appending shapes. It's hard to reproduce, it will work fine ~15 times then crash. This is a critical issue for my app.
I see nothing wrong with the JSON I'm appending, remember it worked many times prior.
crash2:
|
@nitrag, any chance you could include a symbolicated crash trace instead of a disassembly? That’ll help us make sure we’re looking at the same crash as you. Since you’re already in the debugger, selecting some lines in the Debug navigator and copy-pasting them should give us the information we need. A couple guesses, in the meantime:
/cc @frederoni |
@1ec5 Thanks for the weekend reply. I'm glad you brought up I added a Not sure how to work stacktraces in simulator...seems like it should be easier than this.... I'm researching how to do this, any tips would be helpful. Is this perhaps what you were looking for?
The closure is where it crashes trying to set the shape. |
The method is declared in Objective-C with the parameter’s type as Ideally, we’d mark the method with |
I’ve added an example to the documentation in #7627. Meanwhile, I can reproduce the crash. As you pointed out, the crash only occurs when specifying a clustering option: MGLShapeSource(identifier: "foo", shape: nil, options: [.clustered: true]) The
The same crash occurs when creating the shape source with a feature collection containing no features. /cc @mourner |
Fixed in #7633 on the release-ios-v3.4.0 branch. |
mapbox/supercluster.hpp#5 and mapbox/supercluster.hpp#6 track the underlying issues behind this crash. |
Platform: iOS
Mapbox SDK version: 3.4.0-beta6
Steps to trigger behavior
Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: