You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
If you let "sprites5.bbc" run for a while, then interrupt with ESC, and then CHAIN "sprites2.bbc", it can crash #13
Added VDU 23,27,16 to clear the screen and reset the sprite system
That seems to crash if called more than once after running SPRITES_5.BAS
Indicates some issues with malloc/free, possibly the bitmaps.
Lennart Benschop has also noted that it crashes if running for more than a couple of minutes. I can replicate this.
Also: - sprites_4.bas crashes, though it will run a lot longer before it does - sprites_3.bas is fine; that only has 1 frame per sprite - triangles.bas crashes in MODE 2 after 30 seconds or so
The fault can be fixed in sprites_2.bas by adding an extra line (345 of the below snippet)
320 VDU 23,27,4,I%: REM Select sprite I%
330 VDU 23,27,5: REM Clear frames for current sprite
340 VDU 23,27,6,0: REM Add bitmap 0 as frame 0 of sprite
345 VDU 23,27,6,0: REM Dummy frame 1 for this sprite seems to fix the crash
350 VDU 23,27,11: REM Show the sprite
Seems to indicate an issue with the sprite engine when a sprite is assigned less frames than previous.
Fix:
Set the current sprite frame to 0 and make invisible when clearing the sprite(s).
Activity
breakintoprogram commentedon Feb 25, 2023
I'm able to replicate this.
Note that it does not seem to happen if you LOAD then RUN sprites_2 instead of CHAIN
breakintoprogram commentedon Feb 25, 2023
Added VDU 23,27,16 to clear the screen and reset the sprite system
That seems to crash if called more than once after running SPRITES_5.BAS
Indicates some issues with malloc/free, possibly the bitmaps.
breakintoprogram commentedon Mar 26, 2023
Lennart Benschop has also noted that it crashes if running for more than a couple of minutes. I can replicate this.Also:- sprites_4.bas crashes, though it will run a lot longer before it does- sprites_3.bas is fine; that only has 1 frame per sprite- triangles.bas crashes in MODE 2 after 30 seconds or sobreakintoprogram commentedon Mar 26, 2023
This is looking like the increased throughput of the comms is overflowing something in FabGL.Potential fix:- VGAController->enableBackgroundPrimitiveExecution(true)- VGAController->enableBackgroundPrimitiveExecution(false)And also:- Canvas->waitCompletion(false) after lengthy drawing operations like triangle, circlebreakintoprogram commentedon Mar 26, 2023
The above fixes have not resolved the original issue. Forked this issue breakintoprogram/agon-vdp#28
breakintoprogram commentedon Mar 27, 2023
The fault can be fixed in sprites_2.bas by adding an extra line (345 of the below snippet)
Seems to indicate an issue with the sprite engine when a sprite is assigned less frames than previous.
Fix:
Set the current sprite frame to 0 and make invisible when clearing the sprite(s).