-
-
Notifications
You must be signed in to change notification settings - Fork 300
Description
Steps to Reproduce
Create a minimal Solar2D project with only:
Runtime:addEventListener("system", function(e) print("system", e.type) end)
Build and install on a Pixel 8 running the September 2025 Android update.
Launch the app.
Press the power button to sleep the device.
Wait ~2–3 seconds, then unlock.
Expected
App receives applicationSuspend and applicationResume.
Process stays alive, like on other devices / OS versions.
Actual
No applicationSuspend is logged.
After ~5 seconds:
W/ActivityTaskManager: Activity pause timeout for CoronaActivity
I/ActivityManager: Process com.solar2d.app.test has died: fg TOP
App cold-starts on resume.
ANR Trace
Excerpt from /data/anr/traces.txt (main thread):
"main" prio=5 tid=1 Waiting
at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.surfaceDestroyed(GLSurfaceView.java:1735)
- locked <0x0ef389d0> (a com.ansca.corona.graphics.opengl.GLSurfaceView$GLThreadManager)
at com.ansca.corona.CoronaActivity.onPause(CoronaActivity.java:??)
Notes
Unity apps suspend/resume correctly on the same device.
Solar2D currently blocks the UI thread waiting for GL teardown, which now triggers the stricter ANR watchdog on Android 15.
Suggested Fix
Rework CoronaActivity → GLSurfaceView.surfaceDestroyed() handling.
Avoid blocking the UI thread in onPause; delegate GL teardown to the GL thread or defer until resume.
Similar approach already used by Unity and other engines to survive Android 14/15 lifecycle changes.