Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] Android runtime error

edited February 2014 in OpenSesame

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

  • edited 6:53AM

    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_script that 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 each while loop) , like so:

    if android:
        if android.check_pause():
            android.wait_for_resume()
    

    To do this, you need to import the android module at the beginning of your script:

    try:
        import android
    except ImportError:
        android = None
    


    Cheers!
    Sebastiaan

  • edited 6:53AM

    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

  • edited February 2014

    Not sure if that helps...

    image

    image

    image

  • edited 6:53AM

    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:

    • You have been working on this experiment for a while, right? Did you experience these crashes from the beginning or did they suddenly start occurring. If the latter, when did this happen?
    • When do the crashes occur? Are they totally random, or is there some pattern or a particular 'risk moment' during the trial?
    • The error log mentions something about sound playback. Do you do something special with sound playback?

    Cheers,
    Sebastiaan

  • edited 6:53AM

    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.

    ....
    self.fixdot.show()
    self.sleep(1000)
    self.instructions.show()
    exp.items['color'].run()
    exp.items['orientation'].run()
    self.sleep(1000)
    
    from openexp.mouse import mouse
    my_mouse = mouse(exp)
    my_mouse.set_visible()
    
    target_loc_x = exp.get("target_loc_x")
    target_loc_y = exp.get("target_loc_y)
    
    finger_on_start_square = False
    ##while loop: search display is only shown after pps have finger on grey bar at the bottom of the display
    while not finger_on_start_square:
        self.sleep(1000)
        pos = my_mouse.get_pos()[0]
        pressed = my_mouse.get_pressed()[0] 
        if pressed and pos[0] > xc-barwidth/2 and pos[0] < xc+barwidth/2 and pos[1] > exp.height - barheight:
            finger_on_start_square = True   
        if android:
            if android.check_pause():
                android.wait_for_resume()
    RT_start = exp.canvas_conj.show()
    ...
    

    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

  • edited 6:53AM

    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!

    Buy Me A Coffee

  • edited 6:53AM

    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?).

  • edited 6:53AM

    I have no idea. I've never worked with android before your project, so I sadly have too little knowledge about this subject.

    Buy Me A Coffee

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games