-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sometimes app crash when remove app from recent app list #406
Comments
Easy to reproduce on Xiaomi Mi A3 (Android One)... Any clue ? |
I'm having the same issue!!!! |
maybe v0.9.0 resolve this issue (#266) |
I'm having the same issue closing the app on back button on Android 6,7,8. Also with v0.9.0.
|
I haven't fully tested this out to see if the error is gone after this fix. The error is due to code being run to manipulate the map e.g. using map controller whilst the map has not yet been created. Basically I add a |
This should be fixed with upgrading to a newer Android SDK version -> #413 |
sometimes app crash when remove app from recent app list
i think it because of the map or the style is not loaded yet completely
how to avoid this crash
[ +22 ms] D/AndroidRuntime(23986): Shutting down VM [ +41 ms] E/AndroidRuntime(23986): FATAL EXCEPTION: main [ +7 ms] E/AndroidRuntime(23986): Process: com.realestate.user, PID: 23986 [ +43 ms] E/AndroidRuntime(23986): java.lang.RuntimeException: Unable to destroy activity {com.realestate.user/com.realestate.user.MainActivity}: java.lang.IllegalStateException: Calling getLayer when a newer style is loading/has loaded. [ +84 ms] E/AndroidRuntime(23986): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5193) [ +80 ms] E/AndroidRuntime(23986): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5227) [ +47 ms] E/AndroidRuntime(23986): at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:44) [ +47 ms] E/AndroidRuntime(23986): at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176) [ +54 ms] E/AndroidRuntime(23986): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97) [ +41 ms] E/AndroidRuntime(23986): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147) [ +39 ms] E/AndroidRuntime(23986): at android.os.Handler.dispatchMessage(Handler.java:107) [ +2 ms] E/AndroidRuntime(23986): at android.os.Looper.loop(Looper.java:237) [ +7 ms] E/AndroidRuntime(23986): at android.app.ActivityThread.main(ActivityThread.java:7814) [ +23 ms] E/AndroidRuntime(23986): at java.lang.reflect.Method.invoke(Native Method) [ +24 ms] E/AndroidRuntime(23986): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) [ +6 ms] E/AndroidRuntime(23986): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075) [ ] E/AndroidRuntime(23986): Caused by: java.lang.IllegalStateException: Calling getLayer when a newer style is loading/has loaded. [ +2 ms] E/AndroidRuntime(23986): at com.mapbox.mapboxsdk.maps.Style.validateState(Style.java:777) [ +2 ms] E/AndroidRuntime(23986): at com.mapbox.mapboxsdk.maps.Style.getLayer(Style.java:240) [ +4 ms] E/AndroidRuntime(23986): at com.mapbox.mapboxsdk.location.SymbolLocationLayerRenderer.setLayerVisibility(SymbolLocationLayerRenderer.java:247) [ +51 ms] E/AndroidRuntime(23986): at com.mapbox.mapboxsdk.location.SymbolLocationLayerRenderer.hide(SymbolLocationLayerRenderer.java:109) [ +104 ms] E/AndroidRuntime(23986): at com.mapbox.mapboxsdk.location.LocationLayerController.hide(LocationLayerController.java:138) [ +2 ms] E/AndroidRuntime(23986): at com.mapbox.mapboxsdk.location.LocationComponent.disableLocationComponent(LocationComponent.java:1392) [ +1 ms] E/AndroidRuntime(23986): at com.mapbox.mapboxsdk.location.LocationComponent.setLocationComponentEnabled(LocationComponent.java:518)[ +2 ms] E/AndroidRuntime(23986): at com.mapbox.mapboxgl.MapboxMapController.dispose(MapboxMapController.java:861) [ +64 ms] E/AndroidRuntime(23986): at io.flutter.plugin.platform.VirtualDisplayController.dispose(VirtualDisplayController.java:171) [ +66 ms] E/AndroidRuntime(23986): at io.flutter.plugin.platform.PlatformViewsController.flushAllViews(PlatformViewsController.java:640) [ +30 ms] E/AndroidRuntime(23986): at io.flutter.plugin.platform.PlatformViewsController.onDetachedFromJNI(PlatformViewsController.java:522) [ +43 ms] E/AndroidRuntime(23986): at io.flutter.embedding.engine.FlutterEngine.destroy(FlutterEngine.java:361) [ +5 ms] E/AndroidRuntime(23986): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach(FlutterActivityAndFragmentDelegate.java:522) [ +81 ms] E/AndroidRuntime(23986): at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:578) [ +4 ms] E/AndroidRuntime(23986): at android.app.Activity.performDestroy(Activity.java:8217) [ +47 ms] E/AndroidRuntime(23986): at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1342) [ +1 ms] E/AndroidRuntime(23986): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5178) [ +2 ms] E/AndroidRuntime(23986): ... 11 more
The text was updated successfully, but these errors were encountered: