Skip to main content
natural_criticB837
Legend
November 18, 2015
Question

Android will crash / shut down on long script time (~2 seconds)

  • November 18, 2015
  • 0 replies
  • 2929 views

Hello,

we have a reproducible crash on the Samsung Galaxy S3 with a script that takes some seconds to execute. What happens is a cleanup of the lobby, followed by a creation of a high resolution Bitmap which is then used to create a texture in Starling.

The related log entry in the Android LogCat I believe is the following:

W/InputDispatcher(2349): channel ~ Consumer closed input channel or an error occurred. events=0x9

E/InputDispatcher(2349): channel ~ Channel is unrecoverably broken and will be disposed!


It looks like the reason is that the Android InputDispatcher has been frozen for too long and believes the application is unresponsive. I can avoid the error by splitting my code into chunks that I execute with delay, so that the InputDispatcher receives some love from the CPU in between.

However this makes the code a bit ugly and produces another source of error for asynchronous inapp events like a disconnect from our server while the initialization is happening, etc. so I was wondering is there a way to manually give the InputDispatcher a focus, something like NativeApplication.nativeApplication.sleep();

Thanks,

Ruben

This topic has been closed for replies.