fix(reporter): degrade to the placeholder image when a resource property is unset - #63
Merged
Merged
Conversation
…rty is unset
Resources.loadImage(fname) built "/" + fname and looked that up
regardless of whether fname was null, so a missing property produced
the literal path "/null" - Resources.class.getResource("/null")
returns null, and the method threw FileNotFoundException("/null")
instead of falling back to its own placeholder image the way it
already does for a genuinely-missing-but-named resource.
RES_BANNER_IMAGE/RES_SERVER_ICON only exist in a downstream consumer's
crashreporter.properties (cr-terasology, cr-destsol, ...), not
cr-core's own crashreporter_defaults.properties - so GlobalProperties.get()
returning null for those keys is an expected, not exceptional, case
whenever cr-core runs standalone (confirmed while testing runInteractiveTest:
this is exactly what crashed RootPanel's banner image lookup).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Aug 22, 2026
BenjaminAmos
requested changes
Aug 22, 2026
BenjaminAmos
approved these changes
Aug 22, 2026
This was referenced Aug 22, 2026
4 tasks
soloturn
added a commit
that referenced
this pull request
Aug 22, 2026
…l-fname javadoc A merge picked up a shortened version of this comment from master (which doesn't have the fuller explanation from #63). Restoring it.
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
Resources.loadImage(fname)built"/" + fnameand looked that up regardless of whetherfnamewasnull, so a missing property produced the literal path"/null"-Resources.class.getResource("/null")returnsnull, and the method threwFileNotFoundException("/null")instead of falling back to its own placeholder image the way it already does for a genuinely-missing-but-named resource.RES_BANNER_IMAGE/RES_SERVER_ICONonly exist in a downstream consumer'scrashreporter.properties(cr-terasology,cr-destsol, ...), notcr-core's owncrashreporter_defaults.properties- soGlobalProperties.get()returningnullfor those keys is an expected, not exceptional, case whenevercr-coreruns standalone. Confirmed while testingrunInteractiveTest: this is exactly what crashedRootPanel's banner image lookup and stopped the reporter dialog from ever rendering when run outside a downstream consumer.Test plan
./gradlew build- clean.Related
runInteractiveTestto actually render end to end for fix(reporter): include every log file in the PasteBin upload #56/fix(reporter): pre-fill the GitHub issue form with a crash summary #58/fix(reporter): sort log tabs alphabetically instead of by creation time #59/fix(reporter): remove the "Go to Forum" button and link #60 manual testing.