Closed 123marvin123 closed 2 years ago
@Jyers
I had a look at the changes to the function. They all mostly seem to be formatting and cleanup, but if you've tested and found that my function works when copied into the upstream code, then my best guess would be some error caused by len = _MIN(pos, 30);
Marlin uses a well-tested method for displaying a scrolling status message which is a good guide on how to draw a continuously scrolling (and repeating) message, such as a long filename. I'd recommend re-implementing Draw_Print_Filename
following the methodology in the code associated with STATUS_MESSAGE_SCROLLING
— which also properly counts the number of UTF-8
characters and advances the scroll the appropriate number of bytes when dealing with UTF-8 characters.
I'm currently getting my fork setup with a fresh branch based on the latest bugfix so I can easily PR fixes and features. Once I have everything sorted I can start working to get some PRs going.
I can confirm Display firmware crash with long filename.
This issue has had no activity in the last 60 days. Please add a reply if you want to keep this issue active, otherwise it will be automatically closed within 10 days.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Did you test the latest
bugfix-2.0.x
code?Yes, and the problem still exists.
Bug Description
When printing something on the Ender 3 V2 using the recently merged Jyers UI, the printer firmware will crash when the rolling filename (which displays the name of the currently printed file) reaches it's last character.
Bug Timeline
New bug, NOT happening on Jyers fork of Marlin
Expected behavior
The rolling filename should continue displaying the whole filename and the printer should continue executing GCode.
Actual behavior
When the last character of the filename (which moves from right to left on the screen) reaches the left side of the screen, the printer / lcd freezes for one second and then reboots.
Steps to Reproduce
Version of Marlin Firmware
On commit 0f61d9e4dd4d4e4f27e5c688ab2c5dbd0f03af84 of bugfix 2.0.x branch
Printer model
Creality Ender 3 v2
Electronics
Stock board
Add-ons
None
Bed Leveling
UBL Bilinear mesh
Your Slicer
Prusa Slicer
Host Software
SD Card (headless)
Additional information & file uploads
The issue occurs in the
CrealityDWINClass::Draw_Print_Filename
function and I want to emphasize that this issue does not occur in the Marlin fork by Jyers. I copied over the Draw_Print_Filename function and the problem is fixed, so there must be something going on inside of this function which causes the crash.