New strange error: Display is different in fullscreen vs. no fullscreen

URL of experiment: Cued Colsing [PsychoPy]

Code: Han Zhang / Cued Color Singleton Task · GitLab

Description of the problem: I have a visual search task where each trial shows 5 identical shapes and 1 unique shape (e.g., 1 circle and 5 diamonds). Subjects are asked to look for the unique shape. On some trials, one non-target shape can appear in a different color. E.g.:
image

In builder, I created 6 diamonds and 6 circles and used a condition file to determine which item will show (opacity 1 or 0) and in which color (red or blue).

Here is the condition file (circle/diamond 0 is always target and circle/diamond 1 is always distractor, item positions are shuffled on the start of a trial):

trial_type target_color target_shape other_shape distractor_color opa_circle0 opa_diamond0 opa_circle1 opa_diamond1 opa_circle2 opa_diamond2 opa_circle3 opa_diamond3 opa_circle4 opa_diamond4 opa_circle5 opa_diamond5
P blue circle diamond red 1 0 0 1 0 1 0 1 0 1 0 1
P red circle diamond blue 1 0 0 1 0 1 0 1 0 1 0 1
P blue diamond circle red 0 1 1 0 1 0 1 0 1 0 1 0
P red diamond circle blue 0 1 1 0 1 0 1 0 1 0 1 0
A blue circle diamond blue 1 0 0 1 0 1 0 1 0 1 0 1
A red circle diamond red 1 0 0 1 0 1 0 1 0 1 0 1
A blue diamond circle blue 0 1 1 0 1 0 1 0 1 0 1 0
A red diamond circle red 0 1 1 0 1 0 1 0 1 0 1 0

The experiment works fine in psychopy but not on Pavlovia. On some random trials, it would show like this:
image

Thus, the distractor has the same shape as the target, which is not intended (it should’ve been a diamond). The color of the distracting item is specified independently from the rest. So the only reason I can think of is that the color variable somehow changed which shape is rendered (strange!)

Magically, exiting fullscreen (pressing F11) on these problematic trials will correct the display! That is, the red circle will magically change to a red diamond once exiting fullscreen mode!

Two more observations: (1) the problem appears to be random. On some trials it works fine. (2) I started to have this problem after the recent update to the PsychoJs library

Any idea why? Thanks!
Han

Browser: Chrome 87.0.4280.88
OS: Windows 10 64 bit

Hi @hanzh, very helpful breakdown, thanks for flagging, looks like you hit an opacity setting bug. Could you check the fork below is 100% error free before I send you a merge request to incorporate the relevant changes into your project? Cheers, s.

Hi @sotiri,

The items are rendered correctly now. Thank you so much for the fix! In the future how can I avoid this bug in the builder? Thanks.

Hi @hanzh, no problem, I will discuss this with my colleagues tomorrow and am hoping we can have a permanent fix in place before too long, at which point I will be following up here to let you know. Many thanks for your patience, x

1 Like

Hi @hanzh, PsychoPy 2021.1.4 is just out with a permanent fix for dynamically adjusting opacity in JS so you should no longer have to rely on any custom patches for that, x