Hard crash in 0.2.1B with SSPR

Publicado 2024-08-06

Not sure if it was already reported, but I have a really simple code that PICO-8 seems to not like at all.

I was doing some test with SSPR, and every time I try to run the cart, PICO-8 just crash.

I'm probably doing something really wrong, but that should not crash PICO-8 :D

Here is the code:

Interestingly, it seems to "work"with the current web version (at least it does not crash and print the time)


Also just tried with the windows version it also crash.

Here is, what I think is the relevant info from the crash log generated by Mac OS X:

Please tell me if you need/want more info, but I'm pretty sure you can reproduce that issue.

Edit: It seems to be related with the number of SSPR call. If I lower the value for the loops it does not crash

Edit2: yup if I force a flip() in the middle, it does not seems to crash (though it slow down the thing by a huge factor, so it may not hit the issue)

Not sure how you handle the drawing commands, but if you have a queue for each frame, I may just push too many commands ?

Edit3: No I should not do PICO-8 stuff when I should sleep. My parameter order are wrong, so it must try to read at an invalid memory area. Seems your memory access are not protected
I'm not sure if it is the sprite SX/SY that cause the issue or the sprite size (SH/SW) or a mix of both. Too tired right now to run a more extensive test on that

Can't say exactly for sure what is the combination, but if I fix SH and let SW change with the math in my code, it will crash