[BUG] Development Branches Based on 0.3.0 - Rock Paper Game causes irrecoverable hang #38
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
zadammac/PETI#38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finally having a look at this, since fixing it is arguablly necessary (or at least convenient) in order to get the multifont support working with RockPaperGame.
As near as I can tell, all the operative code should work. However, we're only ever drawing the display once, and then never drawing it again. There's a beep that should play every frame which only triggers the once. We aren't, however, in an ISR; the heartbeat light tied to VCOM is still good.
I'm going to have to pick this up again at a later date but it may be necessary to re-engineer a good chunk of the minigame anyway. It's particularly byzantine.
This is corrected as of
0130b46f24This issue appears to still be present, in some form, on the latest firmware.
Probable cause found:
printTextLarge(a non-public function within display.c) exhibits unexpected behaviour when any givenDISPLAY_FRAME.lines[i].line[8]is not0x00. This can't normally happen because of a variety of reasons, mostly the extensive use ofstrcpyin other places where the large display font is called, or meticulous cleaning around the 8th index position.This was supposed to have been fixed in a past version to make printTextLarge behave nicely in these cases, but that fix was apparently never made.
Solution:
The previous comment is incorrect. The logic currently implemented in printTextLarge does not have the bug described.
I do believe though that this work is symptomatic of directly addressing individual characters in the various arrays for
DISPLAY_FRAME. For the sake of consistency I'm working on updating the entire minigame to use theWORK_STRINGmethod we're using in other places (likemain_game.c). Something about that seems to generally behave safer and is pushing around the point at which the crash happens. In theory once we've fully redeveloped the entire minigame, the bug will be gone.Efficient, no. MY SPEED? Exactly yes.
Resolved in the above commit/PR.