Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.ArgumentException: Version string portion was too short or too long. #72

Closed
ZeWaka opened this issue Jan 20, 2022 · 6 comments
Closed

Comments

@ZeWaka
Copy link

ZeWaka commented Jan 20, 2022

System.ArgumentException: Version string portion was too short or too long. (Parameter 'input')
   at System.Version.ParseVersion(ReadOnlySpan`1 input, Boolean throwOnFailure)
   at System.Version.Parse(String input)
   at IconDiffBot.Core.DiffGenerator.BuildDmi(String metadata)
   at IconDiffBot.Core.DiffGenerator.GenerateDiffs(Stream before, Stream after)
   at IconDiffBot.Core.PayloadProcessor.<>c__DisplayClass12_0.<<GenerateDiffs>g__DiffDmi|0>d.MoveNext()

a) The commit that caused the failure
goonstation/goonstation#7226
Skeletonman0/goonstation@45accdd
https://github.com/Skeletonman0/goonstation/blob/0cb66d9e0cd362feac9a5bfbf495446045057d0c/icons/turf/walls_ancient.dmi
https://github.com/Skeletonman0/goonstation/blob/0cb66d9e0cd362feac9a5bfbf495446045057d0c/icons/turf/walls_cave.dmi

b) The failed check run
https://github.com/goonstation/goonstation/pull/7226/checks?check_run_id=4876785039

@ZeWaka
Copy link
Author

ZeWaka commented Jan 20, 2022

Still reproduces in a re-ran check, so it's not completely transient: https://github.com/goonstation/goonstation/pull/7226/checks?check_run_id=4877898512

@SpaceManiac
Copy link
Contributor

SpaceManiac commented Jan 20, 2022

walls_ancient.dmi and walls_cave.dmi (walls_overgrown is fine) as of that commit has metadata that begins like:

# BEGIN DMI
version = 
	width = 32
	height = 32

when it should look like:

# BEGIN DMI
version = 4.0
	width = 32
	height = 32

Probably IconDiffBot should not crash here, and anyways should not be using System.Version to represent this field, which is not "the version number of an assembly, operating system, or the common language runtime".

@ZeWaka
Copy link
Author

ZeWaka commented Jan 20, 2022

Interesting, those were both created with Dream Maker, so I blame DM for generating a malformed file.
I'd definitely argue it shouldn't crash and default to 4, especially if the program is liable to omit such information.

@ArcaneMusic
Copy link

I've been running into the same issue on wall-nerds/wallening#83 .
I saw that the /tg/ cutting tool that we were using for this (Which apparently also runs into the same issue with tables as it does with walls!) wasn't adding the version variable as an argument. However, by manually adding that version 4.0 to the file through tweakPNG, it now claims that all of those files are now out of date... AND still can't be read by icondiffbot! Except for the pizza walls, for some reason.
icerock_wall.zip
I don't know how much of it is my end and how much of it is from trying to force a solution, but I found this issue now after working on this for about an hour.

@Imaginos16
Copy link

walls_ancient.dmi and walls_cave.dmi (walls_overgrown is fine) as of that commit has metadata that begins like:

# BEGIN DMI
version = 
	width = 32
	height = 32

when it should look like:

# BEGIN DMI
version = 4.0
	width = 32
	height = 32

Probably IconDiffBot should not crash here, and anyways should not be using System.Version to represent this field, which is not "the version number of an assembly, operating system, or the common language runtime".

Ran into an extremely similar issue when doing PR #69147, but tweakpng seems to have fixed it. Unfortunately for Arcane's case, doing so did not fix his.

@ZeWaka
Copy link
Author

ZeWaka commented Aug 3, 2023

Fixed by tgstation/icon-cutter#11

@ZeWaka ZeWaka closed this as completed Aug 3, 2023
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

No branches or pull requests

4 participants