Bug Fix: crash on importing invalid waterfall palette files#328
Merged
Chris-AC9KH merged 2 commits intoJun 13, 2026
Conversation
prevent std::terminate() → abort() if the file is invalid or contains too many colors - fix directory structure and move waterfall to JS8_UI
wmiler
approved these changes
Jun 13, 2026
Joe-K0OG
approved these changes
Jun 13, 2026
Joe-K0OG
left a comment
Collaborator
There was a problem hiding this comment.
Tested on Linux and Windows, and works fine on both - no more crash, and a nice message indicating an incorrectly formatted .pal file. Thanks Chris!
73,
-Joe-
K0OG
Collaborator
Author
|
It also worked fine on MacOS, built locally here. It was an easily duplicatable issue so was able to get a local stack trace, which pinpointed the problem and made it easy to find. |
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.
We had a classic uncaught exception in import_palette() that has evidently been there forever. So I put a guard on it. I found the same thing potentially exists in export_palette. It is unlikely that one would ever trigger but I put a wrapper on it anyway to be safe.
At the same time I moved the waterfall stuff to JS8_UI, which I evidently missed when I did the source code refactor a few months ago. It has a .ui file associated with it, so it belongs in JS8_UI
Fixes #326