Stimulus images are not displaying/flickering

URL of experiment: Pavlovia

Description of the problem: Tried two seperate browsers so I know it’s not a browser issue, but I have been running this experiment with no display issues in PsychoPy v2020.1.3, pushed it to Pavlovia via Builder, and have been using the Web IDE to make edits directly to the script. This has been working pretty well, alongside using my browser’s dev tools to pinpoint errors. However, when doing a pilot run, I had the dev tool sidepane open when my image did not display. When I went to adjust my sidepane, the image displayed and quickly went away. I have inserted a gif below to demonstrate…
tableflip
I read a similar post that mentioned it could be an opacity issue, so just in case I have also included code for both my visual.rect and visual.ImageStim below and respectively:

solid4p = new visual.Rect ({
    win: psychoJS.window, name: 'solid4p', 
    width: [1.3, 0.2][0], height: [1.3, 0.2][1],
    ori: 0, pos: [0, 0.6],
    lineWidth: undefined, lineColor: new util.Color(undefined),
    fillColor: new util.Color(1.0),
    opacity: 1, depth: -2, interpolate: true,
  });
   stripe3p = new visual.Rect ({
    win: psychoJS.window, name: 'stripe3p', 
    width: [1.3, 0.2][0], height: [1.3, 0.2][1],
    ori: 0, pos: [0, 0.4],
    lineWidth: undefined, lineColor: new util.Color(undefined),
    fillColor: new util.Color(1.0),
    opacity: 1, depth: -3, interpolate: true,
  });
  picturesPractice = new visual.ImageStim({
    win : psychoJS.window,
    name : 'picturesPractice', units : undefined, 
    image : undefined, mask : undefined,
    ori : 0, pos : [0, 0], size : [1.2, 1.3],
    color : new util.Color([1, 1, 1]), opacity : 1,
    flipHoriz : false, flipVert : false,
    texRes : 128, interpolate : true, depth : -9.0 
  });

This is a really interesting issue, please let me know if I have overlooked anything!

How are you actually displaying the rectangles and images? I would use .setAutoDraw(True) as the Python in Begin Routine (having defined them in Begin Experiment. If you want to hide / redisplay then you could set AutoDraw as False to hide and True to redisplay.

I think that what you are seeing is that resizing your screen is forcing the stimuli to be redrawn.

@wakecarter You’re absolutely right! That is most certainly what is happening, however, I need that image to stay on the screen instead of going away immediately after it has adjusted to the new dimensions. Would changing my code to .setAutoDraw(True) still help me in this instance? What you’re seeing behind the image is a “frame” that lets the experimenter know the risk/injury involved in their particular activity and/or the reward/points they can earn during a given trial. So it’s supposed to be striped and it is supposed to appear behind the image.

I would recommend controlling the display of an object created in code during a trial using .setAutoDraw(True) when you want it to appear and .setAutoDraw(False) when you want it to dissappear. In End Routine, set all object autodraws to false.

I really wish that I could say that this solved my issue. Unfortunately, after looking through my html script it appears that when I pushed my experiment to Pavlovia, it set all the presentations of stimulus to set.AutoDraw to true…So I’m back to the drawing board on this issue.

How about setting auto draw to false for the one that’s wrong and then setting it to true again?

Hi, thank you for the explanation! I was wondering if this means that in the logfiles, autoDraw = True signals when the object was drawn, and autoDraw = False when the object was removed from the screen? By drawn I mean flipping, as far as I understand, but I may be wrong…