nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 696 forks source link

[ios] Random crash when pressing PointAnnotation #1650

Open fvieira opened 5 years ago

fvieira commented 5 years ago

I have a map with a few clickable points of interest. In Android all is fine, on iOS, once in a while, when I press one of these points of interest, the app crashes with the following error:

libc++abi.dylib: terminating with uncaught exception of type NSException

I haven't been able to understand why it happens, just that it has to do with the PointAnnotation. I've been trying to fix/workaround this issue for two days now, with no success.

Things I've tried:

In short, I'm stuck. I don't know how to get rid of this bug without replacing it with worse ones. Can anyone give me some pointers? Is there some more information I could give to help someone debug this crash?

Thanks in advance.

arvidede commented 5 years ago

Had the same issue with the following error message:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Annotation view's annotation property should not be nil.'

Possibly related to a bug in an previous version of mapbox-gl-native #9974. It went away after pulling the latest version from master, which esentially just upgraded the iOS SDK for Mapbox GL to 3.7.8.

fvieira commented 5 years ago

@arvidede Do you mean this repository's master? Because my code is on commit 429f540224c0be789e055bee4b7ed2943f0a5573 and after that commit are only 3 commits with nothing that could fix this problem...

arvidede commented 5 years ago

@fvieira Yes, this repo. Turns out the issue still remains in production, but not in dev. I'll keep you posted if I find anything.