Experiment stuck in empty state

PennController for IBEX Forums Support Experiment stuck in empty state

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #7626
    Elise
    Participant

    Hi Jeremy,
    I implemented a SPR in which before half of the trials three memory words appear. To make the same trial structure possible for these two types of items, I created a timer element that ensures that either the memory words are shown for 3000ms or a blank screen is shown for 1ms:

    newText("MemoryList",row.MemoryList)
                .print()
                ,
            newTimer("wait", row.Timer)
                .start()
                .wait()
                ,
            getText("MemoryList")
                .remove()
                

    After the timer ends, the script should proceed to the fixation cross and dashed sentence. However, from time to time the script randomly stops before the fixation cross is shown. One cannot proceed then and has to abort the experiment. Thanks to the log in the debugger, I could understand that it seems like the wait command is not fulfilled such that it cannot proceed to the fixation cross:

    [12:35:5]
    wait (Timer) Action command 'wait' running, params: [null]
    (newTrial: 30-experimental)
    [12:35:5]
    wait (Timer) Action command 'start' running, params: [null]
    (newTrial: 30-experimental)
    

    This does not happen in every run through the experiment, so it is quite hard to debug. But this has only happened on trials for which the timer duration was 1ms, so my suspicion is that it might have something to do with the asynchronous behavior of javascript. Can you think of any race conditions? If this is the case, I could just increase the timing to 10ms, but I first wanted to hear whether you have any thoughts on the cause of the problem.

    This is the link to my experiment: https://farm.pcibex.net/r/izMMsc/

    I would really appreciate your help on this.

    Best,
    Elise

    #7627
    Jeremy
    Keymaster

    H Elise,

    I can’t seem to reproduce the problem myself, but if you don’t want to include a Timer element for certain rows, simply use a different value like NA in the “Timer” column and do this:

    newText("MemoryList",row.MemoryList).print()
    ,
    ( row.Timer=="NA" ? null : newTimer("wait", row.Timer).start().wait() )
    ,
    getText("MemoryList").remove()

    This way you shouldn’t have any issues with ultra rapid timers

    Jeremy

    #7628
    Elise
    Participant

    Hi Jeremy,

    This is great solution! Thanks a lot!

    Happy holidays,
    Elise

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.