Repository navigation
Application Crashing When Going Back From MapView - Android 4.1.2 #10030
Description
I'm currently developing on a Company PDA, Motorola TC55 running Android 4.1.2 - I have the MapView Loading in a new Activity NavigationMap.java.
When opening the acitivty everything seems to be fine and working, can Zoom, Move etc, However when i press the back button, you would expect the activity to close, what is actually happening is it's closing the application.
I have tested the same app on two other devices, Samsung Galaxy S6 Edge Android 7 & Google Pixel Android 8.0 and this problem does not occur, please see below LOGCAT extract of Android 4.1.2 Device.
Information:
ActivityMain - Application's Main Page
ActivityRouteView - Detailed Information of The Route (Job No, Address, Contact Details) - This activity contains a button "Start Route" - This then starts the intent for NavigationMap.
09-20 09:18:34.963 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:34.993 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:35.003 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:35.033 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:35.063 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:35.083 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:35.113 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:35.143 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:35.223 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:35.413 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:35.453 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-20 09:18:37.345 355-355/uk.co.ainscough.routeinfo D/ainscough.routeinfo: Activity Restarted
09-20 09:18:38.136 355-355/uk.co.ainscough.routeinfo A/libc: Fatal signal 11 (SIGSEGV) at 0x00000230 (code=1), thread 355 (cough.routeinfo)
09-20 09:18:38.296 170-170/? I/DEBUG: pid: 355, tid: 355, name: cough.routeinfo >>> uk.co.ainscough.routeinfo <<<
09-20 09:18:38.507 170-170/? I/DEBUG: #09 pc 00050379 /data/app-lib/uk.co.ainscough.routeinfo-1/libmapbox-gl.so
09-20 09:18:38.927 631-2070/? I/WindowState: WIN DEATH: Window{42791600 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.NavigationMap paused=false}
09-20 09:18:38.927 631-755/? W/InputDispatcher: channel '42924de8 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.ActivityMain (server)' ~ Consumer closed input channel or an error occurred. events=0x9
09-20 09:18:38.927 631-755/? E/InputDispatcher: channel '42924de8 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.ActivityMain (server)' ~ Channel is unrecoverably broken and will be disposed!
09-20 09:18:38.927 631-755/? W/InputDispatcher: channel '431c8eb0 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.ActivityRouteView (server)' ~ Consumer closed input channel or an error occurred. events=0x9
09-20 09:18:38.927 631-755/? E/InputDispatcher: channel '431c8eb0 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.ActivityRouteView (server)' ~ Channel is unrecoverably broken and will be disposed!
09-20 09:18:38.927 631-2067/? W/InputDispatcher: Attempted to unregister already unregistered input channel '42924de8 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.ActivityMain (server)'
09-20 09:18:38.927 631-2070/? W/WindowManager: Force-removing child win Window{42812a58 SurfaceView paused=false} from container Window{42791600 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.NavigationMap paused=false}
09-20 09:18:38.927 631-2063/? I/ActivityManager: Process uk.co.ainscough.routeinfo (pid 355) has died.
09-20 09:18:38.927 631-2063/? W/ActivityManager: Scheduling restart of crashed service uk.co.ainscough.routeinfo/com.mapbox.services.android.telemetry.service.TelemetryService in 5000ms
09-20 09:18:38.927 631-2063/? W/ActivityManager: Scheduling restart of crashed service uk.co.ainscough.routeinfo/.ContractsService in 5000ms
09-20 09:18:38.927 631-2063/? W/ActivityManager: Scheduling restart of crashed service uk.co.ainscough.routeinfo/.FeedbackService in 14999ms
09-20 09:18:38.927 631-2067/? I/WindowState: WIN DEATH: Window{42924de8 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.ActivityMain paused=false}
09-20 09:18:38.977 631-639/? W/InputDispatcher: Attempted to unregister already unregistered input channel '431c8eb0 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.ActivityRouteView (server)'
09-20 09:18:38.977 631-639/? I/WindowState: WIN DEATH: Window{431c8eb0 uk.co.ainscough.routeinfo/uk.co.ainscough.routeinfo.ActivityRouteView paused=false}
09-20 09:18:38.987 631-2063/? W/ActivityManager: Force removing ActivityRecord{42a19fd8 u0 uk.co.ainscough.routeinfo/.ActivityRouteView}: app died, no saved state
09-20 09:18:38.997 631-2063/? I/ActivityManager: Start proc uk.co.ainscough.routeinfo for activity uk.co.ainscough.routeinfo/.ActivityMain: pid=5655 uid=10091 gids={50091, 3003, 1015, 1028}
On the Android 4.1.2 Device when ever the NavigationMap Activity Loads i get a hell of a lot of these messages in the logcat, when i move around on the map i also get tones and tones of them showing in the log cat - see below.
09:18:34.993 355-355/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
I did recieve a different error yesterday which i did keep the logcat extract, this was when i was playing around within the Map, moving around zooming in and out etc, see error below.
09-19 16:37:55.146 12353-12353/uk.co.ainscough.routeinfo E/TileRenderer: glEndTilingQCOM: 0x502
09-19 16:37:55.166 12353-12353/uk.co.ainscough.routeinfo W/Adreno200-EGL: <qeglDrvAPI_eglSwapBuffers:3393>: EGL_BAD_SURFACE
09-19 16:37:55.166 12353-12353/uk.co.ainscough.routeinfo E/mbgl: {cough.routeinfo}[OpenGL]: eglSwapBuffers() returned error 12301
09-19 16:37:55.246 12353-12353/uk.co.ainscough.routeinfo W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41dff438)
09-19 16:37:55.266 12353-12353/uk.co.ainscough.routeinfo E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.Error: eglSwapBuffers() failed
at com.mapbox.mapboxsdk.maps.NativeMapView.nativeRender(Native Method)
at com.mapbox.mapboxsdk.maps.NativeMapView.render(NativeMapView.java:179)
at com.mapbox.mapboxsdk.maps.MapView.onDraw(MapView.java:406)
at android.view.View.draw(View.java:13458)
at android.widget.FrameLayout.draw(FrameLayout.java:467)
at android.view.View.getDisplayList(View.java:12409)
at android.view.View.getDisplayList(View.java:12453)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
at android.view.View.getDisplayList(View.java:12345)
at android.view.View.getDisplayList(View.java:12453)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
at android.view.View.getDisplayList(View.java:12345)
at android.view.View.getDisplayList(View.java:12453)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
at android.view.View.getDisplayList(View.java:12345)
at android.view.View.getDisplayList(View.java:12453)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
at android.view.View.getDisplayList(View.java:12345)
at android.view.View.getDisplayList(View.java:12453)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
at android.view.View.getDisplayList(View.java:12345)
at android.view.View.getDisplayList(View.java:12453)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:2911)
at android.view.View.getDisplayList(View.java:12345)
at android.view.View.getDisplayList(View.java:12453)
at android.view.HardwareRenderer$GlRenderer.draw(HardwareRenderer.java:1168)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2149)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2021)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1832)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4214)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
at android.view.Choreographer.doCallbacks(Choreographer.java:555)
at android.view.Choreographer.doFrame(Choreographer.java:525)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
09-19 16:37:55.376 631-1031/? W/ActivityManager: Force finishing activity uk.co.ainscough.routeinfo/.NavigationMap
09-19 16:37:55.887 631-645/? W/ActivityManager: Activity pause timeout for ActivityRecord{42792ff0 u0 uk.co.ainscough.routeinfo/.NavigationMap}
09-19 16:38:05.888 631-645/? W/ActivityManager: Activity idle timeout for ActivityRecord{429efee0 u0 uk.co.ainscough.routeinfo/.ActivityRouteView}
See below gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "uk.co.ainscough.routeinfo"
minSdkVersion 15
targetSdkVersion 26
versionCode 2
versionName "2.0.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/xstream-1.4.7.jar')
compile('com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.3@aar') {
transitive=true
}
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.+'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'junit:junit:4.12'
}
If you require anymore information please let me know.
Activity
Danny-James commentedon Sep 20, 2017
Below is NavigationMap Class
Danny-James commentedon Sep 20, 2017
When commenting the following code below the error no longer occurs, is their a bug within the onDestroy method?
tobrun commentedon Sep 27, 2017
Looked briefly into this issue and haven't been able to reproduce this on a general JellyBean device or emulator. It seems device specific atm.
Danny-James commentedon Sep 27, 2017
@tobrun This is a physical device, Motorola (Zebra) TC55 - Android 4.1.2- When I Comment mapView.onDestroy() Out The Error Doesn't Happen And The App Doesn't Close.
salonkasoli commentedon Sep 27, 2017
@tobrun
Android emulator 26.1.4 target android 4.1 CPU x86. Crash in mapView.onDestroy() -> nativeMapView.terminateContext(); -> nativeTerminateContext();
tobrun commentedon Sep 27, 2017
@salonkasoli not able to reproduce that with code used for 5.1.4:
Will look into doing some tests with the binary.
Danny-James commentedon Sep 27, 2017
@tobrun I Have Some Problems Regarding MultiDex, Let Me Resolve This And I Can Then Get You A GIF Of The Crashing Issue Explained Above.
Danny-James commentedon Sep 27, 2017
@tobrun After Back Press The Screen Is Supposed To Go Back To The Last Activity (Route), As I'm Using The this.finish(); command - It's Actually Going Back To The Main Activity (My Jobs).
UPDATED GIF

Let Me Know If You Have Difficulty Understanding.
Danny-James commentedon Sep 27, 2017
@tobrun I have the GIF Recorder Working Again, I Will Create A New GIF.
Danny-James commentedon Sep 27, 2017
Full_LogCat.txt
Full LogCat Attached Whilst Doing The Above.
Danny-James commentedon Oct 2, 2017
@tobrun, Have you managed to look into this issue?
Danny-James commentedon Oct 17, 2017
@tobrun Did this get resolved or investigated further?
Danny-James commentedon Nov 21, 2017
Android 4.1.2 - GIGABYTE/Motorola TC55.
@tobrun, just to update you on this Issue, I'm now using the following gradle configuration
When viewing the MapView which sits in my Activity (ActivityNavigationMap.java) if i press back or use the up navigation which should take me to the previous screen, i'm still getting a crash.
The only error i'm seeing the LogCat is shown below;
Danny-James commentedon Dec 20, 2017
This is still happening any news on this? When i go back to a previous activity from the MapView the application crashes and loads up my Main Activity.
Danny-James commentedon Jan 8, 2018
@tobrun Can i have an update on this? I'm using the latest mapbox SDK.
I'm using;
When viewing the MapView which sits in my Activity (ActivityNavigationMap.java) if i press back or use the up navigation which should take me to the previous screen, i'm still getting a crash.
Danny-James commentedon Jan 18, 2018
@tobrun @Guardiola31337 - I've had no reply on this ticket since this comment
Could i have an update on this?
tobrun commentedon Mar 2, 2018
Capturing from mapbox/mapbox-navigation-android#534 that this is resolved.
JacobJT commentedon Jun 14, 2018
@Danny-James If you're still experiencing this, take a look here:
#10716
Seems to be the use of
onDestroy()instead ofonDestroyView(), as actually @tobrun points out in the other thread.Danny-James commentedon Jun 14, 2018
@JacobJT my issue was with Adreno 2 chipset which was resolved by MapBox.