Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sometimes app crash when remove app from recent app list #406

@hussenIbrahim

Description

@hussenIbrahim

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions