Dear psychopy community!
We’ve encountered a strange issue with code executed “each frame” (in builder).
Our intention is to measure joystick deviations at each frame. Thus, we have code in the “each frame” part of the builder/code component. This worked fine on one computer, but setting it up on another computer, we observed that under exactly the same conditions, we get systematically different amount of measurements. Although it was the same program and the different monitors have the same frame rate (60Hz), the timing of each frame was different.
In a more simple test experiment, we included a measurement of the time that passes for each new frame. In the “correct” computer, this seems fine and we have the expected ~240 measurements and the measured frame time for each switch is ~16ms.
For the “problem” computer, however we observe the following (see output list below). In the first ~2 sec of each trial, it seems to be correct (~16ms per frame), but then it suddenly switches to 33ms per frame. Depending on other things (more code/load) this happens earlier or later.
The weird thing is that the “correct” computer is a lower specs laptop with no dedicated graphics card. But the “issue” computer has higher specs (8GB RAM, dedicated graphics card, etc.). We have this issue with the newest Psychopy Version 3.1.2
It seems this issue is not connected to the monitor of the “issue” computer. As it works fine with the same monitor on the laptop. It is always 60 Hz. Framerate in the output file is 60. There was no warning about any issue related to frame rates at the end of the experiment.
What could be a potential reason for it?
program with test code : test_issue.psyexp (6.2 KB)