• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

Advocate ,
Nov 18, 2015 Nov 18, 2015

Copy link to clipboard

Copied

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

TOPICS
Development

Views

2.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines