Inquisit 4 Web - The first trial in each block sometimes freezes


Author
Message
Zhang Chen
Zhang Chen
Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)
Group: Forum Members
Posts: 3, Visits: 13
Hi all,

 I'm using inquist 4 web for my online study. In the study participants simply need to press the space bar then a picture will be presented immediately. The program works fine on my computer, but once I uploaded the script online, sometimes the program kind of freezes for the first trial of each block. That is, after pressing the space bar, sometimes it takes very long to display the picture. From the second trial on the program runs very smoothly and there is no delay. Did anyone encounter this problem before? Is there a way to go around this problem?


 

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Would you please share (at least the relevant portions of) your code? And the link to your web experiments launch page?

Zhang Chen
Zhang Chen
Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)
Group: Forum Members
Posts: 3, Visits: 13
Hi Dave,

 thanks for your quick reply!

 Here is the link to my study http://research.millisecond.com/inq2bsiweb/Paintings.web

And below is part of the code I used in this study. Basically what I did was ask participants to press the space bar twice, and a shape called canvas  would change its size based on the number of pressing, then a painting would appear. The shape.frame and picture.curtain are only to make the task more like pulling a curtain and revealing a painting.

<shape frame>
/ color = (0,0,0)
/ size = (530, 530)
/ position = (50%,50%)
/ erase = false
</shape>

<picture curtain>
/ items = ("curtain1.bmp", "curtain2.bmp")
/ size = (500, 500)
/ position = (50%,50%)
/ erase = false
/select = values.CurtainNumber
</picture>

<shape canvas>
/ color = (255,245,225)
/ size = (values.CanvasSize, 500)
/ position = (50%,50%)
/erase = false
</shape>


********************************************************
                  Low Effort Trials
********************************************************
<trial LearningLE>
/stimulusframes = [1=frame,curtain, canvas]
/validresponse = (" ")
/ branch = [values.CountPress = values.CountPress + 1]
/ branch = [values.CanvasSize = values.CanvasSize + 250]
/ branch = [if (values.CountPress < 2) trial.LearningLE]
/ branch = [if (values.CountPress == 2) trial.ObjectLE]
</trial>

<picture ObjectLE>
/items = LowEffortObjects
/select = noreplace
/size = (500,500)
/position = (50%,50%)
</picture>

<trial ObjectLE>
/stimulusframes = [1=ObjectLE]
/validresponse = (noresponse)
/timeout = 2000
/ontrialend = [values.CountPress = 0]
/ontrialend = [values.CanvasSize = 0]
/ontrialend = [values.PressDuration = 0]
/branch = [trial.BlankScreen]
</trial>

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
The problem is in the way you assign files to the respective <picture> / <item> elements only at runtime. See,

<picture ObjectHE>
/items = HighEffortObjects
/select = noreplace
/size = (500,500)
/ position = (50%,50%)  
</picture>

references

<item HighEffortObjects>
</item>

which is empty. Up front, nothing tells Inquisit which or how many picture files will be involved and thus none will have been downloaded to the client machine prior to starting the experiment.

Only when all this stuff

<block Counterbalance1>
/ onblockbegin = [item.HighEffortObjects.item = "1.bmp"]
/ onblockbegin = [item.HighEffortObjects.item = "2.bmp"]
/ onblockbegin = [item.HighEffortObjects.item = "3.bmp"]
/ onblockbegin = [item.HighEffortObjects.item = "4.bmp"]
/ onblockbegin = [item.HighEffortObjects.item = "5.bmp"]
/ onblockbegin = [item.HighEffortObjects.item = "6.bmp"]
/ onblockbegin = [item.HighEffortObjects.item = "7.bmp"]
/ onblockbegin = [item.HighEffortObjects.item = "8.bmp"]
/ onblockbegin = [item.HighEffortObjects.item = "9.bmp"]
/ onblockbegin = [item.HighEffortObjects.item = "10.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "11.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "12.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "13.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "14.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "15.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "16.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "17.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "18.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "19.bmp"]
/ onblockbegin = [item.LowEffortObjects.item = "20.bmp"]

/ timeout = 1000
/ onblockend = [values.CurtainNumber = 1]
</block>

has been executed and

<trial ObjectHE>
/stimulusframes = [1=ObjectHE]
/validresponse = (noresponse)
/timeout = 2000
/ontrialend = [values.CountPress = 0]
/ontrialend = [values.CanvasSize = 0]
/ontrialend = [values.PressDuration = 0]
/branch = [trial.BlankScreen]
</trial>

is first run will the actual file be downloaded. Hence the delay. The files simply aren't on the client machine yet.


The dirty workaround is to add a dummy <picture> element to the script that has all files involved as items but will never actually be used to make sure the files are available on the client *prior to the script's execution*:

<picture dummypictoforcedownload>
/ items = allpics
[...]
</picture>

<item allpics>
/ 1 = "1.bmp"
[...]
/ 20 = "20.bmp"
</item>

Ultimately, though, I would recommend revising the design. Runtime item assignments such as those in the <block> element highlighted above are rarely necessary / usually can be avoided.

I would also *strongly* recommend converting your files to a compressed image format such as JPG. Your use of unnecessarily large, uncompressed bitmap files (*.bmp) is likely to cause undue download times for your participants.




Zhang Chen
Zhang Chen
Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)Partner Member (868 reputation)
Group: Forum Members
Posts: 3, Visits: 13
Hi Dave, thanks so much for your suggestions! I shall try them out!
jbfleming
jbfleming
Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)
Group: Forum Members
Posts: 46, Visits: 75
I get a momentarily "frozen" first trial in IATs as downloaded from Inquisit, when used as part of a web experiment.

Doesn't always happen. But if there is a fix, it would be good to know about (and include in the versions available for download).

John

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
> Doesn't always happen.

That would indicate that it's not an issue with a particular script, but something else going on (e.g. the Inquisit window not having input focus). Do you have any further details?

jbfleming
jbfleming
Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)Guru (11K reputation)
Group: Forum Members
Posts: 46, Visits: 75
I don't, it was something I encountered in testing. Maybe I'll run through it again with a fake participant ID just to see if it happens to me. But I don't think it has anything to do with the window not having focus, the plugin kind of takes over the screen. The process would have been I finished one section of the study, then the window would close for half a second while the next one opened and popped up. Then the instructions would be displayed, and then I would hit SPACE or whatever to start the trials, and THEN there would be a noticeable freeze before the first block would come up.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search