Black screen & EGL errors after every resize of window - anyone got an idea what it is? [escalated to ticket, link inside]

Note: this is unrelated to my other forum thread Android blanks out app AFTER lockscreen unlock - did I miss some redraw event or is that an SDL2 oversight/bug? where the canvas is just temporarily black but any redraw fixes it without permanent effects

With a different one of my apps, I am seeing a full breakage as soon as there’s any window resize: entering or leaving split screen, or change of orientation, and it breaks: the canvas goes black and then I see EGL errors right after the resize, and occasionally presumably as some further drawing is attempted.

Here’s the log (interesting error: 06-13 01:42:03.182 13386 13452 E libEGL : eglMakeCurrent:1069 error 3002 (EGL_BAD_ACCESS)):

06-13 01:41:55.153  2568  2568 D StatusBar: setSystemUiVisibility vis=2618 mask=ffffffff oldVal=2618 newVal=2618 diff=0
06-13 01:41:55.159   412   412 I BufferQueueConsumer: [DockedStackDim#0](this:0x7a16359000,id:347,api:0,p:-1,c:412) setDefaultBufferSize: width=78 height=1080
06-13 01:41:55.177  2568  2568 D StatusBar: setSystemUiVisibility vis=2618 mask=ffffffff oldVal=2618 newVal=2618 diff=0
06-13 01:41:55.178   412   412 I BufferQueueConsumer: [DockedStackDim#0](this:0x7a16359000,id:347,api:0,p:-1,c:412) setDefaultBufferSize: width=85 height=1080
06-13 01:41:55.181  2568  2568 D StatusBar: setSystemUiVisibility vis=2618 mask=ffffffff oldVal=2618 newVal=2618 diff=0
06-13 01:41:55.218   412   412 I DisplayDevice: [Built-in Screen (type:0)] fps:53.043636,dur:1018.03,max:38.79,min:13.68
06-13 01:41:55.228  2568  2568 D StatusBar: setSystemUiVisibility vis=2618 mask=ffffffff oldVal=2618 newVal=2618 diff=0
06-13 01:41:55.234   412   412 I BufferQueueConsumer: [Background for - SurfaceView - com.example.myapp/org.kivy.android.PythonActivity#0](this:0x7a162bf000,id:1086,api:0,p:-1,c:412) setDefaultBufferSize: width=2038 height=1019
06-13 01:41:55.234   412   412 I BufferQueueConsumer: [SurfaceView - com.example.myapp/org.kivy.android.PythonActivity#0](this:0x7a1624c800,id:1085,api:1,p:13386,c:412) setDefaultBufferSize: width=2038 height=1019
06-13 01:41:55.234   412   412 I BufferQueueConsumer: [DockedStackDim#0](this:0x7a16359000,id:347,api:0,p:-1,c:412) setDefaultBufferSize: width=93 height=1080
06-13 01:41:55.236 13386 13386 V SDL     : surfaceChanged()
06-13 01:41:55.236 13386 13386 V SDL     : pixel format RGB_565
06-13 01:41:55.238 13386 13386 V SDL     : Window size: 2038x1019
06-13 01:41:55.239 13386 13386 V SDL     : Device size: 2160x1080
06-13 01:41:55.252   412   412 I BufferQueueConsumer: [DockedStackDim#0](this:0x7a16359000,id:347,api:0,p:-1,c:412) setDefaultBufferSize: width=95 height=1080
06-13 01:41:55.266  2568  2568 D StatusBar: setSystemUiVisibility vis=2618 mask=ffffffff oldVal=2618 newVal=2618 diff=0
06-13 01:41:55.273  2568  2568 D StatusBar: setSystemUiVisibility vis=2618 mask=ffffffff oldVal=2618 newVal=2618 diff=0
06-13 01:41:55.281   412   879 I BufferQueueProducer: [DockedStackDivider#0](this:0x7a1635a800,id:1068,api:1,p:2568,c:412) queueBuffer: fps=44.60 dur=1008.87 max=42.40 min=5.97
06-13 01:41:55.306  1953  2986 E APEExtractor: getAPEInfo not ape 20484
06-13 01:41:55.307  1953  2986 D MediaExtractor: Autodetected media content as 'application/ogg' with confidence 0.20
06-13 01:41:55.307  1953  2986 I MtkAVStageFactory: createExtractorExt: source 0x7c0644a5c0 mime application/ogg meta 0x0
06-13 01:41:55.317 13386 13404 D GraphicBuffer: register, handle(0xea1c80a0) (w:1080 h:2160 s:1088 f:0x1 u:b00)
06-13 01:41:55.332  2242  6968 V WindowManager: Changing focus from Window{41fcc9c u0 com.android.settings/com.android.settings.SubSettings} to Window{174e3dc u0 com.example.myapp/org.kivy.android.PythonActivity} Callers=com.android.server.wm.DisplayContent.layoutAndAssignWindowLayersIfNeeded:2294 com.android.server.wm.TaskWindowContainerController.reparent:141 com.android.server.am.TaskRecord.reparent:675 com.android.server.am.TaskRecord.reparent:595 
06-13 01:41:55.332  2242  6968 D WindowManager: Input focus has changed to Window{174e3dc u0 com.example.myapp/org.kivy.android.PythonActivity}
--
06-13 01:41:55.347  1931 12941 D GraphicBuffer: unregister, handle(0x7d5c82f5e0) (w:1080 h:2160 s:1088 f:0x1 u:b00)
06-13 01:41:55.348   412   448 I BufferQueueProducer: [com.android.settings/com.android.settings.SubSettings#1](this:0x7a162c0800,id:1091,api:1,p:1931,c:412) disconnect(P): api 1
06-13 01:41:55.348   412   448 I BufferQueueConsumer: [com.android.settings/com.android.settings.SubSettings#1](this:0x7a162c0800,id:1091,api:1,p:-1,c:412) getReleasedBuffers: returning mask 0xffffffffffffffff
06-13 01:41:55.350   407   434 I vendor.mediatek.hardware.power@1.1-impl: mtkPowerHint hint:11, data:2000
06-13 01:41:55.351   407   433 I libPerfService: 11: legacy set freq: 1547000 -1 2002000 -1 2522000 -1
06-13 01:41:55.356   407   433 I libPerfService: 11: legacy set: -1 -1 4 -1 2 -1
06-13 01:41:55.357  2242  2285 I WindowManager: Focus moving from Window{41fcc9c u0 com.android.settings/com.android.settings.SubSettings} to Window{174e3dc u0 com.example.myapp/org.kivy.android.PythonActivity}
06-13 01:41:55.365   412   879 I SurfaceFlinger: EventThread Client Pid (1931) disconnected by (412)
06-13 01:41:55.366   412   879 I SurfaceFlinger: EventThread Client Pid (1931) disconnected by (412)
06-13 01:41:55.376  2568  2568 D StatusBar: setSystemUiVisibility vis=508 mask=ffffffff oldVal=508 newVal=508 diff=0
06-13 01:41:55.389 13386 13386 V SDL     : onWindowFocusChanged(): true
06-13 01:41:55.426  2242  2285 I WindowManager: Losing delayed focus: Window{41fcc9c u0 com.android.settings/com.android.settings.SubSettings}
06-13 01:41:55.449  2568  2568 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 01:41:55.450  2568  2568 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
06-13 01:41:55.450  2568  2568 W PackageManager: Failure retrieving resources for com.google.android.apps.messaging
06-13 01:41:55.450  2568  2568 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 01:41:55.450  2568  2568 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
06-13 01:41:55.451  2568  2568 W PackageManager: Failure retrieving resources for com.google.android.apps.messaging
06-13 01:41:55.451  2568  2568 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 01:41:55.452   407   434 I vendor.mediatek.hardware.power@1.1-impl: mtkPowerHint hint:11, data:2000
06-13 01:41:55.453  2568  2568 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
--
06-13 01:41:55.456   407   434 I vendor.mediatek.hardware.power@1.1-impl: notifyAppState pack:com.example.myapp, act:org.kivy.android.PythonActivity, pid:13386, state:1
06-13 01:41:55.457   407   433 D powerd  : [powerd_req] POWER_MSG_NOTIFY_STATE
06-13 01:41:55.457   407   433 I libPerfService: [perfNotifyAppState] foreground:com.example.myapp, pid:13386
06-13 01:41:55.457   407   433 E libPerfService: Could not open '/proc/driver/thermal/ta_fg_pid'
06-13 01:41:55.457   407   433 E libPerfService: error : 2, No such file or directory
06-13 01:41:55.457   407   433 E libPerfService: Could not open '/sys/module/ged/parameters/gx_top_app_pid'
06-13 01:41:55.457   407   433 E libPerfService: error : 2, No such file or directory
06-13 01:41:55.457   407   433 I libPerfService: perfUserGetCapability - cmd:7, id:0, val:1
06-13 01:41:55.458   412   448 I BufferQueueProducer: [NavigationBar#0](this:0x7a1685f800,id:14,api:1,p:2568,c:412) queueBuffer: fps=0.08 dur=327177.72 max=326712.89 min=8.00
06-13 01:41:55.483 13386 13386 V PythonActivity: onResume()
06-13 01:41:55.483 13386 13386 V SDL     : onResume()
06-13 01:41:55.484 13386 13386 V SDL     : nativeResume()
06-13 01:41:55.487  1964  1964 I Accelerometer: batch: handle:0, flag:0,samplingPeriodNs:20000000 maxBatchReportLatencyNs:0
06-13 01:41:55.490  1964  1964 I Accelerometer: flush, flushCnt:1
06-13 01:41:55.491  1964  2447 I Accelerometer: flush complete, flushCnt:0
06-13 01:41:55.496 13386 13386 V PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = ViewRoot{6f93d43 com.example.myapp/org.kivy.android.PythonActivity,ident = 0}, this = DecorView@26285fd[PythonActivity]
06-13 01:41:55.502   412   412 I BufferQueue: [unnamed-412-1093](this:0x7a1addd000,id:1093,api:0,p:-1,c:-1) BufferQueue core=(412:/system/bin/surfaceflinger)
06-13 01:41:55.502   412   412 W GuiExt  : Cannot find GuiExtService
06-13 01:41:55.502   412   412 I BufferQueueConsumer: [unnamed-412-1093](this:0x7a1addd000,id:1093,api:0,p:-1,c:412) connect(C): consumer=(412:/system/bin/surfaceflinger) controlledByApp=false
06-13 01:41:55.503   412   412 I BufferQueueConsumer: [unnamed-412-1093](this:0x7a1addd000,id:1093,api:0,p:-1,c:412) setConsumerName: unnamed-412-1093
06-13 01:41:55.503   412   412 I BufferQueueConsumer: [com.example.myapp/org.kivy.android.PythonActivity#0](this:0x7a1addd000,id:1093,api:0,p:-1,c:412) setConsumerName: com.example.myapp/org.kivy.android.PythonActivity#0
06-13 01:41:55.503   412   412 I BufferQueueConsumer: [com.example.myapp/org.kivy.android.PythonActivity#0](this:0x7a1addd000,id:1093,api:0,p:-1,c:412) setDefaultBufferSize: width=2038 height=1080
--
06-13 01:42:03.132  1953  3006 V APEExtractor: getAPEInfo id3 tag 0, len 31340
06-13 01:42:03.139  1953  3006 E APEExtractor: getAPEInfo not ape 222018
06-13 01:42:03.140  1953  3006 D MediaExtractor: Autodetected media content as 'audio/mpeg' with confidence 0.20
06-13 01:42:03.140  1953  3006 I MtkAVStageFactory: createExtractorExt: source 0x7c06565380 mime audio/mpeg meta 0x7c08015800
06-13 01:42:03.182 13386 13452 E libEGL  : eglMakeCurrent:1069 error 3002 (EGL_BAD_ACCESS)
06-13 01:42:03.186  1953  3006 V APEExtractor: getAPEInfo id3 tag 0, len 31337
06-13 01:42:03.189  1953  3006 E APEExtractor: getAPEInfo not ape 222008
06-13 01:42:03.189  1953  3006 D MediaExtractor: Autodetected media content as 'audio/mpeg' with confidence 0.20
06-13 01:42:03.189  1953  3006 I MtkAVStageFactory: createExtractorExt: source 0x7c0580d940 mime audio/mpeg meta 0x7c08015800
06-13 01:42:03.192 13386 13452 E libEGL  : eglMakeCurrent:1069 error 3002 (EGL_BAD_ACCESS)
06-13 01:42:03.196 13386 13452 I python  : wobblog-debug: APP RESUME EVENT
06-13 01:42:03.259   412   879 I BufferQueueProducer: [StatusBar#0](this:0x7a16930800,id:11,api:1,p:2568,c:412) queueBuffer: fps=2.00 dur=2000.79 max=1003.51 min=15.95
06-13 01:42:03.273   412   412 I DisplayDevice: [Built-in Screen (type:0)] fps:2.000044,dur:1999.96,max:1000.24,min:18.09
06-13 01:42:03.309  1953  2986 V APEExtractor: getAPEInfo id3 tag 0, len 31343
06-13 01:42:03.312  1953  2986 E APEExtractor: getAPEInfo not ape 222023
06-13 01:42:03.312  1953  2986 D MediaExtractor: Autodetected media content as 'audio/mpeg' with confidence 0.20
06-13 01:42:03.312  1953  2986 I MtkAVStageFactory: createExtractorExt: source 0x7c0644a5c0 mime audio/mpeg meta 0x7c08016400
06-13 01:42:03.367  1953  2986 V APEExtractor: getAPEInfo id3 tag 0, len 3133b
06-13 01:42:03.370  1953  2986 E APEExtractor: getAPEInfo not ape 222015

I was just hoping someone has a vague idea what could be the cause. Since another app of mine is not affected with similar window setup code, this could easily also be my fault. It’s just I have no clue what it could be, so any ideas appreciated!

I run with BLOCK_ON_PAUSE=0 so I know any sort of access to the context before the resume would be bad and possibly cause this, but so far I couldn’t trace down any. The other app I have which doesn’t suffer from this does do a lot of custom drawing and this one actually just relies on the basic elements the other one also uses, so that leaves me quite confused…

Edit: another interesting log of a resize, where you can see that 1. SDL reports onPause(), 2. SDL reports nativePause(), 3. there’s an invalid GL ES API call, 4 and only THEN my app gets a bakcground event: wobblog: APP BACKGROUND EVENT. Odd? Shouldn’t the context be alive up until my app got the background event? What’s going …?

6-13 02:09:46.317 15784 15784 V SDL     : onPause()
06-13 02:09:46.318 15784 15784 V SDL     : nativePause()
06-13 02:09:46.318 15784 15784 E libEGL  : call to OpenGL ES API with no current context (logged once per thread)
06-13 02:09:46.322  2242  3220 V WindowManager: Changing focus from Window{158e875 u0 com.example.myapp/org.kivy.android.PythonActivity} to null Callers=com.android.server.wm.WindowManagerService.setFocusedApp:2722 com.android.server.am.ActivityManagerService.setResumedActivityUncheckLocked:3250 com.android.server.am.ActivityStack.setResumedActivityLocked:2284 com.android.server.am.ActivityStack.resumeTopActivityInnerLocked:2599 
06-13 02:09:46.322  2242  3220 D WindowManager: Input focus has changed to null
06-13 02:09:46.323   407   434 I vendor.mediatek.hardware.power@1.1-impl: notifyAppState pack:com.android.systemui, act:com.android.systemui.recents.RecentsActivity, pid:2568, state:1
06-13 02:09:46.324   407   433 D powerd  : [powerd_req] POWER_MSG_NOTIFY_STATE
06-13 02:09:46.324   407   433 I libPerfService: [perfNotifyAppState] foreground:com.android.systemui, pid:2568
06-13 02:09:46.325   407   433 E libPerfService: Could not open '/proc/driver/thermal/ta_fg_pid'
06-13 02:09:46.325   407   433 E libPerfService: error : 2, No such file or directory
06-13 02:09:46.325   407   433 E libPerfService: Could not open '/sys/module/ged/parameters/gx_top_app_pid'
--
06-13 02:09:46.461  2568  3214 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
06-13 02:09:46.461  2568  3214 W PackageManager: Failure retrieving resources for com.google.android.apps.messaging
06-13 02:09:46.462  2568  3214 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 02:09:46.462  2568  3214 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
06-13 02:09:46.462  2568  3214 W PackageManager: Failure retrieving resources for com.google.android.apps.messaging
06-13 02:09:46.463  2568  3214 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 02:09:46.463  2568  3214 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
06-13 02:09:46.463  2568  3214 W PackageManager: Failure retrieving resources for com.google.android.apps.messaging
06-13 02:09:46.466 15784 15804 D GraphicBuffer: register, handle(0xea1c7d20) (w:1080 h:2160 s:1088 f:0x1 u:b00)
06-13 02:09:46.466  2568  3214 E TaskStackLayoutAlgorithm: Invalid task rect: taskRect=Rect(41, 41 - -40, 855) stackRect=Rect(41, 41 - -40, 1080) displayRect=Rect(0, 0 - 2160, 1080) windowRect=Rect(0, 0 - 1, 1080) taskStackBounds=Rect(41, 0 - -40, 1080)
06-13 02:09:46.479 15784 15784 V SDL     : onWindowFocusChanged(): false
06-13 02:09:46.493   412   879 I SurfaceFlinger: EventThread Client Pid (2568) created
06-13 02:09:46.494   412   879 I SurfaceFlinger: EventThread Client Pid (2568) created
06-13 02:09:46.494  1953  8711 V APEExtractor: getAPEInfo id3 tag 0, len 1da52
06-13 02:09:46.498  1953  8711 E APEExtractor: getAPEInfo not ape 141907
06-13 02:09:46.498  1953  8711 D MediaExtractor: Autodetected media content as 'audio/mpeg' with confidence 0.20
06-13 02:09:46.498  1953  8711 I MtkAVStageFactory: createExtractorExt: source 0x7c058a0ec0 mime audio/mpeg meta 0x7c064f1000
06-13 02:09:46.501  2242  2255 I WindowManager: Relayout Window{9061c06 u0 DockedStackDivider}: oldVis=4 newVis=0 focusMayChange = true
06-13 02:09:46.504  2568  2568 D Surface : Surface::allocateBuffers(this=0x7d503e2000)
06-13 02:09:46.504  2568  2887 D Surface : Surface::connect(this=0x7d503e2000,api=1)
06-13 02:09:46.504   412   446 I BufferQueueProducer: [DockedStackDivider#0](this:0x7a1635a800,id:1068,api:1,p:2568,c:412) connect(P): api=1 producer=(2568:com.android.systemui) producerControlledByApp=true
06-13 02:09:46.506 15784 15820 I python  : wobblog-debug: APP BACKGROUND EVENT.
06-13 02:09:46.506 15784 15820 I python  : wobblog-debug: ANDROIND IN BACKGROUND. KEEPING RENDERERS AS PER CONFIG OPTION. (not recommended)
06-13 02:09:46.506   412   412 I BufferQueueConsumer: [com.example.myapp/org.kivy.android.PythonActivity#0](this:0x7a1635c000,id:1098,api:1,p:-1,c:-1) disconnect(C)
06-13 02:09:46.510   412   412 I BufferQueue: [com.example.myapp/org.kivy.android.PythonActivity#0](this:0x7a1635c000,id:1098,api:1,p:-1,c:-1) ~BufferQueueCore
06-13 02:09:46.520  2568  2568 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 02:09:46.520  2568  2568 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
06-13 02:09:46.520  2568  2568 W PackageManager: Failure retrieving resources for com.google.android.apps.messaging
06-13 02:09:46.520  2568  2568 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 02:09:46.520  2568  2568 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
06-13 02:09:46.521  2568  2568 W PackageManager: Failure retrieving resources for com.google.android.apps.messaging
06-13 02:09:46.521  2568  2568 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 02:09:46.521  2568  2568 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
--
06-13 02:09:46.607   399   703 I hwcomposer: [DBQ] (q2:0x7eb6067000) Buffer queue is created with size(3)  
06-13 02:09:46.607   399   703 I hwcomposer: [DBQ] (q2:0x7eb6067000) setConsumerListener  
06-13 02:09:46.607  1953 15976 V APEExtractor: getAPEInfo id3 tag 0, len 1da52
06-13 02:09:46.607   399   703 I hwcomposer: [DBQ] (q2:0x7eb6067000) Reallocate Slot(0), pool(0 -> 0) size(0 -> 9331200)  
06-13 02:09:46.611  1953 15976 E APEExtractor: getAPEInfo not ape 141909
06-13 02:09:46.611  1953 15976 D MediaExtractor: Autodetected media content as 'audio/mpeg' with confidence 0.20
06-13 02:09:46.611  1953 15976 I MtkAVStageFactory: createExtractorExt: source 0x7c058a0ec0 mime audio/mpeg meta 0x7c064f1c00
06-13 02:09:46.621  2568  2887 D GraphicBuffer: register, handle(0x7d60d4f780) (w:1080 h:2160 s:1088 f:0x1 u:b00)
06-13 02:09:46.654   412   412 I BufferQueueConsumer: [Background for - SurfaceView - com.example.myapp/org.kivy.android.PythonActivity#0](this:0x7a16216800,id:1100,api:0,p:-1,c:412) setDefaultBufferSize: width=1006 height=1019
06-13 02:09:46.654   412   412 I BufferQueueConsumer: [SurfaceView - com.example.myapp/org.kivy.android.PythonActivity#0](this:0x7a16215000,id:1099,api:1,p:15784,c:412) setDefaultBufferSize: width=1006 height=1019
06-13 02:09:46.657 15784 15784 V SDL     : surfaceChanged()
06-13 02:09:46.657 15784 15784 V SDL     : pixel format RGB_565
06-13 02:09:46.657  2568  2568 D StatusBar: setSystemUiVisibility vis=708 mask=ffffffff oldVal=708 newVal=708 diff=0
06-13 02:09:46.658 15784 15784 V SDL     : Window size: 1006x1019
06-13 02:09:46.658 15784 15784 V SDL     : Device size: 2160x1080
06-13 02:09:46.668  1953 15976 V APEExtractor: getAPEInfo id3 tag 0, len 1da56
06-13 02:09:46.670  1953 15976 E APEExtractor: getAPEInfo not ape 141914
06-13 02:09:46.671  1953 15976 D MediaExtractor: Autodetected media content as 'audio/mpeg' with confidence 0.20
06-13 02:09:46.671  1953 15976 I MtkAVStageFactory: createExtractorExt: source 0x7c0651f240 mime audio/mpeg meta 0x7c064f1c00
06-13 02:09:46.673   407   434 I vendor.mediatek.hardware.power@1.1-impl: querySysInfo cmd:6, param:0
06-13 02:09:46.674   407   433 I powerd  : [powerd_req] POWER_MSG_QUERY_INFO
06-13 02:09:46.675   407   433 I powerd  : [powerd_req] POWER_MSG_QUERY_INFO: cmd:6, param:0
06-13 02:09:46.675   407   433 I libPerfService: perfUserGetCapability - cmd:6, id:0, val:2568
06-13 02:09:46.675  2568  2568 D StatusBar: setSystemUiVisibility vis=708 mask=ffffffff oldVal=708 newVal=708 diff=0
06-13 02:09:46.691   399   703 I hwcomposer: [DBQ] (q2:0x7eb6067000) Reallocate Slot(1), pool(0 -> 0) size(0 -> 9331200)  
--
06-13 02:09:48.949   407   434 I vendor.mediatek.hardware.power@1.1-impl: mtkPowerHint hint:15, data:10000
06-13 02:09:48.965  2242  2285 V WindowManager: Changing focus from Window{41fcc9c u0 com.android.settings/com.android.settings.SubSettings} to Window{158e875 u0 com.example.myapp/org.kivy.android.PythonActivity} Callers=com.android.server.wm.DisplayContent.layoutAndAssignWindowLayersIfNeeded:2294 com.android.server.wm.StackWindowController.positionChildAtTop:159 com.android.server.am.ActivityStack.insertTaskAtTop:2830 com.android.server.am.ActivityStack.moveToFront:865 
06-13 02:09:48.967  2242  2285 D WindowManager: Input focus has changed to Window{158e875 u0 com.example.myapp/org.kivy.android.PythonActivity}
06-13 02:09:48.978  2242  2285 I WindowManager: Focus moving from Window{41fcc9c u0 com.android.settings/com.android.settings.SubSettings} to Window{158e875 u0 com.example.myapp/org.kivy.android.PythonActivity}
06-13 02:09:48.979  2568  2568 D StatusBar: setSystemUiVisibility vis=518 mask=ffffffff oldVal=2618 newVal=518 diff=2300
06-13 02:09:48.978   407   434 I vendor.mediatek.hardware.power@1.1-impl: mtkPowerHint hint:11, data:2000
06-13 02:09:48.983  2242  5043 V WindowManager: Set focused app to: AppWindowToken{7172867 token=Token{ca8dc49 ActivityRecord{c0e9250 u0 com.example.myapp/org.kivy.android.PythonActivity t835}}} old focus=AppWindowToken{87b9040 token=Token{e24fc3 ActivityRecord{2e41f72 u0 com.android.settings/.SubSettings t831}}} moveFocusNow=true
06-13 02:09:48.984   407   433 I libPerfService: 11: legacy set freq: 1547000 -1 2002000 -1 2522000 -1
06-13 02:09:48.985   407   433 I libPerfService: 11: legacy set: -1 -1 4 -1 2 -1
06-13 02:09:48.987   407   434 I vendor.mediatek.hardware.power@1.1-impl: mtkPowerHint hint:11, data:2000
06-13 02:09:48.987 15784 15784 V SDL     : onWindowFocusChanged(): true
06-13 02:09:48.993   407   434 I vendor.mediatek.hardware.power@1.1-impl: notifyAppState pack:com.example.myapp, act:org.kivy.android.PythonActivity, pid:15784, state:1
06-13 02:09:48.994   407   433 D powerd  : [powerd_req] POWER_MSG_NOTIFY_STATE
06-13 02:09:48.995   407   433 I libPerfService: [perfNotifyAppState] foreground:com.example.myapp, pid:15784
06-13 02:09:48.996   407   433 E libPerfService: Could not open '/proc/driver/thermal/ta_fg_pid'
06-13 02:09:48.996   407   433 E libPerfService: error : 2, No such file or directory
06-13 02:09:48.996   407   433 E libPerfService: Could not open '/sys/module/ged/parameters/gx_top_app_pid'
06-13 02:09:48.996   407   433 E libPerfService: error : 2, No such file or directory
06-13 02:09:48.997   407   433 I libPerfService: perfUserGetCapability - cmd:7, id:0, val:1
06-13 02:09:49.000  2242  2291 D DuraSpeed/DSPolicyBase: [setCurrentLauncher] = community.fairphone.fplauncher3
06-13 02:09:49.000  2242  2291 D DuraSpeed/DuraSpeedInternalManager: switchState currentPackage = com.example.myapp, event =1004
06-13 02:09:49.001 15784 15784 V PythonActivity: onResume()
06-13 02:09:49.002 15784 15784 V SDL     : onResume()
06-13 02:09:49.002  2242  2291 D DuraSpeed/DuraSpeedInternalManager: switchState end
06-13 02:09:49.016 15784 15784 V SDL     : nativeResume()
06-13 02:09:49.023  1964  1964 I Accelerometer: batch: handle:0, flag:0,samplingPeriodNs:20000000 maxBatchReportLatencyNs:0
06-13 02:09:49.026  1964  1964 I Accelerometer: flush, flushCnt:1
06-13 02:09:49.026  1964  2447 I Accelerometer: flush complete, flushCnt:0
06-13 02:09:49.028 15784 15784 V PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = ViewRoot{77452f2 com.example.myapp/org.kivy.android.PythonActivity,ident = 0}, this = DecorView@82ac254[PythonActivity]
06-13 02:09:49.032 15784 15820 E libEGL  : eglMakeCurrent:1069 error 3002 (EGL_BAD_ACCESS)
06-13 02:09:49.038  2242  2255 D IdleScreen: activityIdleScreen: android.app.ContextImpl@3a7873 mNotifyNeeded: false idleIntent: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.example.myapp/org.kivy.android.PythonActivity (has extras) }
06-13 02:09:49.034 15784 15820 E libEGL  : eglMakeCurrent:1069 error 3002 (EGL_BAD_ACCESS)
06-13 02:09:49.038   407   434 I vendor.mediatek.hardware.power@1.1-impl: mtkPowerHint hint:11, data:0
06-13 02:09:49.042   412   806 I BufferQueueProducer: [com.android.settings/com.android.settings.SubSettings#0](this:0x7a1addd000,id:1107,api:1,p:1931,c:412) queueBuffer: fps=3.31 dur=1508.35 max=1354.34 min=16.17
06-13 02:09:49.044 15784 15820 I python  : wobblog-debug: APP RESUME EVENT
06-13 02:09:49.049  1953 15976 V APEExtractor: getAPEInfo id3 tag 0, len 7500a
06-13 02:09:49.052  1953 15976 E APEExtractor: getAPEInfo not ape 499724
06-13 02:09:49.052  1953 15976 D MediaExtractor: Autodetected media content as 'audio/mpeg' with confidence 0.20
06-13 02:09:49.052  1953 15976 I MtkAVStageFactory: createExtractorExt: source 0x7c058a0ec0 mime audio/mpeg meta 0x7c064f1c00
06-13 02:09:49.116  2568  2589 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 02:09:49.116  2568  2589 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
06-13 02:09:49.116  2568  2589 W PackageManager: Failure retrieving resources for com.google.android.apps.messaging
06-13 02:09:49.116  2568  2589 W asset   : Asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk is neither a directory nor file (type=1).
06-13 02:09:49.117  2568  2589 E ResourcesManager: failed to add asset path /data/app/com.google.android.apps.messaging-LpiCIA37srqkZo-XpAB_cA==/base.apk
06-13 02:09:49.117  2568  2589 W PackageManager: Failure retrieving resources for com.google.android.apps.messaging
--
06-13 02:09:50.422  1953  2111 E APEExtractor: getAPEInfo not ape 499726
06-13 02:09:50.422  1953  2111 D MediaExtractor: Autodetected media content as 'audio/mpeg' with confidence 0.20
06-13 02:09:50.422  1953  2111 I MtkAVStageFactory: createExtractorExt: source 0x7c0651f240 mime audio/mpeg meta 0x7c064f3400
06-13 02:09:50.452 15784 15820 E libEGL  : eglMakeCurrent:1069 error 3002 (EGL_BAD_ACCESS)
06-13 02:09:50.452 15784 15820 E libEGL  : eglMakeCurrent:1069 error 3002 (EGL_BAD_ACCESS)
06-13 02:09:50.488  1953  8711 V APEExtractor: getAPEInfo id3 tag 0, len 7500a
06-13 02:09:50.492  1953  8711 V APEExtractor: getAPEInfo id3 tag 480651, len 423708a
06-13 02:09:50.492  1953  8711 D MediaExtractor: Autodetected media content as 'audio/mpeg' with confidence 0.20
06-13 02:09:50.492  1953  8711 I MtkAVStageFactory: createExtractorExt: source 0x7c058a0ec0 mime audio/mpeg meta 0x7c064f1000
06-13 02:09:50.496 15784 15820 E libEGL  : eglMakeCurrent:1069 error 3002 (EGL_BAD_ACCESS)
06-13 02:09:50.541 15784 15820 I chatty  : uid=10150(com.example.myapp) SDLThread identical 2 lines
06-13 02:09:50.541 15784 15820 E libEGL  : eglMakeCurrent:1069 error 3002 (EGL_BAD_ACCESS)

Just a random thought, but could it be that you need to do a glFlush and/or glFinish to ensure that any ‘pending’ GL commands have been completed before your app enters background?

1 Like