Skip to content

launcher: stop bumping the scriptlet mtime and forcing a full scan on every launch - #5

Closed
tramch wants to merge 1 commit into
KindleModding:masterfrom
tramch:fix/launcher-no-full-scan
Closed

tramch wants to merge 1 commit into
KindleModding:masterfrom
tramch:fix/launcher-no-full-scan

Conversation

@tramch

@tramch tramch commented Sep 16, 2026

Copy link
Copy Markdown

Fixes #4.

go_callback called utimes() on the scriptlet and set com.lab126.scanner doFullScan on every launch. The scan then sees a modified .sh and emits SCANNER_UPDATE, which extractor/main.c handles as remove_file() + index_file() — the cc.db entry is deleted and re-inserted under a new UUID. In that window the entry is "Black-listed content – In progress", the indexer loops on DELETE work items for it (Indexer_Dump_*.txt in /mnt/us), and KPPMainApp's native-thread freeze watchdog fires (dmcc bundles in /documents, white screen / home reload loop, occasionally the troubleshooting screen). Reproduced on a Colorsoft (042-juno_1906_seabreeze_bellatrix4-483218) on five separate days; worst when a launch follows a USB unplug (a full scan is already running) or is followed by a quick exit.

This removes the bump. Cost: the scriptlet no longer jumps to the front of the Recent sort after a launch. If that's wanted, an in-place lastAccess update on the existing entry would achieve it without a rescan — happy to do that as a follow-up.

Tested by reading the code paths only; I can't cross-compile here, so the CI cross-build will cover it. On-device evidence (syslog timeline, indexer dumps) is in #4.

… every launch

Every launch called utimes() on the scriptlet and set com.lab126.scanner
doFullScan. The scan then saw a modified .sh and emitted SCANNER_UPDATE,
which the extractor handles as remove_file() + index_file(): the cc.db entry
is deleted and re-inserted under a new UUID. In that window the entry shows
up as "Black-listed content - In progress", the indexer loops on DELETE work
items for it, and the home app's native-thread freeze watchdog fires
(dmcc bundles in /documents, Indexer_Dump_*.txt in the root, white screen /
home reload loop, sometimes the troubleshooting screen). Reproduced on a
Colorsoft (042-juno_1906_seabreeze_bellatrix4-483218) on five separate days;
the only thing the bump bought was moving the scriptlet to the front of the
Recent sort.

Fixes KindleModding#4
@tramch

tramch commented Sep 16, 2026

Copy link
Copy Markdown
Author

@yubaix thanks for looking. Closed without a note, so I'm not sure which way you'd like this to go — is the per-launch full scan intentional and you'd rather keep "bring to front", or would you prefer the fix on the extractor side (make SCANNER_UPDATE an in-place update instead of delete + re-insert, so the entry never goes through the "In progress" blacklist window)? Either is fine by me; #4 is still reproducing on the Colorsoft and I'm happy to rework this whichever way fits the project.

@ThatHackerDudeFromCyberspace

Copy link
Copy Markdown
Member

This PR doesn't fix the issue properly imo, I'll fix it myself, most likely tomorrow

@tramch

tramch commented Sep 16, 2026

Copy link
Copy Markdown
Author

@ThatHackerDudeFromCyberspace Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scriptlet gets blacklisted by content catalog, indexer loops and framework crashes

2 participants