Skip to content

Fix startup crash: missing icon resources (NPE in GUI.start) - #28

Open
overcuriousity wants to merge 1 commit into
pawlaszczyk:masterfrom
overcuriousity:fix/missing-resources
Open

Fix startup crash: missing icon resources (NPE in GUI.start)#28
overcuriousity wants to merge 1 commit into
pawlaszczyk:masterfrom
overcuriousity:fix/missing-resources

Conversation

@overcuriousity

Copy link
Copy Markdown

Summary

FQLite 5.0 crashes immediately on launch (tested with a Linux jpackage build):

Caused by: java.lang.NullPointerException
        at java.base/java.util.Objects.requireNonNull(Unknown Source)
        at fqlite.base.GUI.start(GUI.java:578)

Line 578 loads /icon24_lighthouse.png, which is not present in resources/. A sweep over all getResource/getResourceAsStream calls in src found four more lookups pointing at files missing from resources/ — those crash as soon as a database is opened (tree node icons) or the Lighthouse map is shown (splash).

Fixes

Resource Situation Fix
icon24_lighthouse.png (toolbar, GUI.java:578) never in repo use existing icon24_location.png (same cell-tower feature)
gray_database24.png (db tree node) deleted in 4.1 (d687b12) restored from git history (468cf09)
journal-icon.png (journal tree node) deleted in 4.21 cleanup (682be07) restored from git history
gray_archive24.png (WAL tree node) never in repo use existing wal-icon.png
lighthouse_logo.png (map splash) never in repo splash skipped gracefully when artwork missing

If original lighthouse artwork exists somewhere outside the repo, adding icon24_lighthouse.png / lighthouse_logo.png to resources/ would of course also work — this PR just makes the app run with what the repo contains.

Independent of #27 (RPM packaging), but found while testing the RPM from that branch.

🤖 Generated with Claude Code

Version 5.0 crashes at launch with a NullPointerException in
GUI.start (GUI.java:578): the toolbar loads /icon24_lighthouse.png,
which does not exist in the resources folder. Three more lookups were
broken the same way and would crash as soon as a database is opened
or the Lighthouse map is shown:

- /icon24_lighthouse.png (toolbar): never existed; use the existing
  icon24_location.png, which belongs to the same cell-tower feature.
- /gray_database24.png (db tree node): was deleted in the 4.1 cleanup;
  restored from git history (commit 468cf09).
- /journal-icon.png (journal tree node): was deleted in the 4.21
  cleanup (682be07); restored from git history.
- /gray_archive24.png (WAL tree node): never existed; use the existing
  wal-icon.png instead.
- /lighthouse_logo.png (map splash screen): never existed; the splash
  is now skipped gracefully when the artwork is absent instead of
  throwing from Objects.requireNonNull.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant