[open] Android runtime error
Hi Sebastiaan,
unfortunately the opensesame programme on the tablet (still Nexus 10) sometimes crashes giving me an "android runtime error". In the feedback it says, caused by "ANR Input dispatching timed out (Waiting because the touched window has not finished processing the input events that were previously delivered to it.)."
Do you have any idea what that means and how I can resolve that?
Best,
Anne

Comments
Hi Anne,
I'm not familiar with this error, but I think it might be related to Android's lifecycle management. Do you have an extensive
inline_scriptthat runs uninterrupted for some time? If so, perhaps Android decides that the app has become unresponsive and kills it. I would try repeatedly checking in with Android (for example at the end of eachwhileloop) , like so:To do this, you need to import the
androidmodule at the beginning of your script:Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
thanks, I added these lines and first thought it would work - however, it still crashes but gives another error message (crash, nativ crash). There is a huge event log list that I don't understand. I can't save it anywhere but only send it (to google?). Do you get the crash report then? Would be perfect if you could have a look at it. I'll have participants very soon and unfortunately the program on my tablet doesn't seem to run reliably.
Anne
Not sure if that helps...
Hi Anne,
If you send it to Google I can indeed see the event log in my Google Play developer account. However, it doesn't tell me much. It's a segmentation fault triggered in the low-level libraries of the Linux OS (Android = Linux). It's not a Python stacktrace that you get when there is a bug in OpenSesame itself (or in the experiment), which are quite informative and therefore relatively easy to debug. Here it is. Please also share it with @dschreij, maybe he can shine a light on it.
It also seems that this error is specific to your device or experiment, because the only error reports in my dev account seem to come from you. A Nexus 10 manta running Android 4.4, right?
It will be tricky to debug this, but let's give it a go:
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
thanks a lot, I might have found the cause of the crashes with the help of your questions. Thought back, the crashes occured from the beginning on - however, only occasionally. Meaning, the programme didn't crash for some participants, but did for others.
The crashes always appeared in the part of the experiment, where sounds (=search instructions) are played in the run script. In the "crash trial", it always crashes before the search display is shown.
I removed the sounds (they are not essential for the patients I'm testing now) and it has been working fine for a few hundred trials now.
Best,
Anne
PS: yes, Nexus 10 Android 4.4
Did it also occur before you updated to 4.4? Might have something to do with that, because when we tested it we never(?) had these crashes.
Good luck over there!
I had a few crashes before the update to 4.4, but they could have been related to the android's lifecycle management that Sebastiaan mentioned. I don't remember what the crash reports said. Daniel, when we tested we always just did a few trials. However, in most cases (also after I added the code for repeatedly checking in with Android in each while-loop), I found the programme crashing between trial 30-100 (just coincidence?).
I have no idea. I've never worked with android before your project, so I sadly have too little knowledge about this subject.