processing-android icon indicating copy to clipboard operation
processing-android copied to clipboard

App crashes after onStop() with P2D

Open hunterkiddo opened this issue 6 years ago • 8 comments

Hi, I'm using P2D in my fullscreen() because the default renderer runs my app at around 20 fps, whereas P2D can render it in full 60+ fps. However, a bug now occurs. When I press the "Recents" button or the home button to move the app to the background, onPause() and onStop() get called as normal, but onStart() and onResume() never get called when the app returns to the foreground. The screen remains black for a while, then the notification shows up that the app isn't responding and the console error "That's weird. Proc 801 got signal 3, but there's no stack trace" gets thrown.

Running the default renderer does everything correctly, but the app is unbearable in it, so I'm wondering if this is a bug and if there's a workaround?

hunterkiddo avatar Oct 26 '19 05:10 hunterkiddo

I'm currently working around this by killing the process in onStop()

@Override public void onStop() { println("supposed to stop, killed the process instead to avoid processing crash bug"); android.os.Process.killProcess(android.os.Process.myPid()); System.exit(1); }

which is similar code I used for restarting after deleting any save progress; it just makes the app restart when it is recalled to the foreground. That's intensely more acceptable than a completely unresponsive, black screen app. Still wondering if there's a better way to do it, but if anyone else is having the problem, this has been my pseudo-solution.

hunterkiddo avatar Oct 27 '19 18:10 hunterkiddo

@hunterkiddo thanks for reporting this issue, and the workaround, I will tag it for the next bugfix release (4.1.1) since I'm uploading 4.1 just now!

codeanticode avatar Oct 29 '19 18:10 codeanticode

@codeanticode hey, is there a way to get the 4.1.1 bugfix, since the update isn't in processing? I need to use the console again. Thanks for looking at all these issues

hunterkiddo avatar Nov 08 '19 07:11 hunterkiddo

Version 4.1.1 should be available for downloading through the Contributions Manager in the PDE.

codeanticode avatar Nov 10 '19 06:11 codeanticode

@codeanticode image image

hunterkiddo avatar Nov 10 '19 23:11 hunterkiddo

That's odd. You can download and install v4.1.1 manually from here:

https://github.com/processing/processing-android/releases/tag/latest

until the release shows up in the CM.

codeanticode avatar Nov 10 '19 23:11 codeanticode

Actually if you install version 4.1 through the CM, you will actually get 4.1.1. Somehow the CM has not updated to reflect the new version yet, although the files are from the latest release.

codeanticode avatar Nov 11 '19 00:11 codeanticode

I just did it from the link you sent so I didn't have to uninstall and reinstall, thank you

hunterkiddo avatar Nov 11 '19 05:11 hunterkiddo