Yes, but my code forces the old output to be delayed by one sample.or does not do this?
however the code was only to reproduce the problem.
trogluddite ·
Yes, this is very odd.
I can reproduce the crashes - not every time, but at least 50% of the time.
Even weirder, I saved the .osm - when reloaded, the code refused to output anything except '#.IND' no matter what input I enter; sometimes a recompile sorts it out, sometimes not.
Put both assignments in stage(2), and everything is fine. I tried just swapping the stage(2) and (3) parts, in case the compiler didn't like having them declared in the wrong order - but that makes no difference.
So, I looked at the assembly from the code text output - looks fine at first glance. Pasted it into an ASM primitive, and it still crashes.
I noticed that it uses a lot of register eax, just like array accesses do, and I remembered that array accesses usually push eax to the stack so that the code can't alter the register value, then pop it out at the end. Sure enough, I added 'push eax' at the start of the stage3 part, and 'pop eax' at the end - and it now seems to work as expected.
Would also explain why infuzion can paste when it's not connected - a register 'error' would only happen with the code running.
Can anyone else comfirm this ASM behaviour? - my machine can be a bit funny with small code blocks in isolation (soundcard driver only likes BIG code 😕 ), would be nice just to check before mailing Malc.
trogluddite ·
Nope - I can still make it crash!
So I guess it must be a problem with the stages somehow.
trogluddite ·
Just had a mail from Malc - he has a fix for this working for the next update; the trig functions' table pointers were only correct for the default stage(2).
Wrote something here? To have a post removed or your name hidden, write to [email protected].