PennController for IBEX › Forums › Support › Experiment stuck in empty state
- This topic has 2 replies, 2 voices, and was last updated 2 years, 9 months ago by Elise.
-
AuthorPosts
-
December 17, 2021 at 7:43 am #7626EliseParticipant
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,
EliseDecember 17, 2021 at 11:07 am #7627JeremyKeymasterH 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
December 18, 2021 at 7:21 am #7628EliseParticipantHi Jeremy,
This is great solution! Thanks a lot!
Happy holidays,
Elise -
AuthorPosts
- You must be logged in to reply to this topic.