"Pause" issue

PennController for IBEX Forums Support "Pause" issue

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #6719
    Rick
    Participant

    Hi Jeremy,

    I have one quick question. Every time I run my experiment, there will be “pause” randomly appearing among the trials.
    Is this the issue of my coding, or the server is buffering to proceed the expeirment?

    pause

    Thanks!

    Rick

    #6720
    Jeremy
    Keymaster

    Hi Rick,

    Can you provide more details about this “pause”? What form does it take? Is it a screen (blank, or with some message) between two trials, or does the experiment stay on one screen for longer than it should before moving on to the next one? Can you still interact with the page?

    If the “pause” is a screen saying “Preloading, please wait” then this means that you have an Audio/Image/Video/Youtube element somewhere that points to a file that cannot be found. A somewhat common situation is when, inside a Template command, you mean to use such an element pointing to a file referenced in a column for a subset of trials only, but your code in fact creates the element for all trials, regardless of whether you end up using it and whether the column indeed points to a (valid) file. If you randomize all the trials, then the preloading message will appear randomly. See an example with this experiment (https://farm.pcibex.net/r/zcfiUJ/) containing this faulty Template command because the “Image” column of the second row of the table does not point to a valid image:

    Template( row => 
      newTrial(
        newText( row.Question ).print()
        ,
        newVar("showImage")
          .set( row.ShowImage )
          .test.is( "Yes" )
          .success( newImage( row.Image ).print() )
        ,
        newScale("answer", "Yes", "No")
          .button()
          .print()
          .wait()
      )
    )

    What you should do instead is this case is:

    newText( row.Question ).print()
    ,
    ...( row.ShowImage == "Yes" ? [
        newImage( row.Image ).print() 
    ] : [] )
    ,

    Let me know if you have questions

    Jeremy

    #6721
    Rick
    Participant

    Hi Jeremy,

    Thanks for you quick reply!

    The “pause” is just like what I attached here (it is a safe link, picture is stored in my google drive). It is a message appearing on the left of the screen and disappear automatically after 2 seconds or so. I’m not sure what you mentioned is my problem, because from your demostration link I see the experiment stucks there. The demostration link for my experiment is https://farm.pcibex.net/r/aYaGAh/. You will come across the “Pause” screen randomly.

    Rick

    #6723
    Jeremy
    Keymaster

    Hi Rick,

    I see, it’s an actual screen that literally displays “pause” on the page. Would you mind making your project clonable, so I can open it and help you troubleshooting it? I added the option to turn that off because people like having that option, but honestly there really are very few occasions where making your projects non-clonable brings you anything (people who don’t have your demonstration link cannot access your project, and you’ll give the data-collection link to your participants anyway)

    EDIT: I looked up the source code of your experiment in the meantime and noticed you have added a few custom functions/scripts to your project, one of those being:

    function modifyRunningOrder(ro) {
        for (var i = 0; i < ro.length; ++i) {
            if (i % 10 == 0) {
                // Passing 'true' as the third argument casues the results from this controller
                // to be omitted from the results file. (Though in fact, the Message controller
                // does not add any results in any case.)
                ro[i].push(new DynamicElement(
                    "Message",
                    { html: "<p>Pause</p>", transfer: 1000 },
                    true
                ));
            }
        }
        return ro;
    }

    I don’t know why it’s there, it’s definitely not something that’s included in default PennController experiments, but in any case, its effect is to add a (native-Ibex) Message controller every ten trials that says “Pause” and stays on the screen for 1s. Just delete that code and the problem will go away

    End EDIT

    Jeremy

    • This reply was modified 3 years, 1 month ago by Jeremy. Reason: looked up source code and identified cause of problem
    #6725
    Rick
    Participant

    Hi Jeremy,

    Thanks soooo much! I’m very sorry for my late reply! Yes, that’s exactly the problem. I don’t know why there is a .js file called “Modifyorder” there in Modules (maybe because we tried different ways to modify trial order at the beginning and forgot to delete it and then thought it as PCIbex system message…T-T so careless…lesson learned..sorry for wasting your time), and “Pause” disappeared after I had deleted it. We really really appreaciate for your help! (Also I promise you I will make the project clonable next time if I send post here, I didn’t know how it works so..)

    Have a good night!

    Rick

    • This reply was modified 3 years, 1 month ago by Rick.
    #7328
    AlexY
    Participant

    Hi Jeremy,

    I have encountered the problem you described in this reply: some of my participants saw the “Preloading, please wait” screen and was stuck there for a while before they could proceed. Before I published the experiment, I made sure to try and do all the groups once to make sure there wasn’t any technical issue. After getting reports from some participants, I checked the csv file and the zipped file to make sure the names in the csv file corresponded to the audio filenames.

    Would this message trigger from the participants’ end?

    Here is the experiment link.

    Thanks!

    Alex

    #7330
    Jeremy
    Keymaster

    Hi Alex,

    I don’t think there’s anything wrong with your experiment. I suspect that the zip file failed to download for some of your participants. Do you know if those participants were able to hear the audio files after seeing the preloading message? Could it be that those participants in particular all live in a specific region (your zip file is on a US Amazon server, which may very well be inaccessible from Mainland China, for example)

    Jeremy

    #7331
    AlexY
    Participant

    Thank you, Jeremy! Some of them waited until the next trial started and they could hear the audio files. Some just gave up while waiting. It seems that the participants who experienced this issue were all from Hong Kong. So it’s probably the inaccessibility.

    Thank you very much again!

    Alex

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