data-only simulation causes "Maxmum call stack size exceeded" error
Hi, I have quite a long experiment and am not able to use the "data-only" simulation mode.
Here's the error message:
Here's a minimal experiment that causes the error:
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/[email protected]"></script>
<script src="https://unpkg.com/@jspsych/[email protected]"></script>
</head>
<body></body>
<script>
let jsPsych = initJsPsych();
let trial = {
timeline: [
{
type: jsPsychHtmlKeyboardResponse,
stimulus: "test",
choices: ["a"],
}],
repetitions: 900
};
jsPsych.simulate([trial]);
</script>
</html>
I am happy to help fixing this, but I do not know where to start. I am guessing the simulation would have to be run in an iterative way, that does not grow the call stack as much.
Thanks, this is really helpful information.
We are getting close to publishing version 8, and I suspect that this is likely fixed in version 8 due to the overhaul to the timeline implementation code. I'll work on adding a test case to verify that it is fixed.
We've confirmed that this is no longer an issue in version 8.