You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
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.
[android] NPE when invoking isInfoWindowShown() #10390
This shouldn't happen in normal use-cases. If possible please ask the reporting users from some follow up code. For now I can only harden the code, even though this shouldn't happen with normal usage.
Hi, I'm the one reporting this issue. We're using mapbox in our app, and this crash occurs 150 times per day, makes it the top one in our crash list.
Here is some logcat from our users, hope it helps. mapbox.zip
Thank you for providing that example code. there are couple of things strange about your setup:
you constantly call getMapAsync i every method, please call it once and retain an instance of MapboxMap. Please clarify if there a reason for doing it the way shown above.
you are rolling you own selection mechanism it seems? Why not use the internal automatic select mechanisme? I feel most of the code could be simplified with using the provided api and thus also not hitting the exception in OP. In any case, the whole code snippet in Select of click marker can be removed and replaced with listening to MarkerClickListener. Additionally you can control showing an infowindow by returning true/false there. If you want to select a Marker you can hook into`MapboxMap#selectMarker, no need to roll your own system around this.
Let us know if you have any more questions, in any case the exception from OP will not be shown anymore when #10403 has landed.
Hey 👋 @lct8712 #10403 landed and it's available in 5.2.0-beta.5. Would you be able to retest this with the latest version 5.2.0-beta.5? Are we good to close here?
Activity
tobrun commentedon Nov 7, 2017
This shouldn't happen in normal use-cases. If possible please ask the reporting users from some follow up code. For now I can only harden the code, even though this shouldn't happen with normal usage.
lct8712 commentedon Nov 8, 2017
Hi, I'm the one reporting this issue. We're using mapbox in our app, and this crash occurs 150 times per day, makes it the top one in our crash list.
Here is some logcat from our users, hope it helps.
mapbox.zip
tobrun commentedon Nov 8, 2017
@lct8712 I would be more interested in seeing how you are selecting these markers or if you call anything to remove or make them null.
lct8712 commentedon Nov 9, 2017
We use markers a lot, here is the code snippet. I can provide the complete java file if you are interested.
Add a marker
Select or click a marker
Remove markers
tobrun commentedon Nov 9, 2017
Thank you for providing that example code. there are couple of things strange about your setup:
Select of click markercan be removed and replaced with listening to MarkerClickListener. Additionally you can control showing an infowindow by returning true/false there. If you want to select a Marker you can hook into`MapboxMap#selectMarker, no need to roll your own system around this.Let us know if you have any more questions, in any case the exception from OP will not be shown anymore when #10403 has landed.
Guardiola31337 commentedon Nov 17, 2017
Hey 👋 @lct8712
#10403 landed and it's available in
5.2.0-beta.5. Would you be able to retest this with the latest version5.2.0-beta.5? Are we good to close here?tobrun commentedon Nov 20, 2017
This landed in 5.2.0 final, closing, feel free to reach out if still an issue.