Skip to content

Conversation

@frigoref
Copy link
Member

No description provided.

@frigoref
Copy link
Member Author

Linked to issue #13383 (and newest one #13817).
So far at least the map name should be posted in the issue, but the file itself units/missing_unit_image.png I cannot find anywhere. It is odd to me that no map has such a file, but the TripleA code explicitly refers to it.
From my perspective there are 3 options to proceed here:

  1. A generic (missing unit) file is provided and reused in each map
  2. Each map would need to be enhanced to include such a (missing unit) file
  3. This (missing unit) file should never be tried to be read and probably UnitImageFactory#getIcon should be reworked to no use method createNoImageImage
new ImageIcon(
                getTransformedImage(imageKey).orElseGet(() -> createNoImageImage(imageKey))));

@DanVanAtta : Suggestions?

@DanVanAtta
Copy link
Member

fwiw, the no-image image is here: https://github.com/triplea-game/assets/blob/master/game_headed_assets/units/missing_unit_image.png

That is a new 2.6 feature (maybe 2.7), where if an image is not found then we display the place-holder image instead.

I suspect the previous code to set 'null' in shutdown was correct. Perhaps the issue might be that the error during map launch fired before the time when we set the map name. TODO here, check when/where the error was triggered relative to when we set the map name for error reporting. Strong suspicion that we set the map name after the point in time when the error was triggered, so we may need to move "up" the set of map name (assuming there are no blockers)

@DanVanAtta
Copy link
Member

To repro, take any game/map and delete one its image files (an image file that for sure is displayed when the map loads). That should trigger the "no-image" loading logic.

@DanVanAtta DanVanAtta removed their assignment Nov 2, 2025
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.

2 participants