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
FATAL EXCEPTION: main
java.lang.NullPointerException: Attempt to invoke virtual method 'void org.maplibre.android.location.LocationComponent.setMaxAnimationFps(int)' on a null object reference
at com.maplibre.rctmln.components.location.LocationComponentManager.setPreferredFramesPerSecond(LocationComponentManager.java:75)
at com.maplibre.rctmln.components.location.RCTMLNNativeUserLocation.setPreferredFramesPerSecond(RCTMLNNativeUserLocation.java:73)
at com.maplibre.rctmln.components.location.RCTMLNNativeUserLocation.addToMap(RCTMLNNativeUserLocation.java:32)
at com.maplibre.rctmln.components.mapview.RCTMLNMapView.addQueuedFeatures(RCTMLNMapView.java:567)
at com.maplibre.rctmln.components.mapview.RCTMLNMapView$1.onStyleLoaded(RCTMLNMapView.java:457)
at org.maplibre.android.maps.MapLibreMap.getStyle(MapLibreMap.java:125)
at com.maplibre.rctmln.components.mapview.RCTMLNMapView.onMapReady(RCTMLNMapView.java:452)
at org.maplibre.android.maps.MapView$MapCallback.onMapReady(MapView.java:1324)
at org.maplibre.android.maps.MapView$MapCallback.initialised(MapView.java:1310)
at org.maplibre.android.maps.MapView.initialiseMap(MapView.java:203)
at org.maplibre.android.maps.MapView.access$800(MapView.java:65)
at org.maplibre.android.maps.MapView$6.run(MapView.java:357)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:205)
at android.os.Looper.loop(Looper.java:294)
at android.app.ActivityThread.main(ActivityThread.java:8177)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
Screenshots (if applicable)
Version(s) affected
Platform: Android
OS version: Android 14
Device type: Pixel 7 Pro
Emulator/ Simulator: yes
maplibre-react-native Version 10.0.0-alpha.12
Additional context
In #428@marekmeissner introduced great new feature to set max animation FPS. However this crash app when there is no location permissions given to app. Quick look into code suggest that a null check might prevent this issue. As this is a fresh PR perhaps Marek can suggest a fix.
The text was updated successfully, but these errors were encountered:
Steps to Trigger Behavior
As this is issue is connected to recent #428 I hope it is OK to omit all issue details. Let me know if more information is needed.
Link to Minimal Reproducible Example
https://github.com/maplibre/maplibre-react-native/blob/main/example/src/examples/UserLocation/SetAndroidPreferredFramesPerSecond.tsx
Expected Behavior
App should not crash.
Actual Behavior
Screenshots (if applicable)
Version(s) affected
Additional context
In #428 @marekmeissner introduced great new feature to set max animation FPS. However this crash app when there is no location permissions given to app. Quick look into code suggest that a null check might prevent this issue. As this is a fresh PR perhaps Marek can suggest a fix.
The text was updated successfully, but these errors were encountered: