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.
mbgl::gl::value::Viewport::Get() == getContext().viewport.getCurrentValue() failed #7220
Copy link
Copy link
Closed
Description
I was able to produce the following crash below with:
make run-android-lib-arm-v8make run-android-ui-test
It fails on testCirclePitchScale but occurs on other tests as well, not constantly reproducible:
11-29 11:18:08.754 10875-10875/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-29 11:18:08.754 10875-10875/? A/DEBUG: Build fingerprint: 'google/ryu/dragon:7.1.1/NPF10C/3347772:user/release-keys'
11-29 11:18:08.754 10875-10875/? A/DEBUG: Revision: '0'
11-29 11:18:08.754 10875-10875/? A/DEBUG: ABI: 'arm64'
11-29 11:18:08.754 10875-10875/? A/DEBUG: pid: 9804, tid: 9804, name: pboxsdk.testapp >>> com.mapbox.mapboxsdk.testapp <<<
11-29 11:18:08.754 10875-10875/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
11-29 11:18:08.757 10875-10875/? A/DEBUG: Abort message: '../../../platform/android/src/native_map_view.cpp:107: void mbgl::android::NativeMapView::updateViewBinding(): assertion "mbgl::gl::value::Viewport::Get() == getContext().viewport.getCurrentValue()" failed'
11-29 11:18:08.757 10875-10875/? A/DEBUG: x0 0000000000000000 x1 000000000000264c x2 0000000000000006 x3 0000000000000008
11-29 11:18:08.757 10875-10875/? A/DEBUG: x4 0000000000000000 x5 0000000000808080 x6 0000000000000000 x7 0000000000000030
11-29 11:18:08.758 10875-10875/? A/DEBUG: x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001
11-29 11:18:08.758 10875-10875/? A/DEBUG: x12 0000000000000028 x13 0000000000000000 x14 0000000000000000 x15 00251493a82bb652
11-29 11:18:08.758 10875-10875/? A/DEBUG: x16 000000746c8b9ee0 x17 000000746c863aac x18 0000000c00000000 x19 000000746e7e0b40
11-29 11:18:08.758 10875-10875/? A/DEBUG: x20 0000000000000006 x21 000000746e7e0a98 x22 000000000000000b x23 000000001352ec00
11-29 11:18:08.758 10875-10875/? A/DEBUG: x24 000000001352ec00 x25 0000000012c52730 x26 0000000000000000 x27 0000000000000000
11-29 11:18:08.758 10875-10875/? A/DEBUG: x28 0000000000000000 x29 0000007ff4f76880 x30 000000746c860ed8
11-29 11:18:08.758 10875-10875/? A/DEBUG: sp 0000007ff4f76860 pc 000000746c863ab4 pstate 0000000060000000
11-29 11:18:08.758 3102-3102/? E/NowRemoteClient: skipping logEndstates, service is null
11-29 11:18:08.767 10875-10875/? A/DEBUG: backtrace:
11-29 11:18:08.767 10875-10875/? A/DEBUG: #00 pc 000000000006bab4 /system/lib64/libc.so (tgkill+8)
11-29 11:18:08.767 10875-10875/? A/DEBUG: #01 pc 0000000000068ed4 /system/lib64/libc.so (pthread_kill+64)
11-29 11:18:08.767 10875-10875/? A/DEBUG: #02 pc 0000000000023f58 /system/lib64/libc.so (raise+24)
11-29 11:18:08.767 10875-10875/? A/DEBUG: #03 pc 000000000001c810 /system/lib64/libc.so (abort+52)
11-29 11:18:08.767 10875-10875/? A/DEBUG: #04 pc 0000000000020f08 /system/lib64/libc.so (__libc_fatal+104)
11-29 11:18:08.767 10875-10875/? A/DEBUG: #05 pc 000000000001cc28 /system/lib64/libc.so (__assert2+48)
11-29 11:18:08.767 10875-10875/? A/DEBUG: #06 pc 00000000000cdeb0 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so
11-29 11:18:08.767 10875-10875/? A/DEBUG: #07 pc 00000000000ce44c /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so
11-29 11:18:08.767 10875-10875/? A/DEBUG: #08 pc 00000000000d4d50 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so
11-29 11:18:08.767 10875-10875/? A/DEBUG: #09 pc 000000000071cfa8 /data/app/com.mapbox.mapboxsdk.testapp-1/oat/arm64/base.odex (offset 0x6d3000)
[ 11-29 11:18:11.344 167: 167 W/ ]
debuggerd: resuming target 9804Symbolicated:
********** Crash dump: **********
Build fingerprint: 'google/ryu/dragon:7.1.1/NPF10C/3347772:user/release-keys'
pid: 9804, tid: 9804, name: pboxsdk.testapp >>> com.mapbox.mapboxsdk.testapp <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Stack frame #00 pc 000000000006bab4 /system/lib64/libc.so (tgkill+8)
Stack frame #01 pc 0000000000068ed4 /system/lib64/libc.so (pthread_kill+64)
Stack frame #02 pc 0000000000023f58 /system/lib64/libc.so (raise+24)
Stack frame #03 pc 000000000001c810 /system/lib64/libc.so (abort+52)
Stack frame #04 pc 0000000000020f08 /system/lib64/libc.so (__libc_fatal+104)
Stack frame #05 pc 000000000001cc28 /system/lib64/libc.so (__assert2+48)
Stack frame #06 pc 00000000000cdeb0 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so: Routine mbgl::android::NativeMapView::updateViewBinding() at /home/tvn/Mapbox/mapbox-gl-native/build/android-arm-v8/Debug/../../../platform/android/src/native_map_view.cpp:107 (discriminator 2)
Stack frame #07 pc 00000000000ce44c /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so: Routine mbgl::android::NativeMapView::render() at /home/tvn/Mapbox/mapbox-gl-native/build/android-arm-v8/Debug/../../../platform/android/src/native_map_view.cpp:185
Stack frame #08 pc 00000000000d4d50 /data/app/com.mapbox.mapboxsdk.testapp-1/lib/arm64/libmapbox-gl.so: Routine (anonymous namespace)::nativeRender(_JNIEnv*, jni::jobject*, long long) at /home/tvn/Mapbox/mapbox-gl-native/build/android-arm-v8/Debug/../../../platform/android/src/jni.cpp:367
Stack frame #09 pc 000000000071cfa8 /data/app/com.mapbox.mapboxsdk.testapp-1/oat/arm64/base.odex (offset 0x6d3000)
cc @mapbox/android
Activity
tobrun commentedon Nov 29, 2016
Also seeing this on
testCircleRadiuswhen building forarm-v7tobrun commentedon Nov 29, 2016
Noting that I'm not seeing this crash on a phone factor device, only on a tablet.
cc @kkaefer, this issue seems related to the one with the keyboard?
tobrun commentedon Dec 9, 2016
Now for the first time I have seen this on CI, on a nexus 6, not constantly reproducible.
ivovandongen commentedon Dec 12, 2016
@tobrun I've seen similar issues when something happens between
Backend#activateandBackend#deactivate. This might be covering up the actual error. I've implemented a fix on @kkaefer 's suggestion here: a1cf025. This might uncover the actual issue.tobrun commentedon Dec 15, 2016
Linking #6546 as this has become one of the causes for unreliable instrumentation tests. At the time of reporting this issue didn't show on CI, only the mentioned device in OP, but now the Nexus 6 has started to show this.
kkaefer commentedon Dec 21, 2016
This error seems to be caused by an inactive GL context. In #5721, we introduced refcounting for activations, but it appears that we aren't activating the context in some situations where it is necessary.
zugaldia commentedon Jan 2, 2017
Adding this ticket to a milestone to bump its priority -- as noted by @tobrun, this is affecting our instrumentation tests.
tobrun commentedon Jan 27, 2017
Noticed a similar crash, not identical and only when compiling against arm-v8, haven't seen this on arm-v7:
tobrun commentedon Mar 1, 2017
noting here that we are still occasionally hitting this issue on Firebase test lab.
tobrun commentedon Mar 1, 2017
One thing I noticed when looking into another issue is that this can occur when there isn't any valid surface. Eg. calling Map::render() when the surface hasn't been fully created yet.
tobrun commentedon Apr 21, 2017
With recent changes to master and verifying with runs on AWS/Firebase, confirming that this doesn't occur anymore. Closing for now.
tobrun commentedon May 5, 2017
Reopening as this seems to have resurfaced:
tobrun commentedon May 5, 2017
When I disable the assertion, I'm hitting the following assertion of the viewport size, which is executed below the frame buffer one:
My hunch indicates me the MapView is already been destroyed when these assertions are being executed. I'm going to see if I can avoid such a thing from occurring. atm the issue is reproducible on Firebase with every run.
tobrun commentedon May 5, 2017
Hunch was incorrect, not related to destroying the surface but related to adding a Layer. Removing all the assertions shows the following eglSwapBuffers failed:
A coupe of lines before, I'm seeing:
tobrun commentedon Jun 6, 2017
plausible fix for this in #9198, the issue was that we were calling into MapboxMap from the instrumentation thread instead of the application ui thread.