Repository navigation
libdmview_open: read the view whole, close it, then make the view - #20
Merged
Merged
Conversation
The .dmv stayed open while the view was made of it - which loads its fonts and images, seconds at a board's start. FatFs locks a file open for reading against writing: sending a new view to the card (dmod-boot's install-all, right after the board started) was cancelled at carhmi.dmv, being shown just then. The file is read into memory and closed first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
libdmview_open()kept the.dmvopen for the whole time the view was being made of it. That includes loading its fonts and images, which takes seconds at a board's start.FatFs (
FF_FS_LOCK) does not let a file that is open for reading be opened for writing. So sending a new view to the card right after the board started (dmod-boot'sinstall-all) was cancelled atcarhmi.dmv, which dmview was opening just then:Now the file is read whole into memory and closed, and the view is made from that buffer; the buffer is freed afterwards. The file is locked only while it is read (≈85 KB for carhmi's view). Fonts and images were already opened, read and closed one by one.
Test plan
ctest: all passymodem_send.py --wait 90 build/sdcardstraight away (whatinstall-alldoes). Without the fix this is cancelled atcarhmi.dmv: header, reproduced. With it, all 46 files go through, twice in a row.🤖 Generated with Claude Code