HISE crashes when setOnGridChange(true, onGrid) is used
-
I can run the following code without any issues, but when I change the last line to true (so the function runs synchronously), HISE crashes immediately.
Has anyone else experienced something like this?
I’m wondering if this is a known issue or if I might be doing something wrong.const var th = Engine.createTransportHandler(); th.setSyncMode(1); th.setEnableGrid(true, 5); inline function onGrid(grid) { Console.print(grid); } th.setOnGridChange(false, onGrid); // works fine // th.setOnGridChange(true, onGrid); // crashes HISE -
I figured it out.
In case someone else gets stuck at this point. When calling synchronously, the parameters of the function must be complete:const var th = Engine.createTransportHandler(); th.setSyncMode(1); th.setEnableGrid(true, 5); inline function onGrid(grid, timestamp, first) // Parameters need to be complete { Console.print(grid); } th.setOnGridChange(true, onGrid);