Study stuck at start dialogue box

Hello everyone,

I’d like to build an online study, but before uploading the whole thing, I wanted to test the functions first that I need to run it properly. So I build a simple “study” containing most of my functions (written in Python & JS code), a text screen that just displays a word stored in variable “test” and then a line where the variable “test” is assigned a value by using one of the functions.

So far, I could make everything work, but currently every time I try to run the study on Pavlovia (in piloting mode), it gets stuck right at the start when the info dialogue box is displayed, and my dev tools disconnect so I can’t see why it crashes. I also get an error code 5 after a few seconds, but I’m connected to the Internet and Pavlovia is also responding when I’m pinging it.

There’s JS code for everything (so that’s not the issue) and from just looking at my code, I’d say everything should be fine. Does anyone know why this happens and how I can fix it?

Thanks in advance for any hints / help with this!

Merle

language_nback_t2.psyexp (14.2 KB)

Hi @Merle,

You can find out more information about the error by right clicking anywhere on the screen when the screen is stuck, which will open the console. Then, at the top of the window that will pop up, click on ‘Console’ which will display any error messages and point you in the right direction.

You can find our documentation on online troubleshooting here, and it is always worth bookmarking @wakecarter’s amazing crib sheet :slight_smile:

Hope these help!

Kim

1 Like

Hi @Kimberley_Dundas,

thanks for your hints!
I already did that, but the console doesn’t display any errors because the developer tools completely disconnect. I also already checked both crib sheets but I still don’t find the error.

I suspect this has something to do with the PsychoPy version I’m using - I had to download v2021.2.3 because the current version isn’t compatible with my OS (I have an old computer & can’t update to the newest OS). I just don’t get why it isn’t working if my JS code looks okayish (at least to me).

If you have any other ideas on how to troubleshoot this, let me know! :slight_smile:

Merle

Please can you change the study to running, add a few credits and post the run link? Then someone else could check the console on their computer. (Probably not me because I’m mostly on my phone while on holiday )

Sure, here’s the link: language_nback_t2 [PsychoPy]

The whole thing works btw if I don’t use the range or the repeat function I defined in JS_packages and prep_functions, so I guess they are causing the problem (the repeat function is also calling range btw) - I just don’t get why.

Here’s the current version of the “study” again:
language_nback_t2.psyexp (15.7 KB)

Thanks for your support! :slight_smile:

Please could you post your code for those functions here?

This is the range function:

// range
range = function(start, end) {
    var get_next_val, return_list, a;
    get_next_val = true;
    return_list = [];
    a = start;
    while ((get_next_val === true)) {
        return_list.push(a);
        a = (a + 1);
        if ((a == end)) {
            get_next_val = false;
        }
    }
    return return_list;
}

And this is the repeat function:

// repeat
repeat = function(value, times) {
    var new_list;
    new_list = [];
    if (value.isArray) {
        for (var t, _pj_c = 0, _pj_a = range(0, times), _pj_b = _pj_a.length; (_pj_c < _pj_b); _pj_c += 1) {
            t = _pj_a[_pj_c];
            for (var val, _pj_f = 0, _pj_d = value, _pj_e = _pj_d.length; (_pj_f < _pj_e); _pj_f += 1) {
                val = _pj_d[_pj_f];
                new_list.push(val);
            }
        }
    } else {
        for (var t, _pj_c = 0, _pj_a = range(0, times), _pj_b = _pj_a.length; (_pj_c < _pj_b); _pj_c += 1) {
            t = _pj_a[_pj_c];
            new_list.push(value);
        }
    }
    return new_list;
}

Are these in Begin Experiment?

Yes

Hi @Merle,

Thanks for providing the link to your study - @wakecarter I’ve tried running it from a couple of my devices and I can’t access the dev console either. When OK is pressed the screen enters full screen mode, the GUI stays on screen, there’s a brief pause there and then for me the overall Google ‘something’s gone wrong’ screen appears.

Thanks for testing this @Kimberley_Dundas, that’s exactly what’s happening on my devices, too!

What error messages are in the developers console?

None at all, it disconnects as soon as OK is pressed: