Has there been an update to the way JS handles redrawing the screen?

Hi @ivobivo, does the fork below work as intended? Thanks, x

1 Like

@sotiri, yup, it does. Perfect. What do I have to do to make my scripts work like that?

Hey @ivobivo, OK great, thanks for confirming. I have created a merge request for you to accept the relevant fix into your project. Please note that if you now edit the project in PsychoPy and export for Pavlovia, you would need to again tweak lines 5-11 in your main script to import from ‘custom-lib’. Soon enough a permanent fix should be in place and I will be making sure to follow up here to inform you. Please let me know if you come across any more issues, s.

1 Like

Thanks @sotiri, for the amazing support. Merged the project and everything works fine. However I have couple of other tasks that broke in the same way, so I’ll have to apply your tweak with lines 5-11to them as well. Will try it later on today or tomorrow. Thanks!

Sorry to bother again with the same issue @sotiri, but I have another script, basically identical though instructions are in swedish. I changed lines 5-11 in the .js file, but it is stuck on “initialising experiment” if I try to run it (uploading two screenshots, one with the change in code and one with the issues the console shows). It seems as it is not findings the custom libraries that fixed the previous script. Shouldn’t your fix basically work on any script that exhibits the problem? Especially since both scripts are identical in terms of code.

Hi @ivobivo, I think you’re right, can you double check the ‘custom-lib’ folder containing those scripts is in place? s.

Ah, didn’t realize you added a whole folder to the script. I’m an idiot! I will just move the folder to every script’s directory + change the 5-11 lines of code. Will get back to you if it doesn’t work. But it should. Thanks again!

Hi @sotiri, now it is working on any script. Thanks!

1 Like

Hi @sotiri, it seems like I spoke too early. Indeed your fix worked for some of the scripts. However, my main task is still broken. I’ve created a minimal script and an online experiment using your ‘custom-lib’ directory. Locally it works as intended (click on the red square reveals the counter under it). However, trying to run it online I get error message that to me seems to be related to the custom libraries. Here attaching two screenshots that maybe help:


minimal_counter.psyexp (14.5 KB)

Hi @sotiri. Any chance you could look at the JS errors I posted yesterday? I understand you are quite busy, so I’m sorry if I’m being inpatient and you were planning to answer at a later point anyway.

Dear @ivobivo, not a bug, the problem is you are trying to access startTime2.getTime() ahead of giving it a value? :blush:

1 Like

@sotiri OK thanks so much. Problem is on my end then.

Hi,
I am having a related problem with my study that Im hoping you may be able to help with.
Everything was working ok a week or so ago, but today I suddenly encountered a problem where one of my stimuli is being drawn over the top of everything.

It is a dynamic search study so I have a picture stimuli (an occluder) with a small circular mask that lets participants search through the occluder as they move their mouse around. Until now I have managed to get some of my other stimuli to be drawn over the top of this occluder (i.e. instructions, clickable buttons). But now this occluder is being drawn over the top of everything in the routine!

Any advice on how to get around this would be great

Elle

Hi @EJJ, could you share your repository with me so I can take a look? Thanks, s.

Yes sure, this is the project:

Hi @EJJ, as it happens certain performance improvements recently brought into PsychoJS have inadvertently led to issues in cases where visual stimuli attributes, such as position or opacity, remain constant, but are set in Builder to update on each frame. Please accept our apologies for the mishap.

One simple solution here would be calling psychoJS.window._fullRefresh() just before exiting the loops affected. I have created separate code components to that end for the WarmUp and Test routines. Is the support team fork working as expected? The fix is part of the .psyexp. Here to help, thanks, s.

1 Like

sorry for the slow reply, but yes this is great and has fixed my problem!
Thank you :slight_smile:

No problem, good to hear, happy coding :sunny:

Hi,
I am having also a problem in the last days. I run an experiment on pavlovia about three months ago. When I now run my experiment, it randomly freezes at the end of a moviestim routine. The experiment runs smoothly during sampling and was not updated during this time.
On the contrary, when I run the same experiment in local it runs smoothly.
What could have caused this problem? Were there any updates to the pavlovia platform that may have caused this problem?

Hi @NunzioL, could you send me a link to your repo? Thanks, s.