triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.33k stars 391 forks source link

Tile Image Reconstructor Not Reconstucting BaseTiles #3348

Open ghost opened 6 years ago

ghost commented 6 years ago

While using the in-game map creation tools recently, I stumbled across a potential bug in the Tile Image Reconstructor utility. The utility seemingly worked correctly, but the final image it produced, while the correct size, did not contain any of the base tile images, but was a blank file.

Engine version

TripleA Version 1.9.0.0.10030

My Operating System

macOS 10.13.3

Can you describe how to trigger the error? (eg: what sequence of actions will recreate it?)

From the main menu, select "Run the Map Creator" > "Other: Optional Things" > "Run the Tile Image Reconstructor"

Instead of this error, what should have happened?

The utility should have used the base tiles in the baseTiles folder and the correct height and width I provided to recreate the map's base tile original image from the small tile images.

Any additional information that may help

This error has been reproduced in multiple versions of masOS and Mac OS X, not just High Sierra. If I select the option to draw the polygons, it correctly draws the polygons, but still fails to reconstruct the original base tile image with the small tile images.

RoiEXLab commented 6 years ago

@theredbaronaaa Could you figure out if this is a recently introduced bug, and if so tell us the version it was introduced?

ghost commented 6 years ago

@RoiEXLab All I can say is that I had similar problems with this around version 1.8.0.5 (early 2015). I have not tried to use it again until just now, thus why I am only reporting it now. From my digging, it looks like the feature itself was introduced in 1.7.0.1, based on the change log at the time. So to answer your question, no, to the best of my knowledge, it is an old bug.

RoiEXLab commented 6 years ago

Ok, that's good to know.

panther2 commented 6 years ago

@RoiEXLab @theredbaronaaa FWIW, It works fine here, using 10030 on Win7.64.

RoiEXLab commented 6 years ago

3355 Could potentially fix this issue.

I hope it gets rewieved soon, so you can test if this issue was actually fixed soon.

ghost commented 6 years ago

@RoiEXLab Testing this again with 1.9.0.0.10046 and the console open, as I omitted that last time. Here is the log, which looks normal:

Setting memory for new triplea process to: 2G
TileImageReconstructor Log

Saving as /Users/username/Desktop/map.png ... 

Wrote /Users/username/Desktop/map.png

All Finished!

The resulting file, as before, is a blank PNG with the correct height and width. I'll be on hand to test your PR #3355 once it is merged. I hope that fixes it.

ghost commented 6 years ago

@RoiEXLab I just tested again with 1.9.0.0.10053, which contains the changes you made in #3355. Unfortunately, the fix did not help the problem and produced the same console output.

I am wondering if the log I provided could help diagnose the problem more accurately. @panther2 do you have a log from Win 7.64 with a working Tile Image Reconstructor that you could compare to my log in the comment above? I'm thinking now, and if I remember correctly, there should be an item in the log for each individual base tile image that is added to the reconstructed image. If this is the case, I think that narrows the search of the problem to the step where the folder containing the baseTiles is selected. As I stated before, the program can accurately draw polygons, so selecting an individual file works fine. Thoughts, anyone?

panther2 commented 6 years ago

@theredbaronaaa This is how it looks here:

TripleA engine version 1.9.0.0.10030
Setting memory for new triplea process to: 2G
TileImageReconstructor Log

Drew 0_0.png

...

Drew 14_7.png

Saving as D:\Daten\triplea\downloadedMaps\world_war_ii_v3-master\map\testmap.png ... 

Wrote D:\Daten\triplea\downloadedMaps\world_war_ii_v3-master\map\testmap.png

All Finished!

I left out all those Drew X_Y.png (...) information.

So it looks like maybe on MAC-OS the tiles are either not found or not correctly processed (without logging that explicitly).

RoiEXLab commented 6 years ago

@panther2 I think he meant the logs that appear when setting the "show all logs" setting to true. I can confirm that there is more in the log on windows than in the log @theredbaronaaa posted. Haven't looked at the details yet though.

panther2 commented 6 years ago

Sorry, @RoiEXLab , I edited my above comment while you were posting. I found the information in the console, as there indeed is not any specific log-file.

RoiEXLab commented 6 years ago

@theredbaronaaa Looking at the code again it doesn't seem like there should be an issue that's mac-only. The most likely explanation for this is that you are selecting the wrong folder, like for example the map folder instead of the baseTiles folder or similar as @panther2 already assumed. If that's not the case I'd appreciate it if you could create some detailed reproduction steps or record a short video showing the complete process.

panther2 commented 6 years ago

This is how I do it, maybe it is helpful at this point:

tile

ghost commented 6 years ago

@panther2 @RoiEXLab I can confirm that the process looks exactly the same on the Mac and that I filled it out exactly like that. Perhaps the problem is with the Mac file selector for the process, which I assume has differences with Windows under the hood. That is the only other possibility I can think of.

stale[bot] commented 5 years ago

The TripleA team regrets this issue was not solved sooner. To keep focus on latest issues and the most pressing tasks, this issue has been automatically marked as stale because it has not had recent activity. If the issue may be closed, please do so. If there are remaining items, we encourage for those items to be resubmitted as new, independent, concise tasks. The strategy is divide and conquer. Thank you for your contributions.