Page 1 of 1

[0.17.25] Crazy bug [bad mod zip - no notice??!]

Posted: Sat Apr 06, 2019 9:12 pm
by nuhll
So i came across a very dumb and annoying bug, i dont know why, but i had 3 ACTIVE (!!) mods which were failing to load (silently) over the last X hours of gameplay :cry:

I just looked in current factorio log and saw 3 lines ala:" Could not load modname.zip, Bad Zip" (or something like this)

I mean its ok. But its not OK that you dont get a notice about it. The mods showed ALWAYS perfectly fine in the mod overview (!). I deleted them and redownloaded them and everything working fine.

So please, add a notice when something like this happens and DISABLE these mods. :!:

Re: Crazy bug [bad mod zip - no notice??!]

Posted: Sun Apr 07, 2019 12:41 am
by Shogal
Ideally, sha1 of downloaded mods should be checked. There is sha1 field for every mod version returned by mod portal api, so if something bad happens during download (network problem or firewall software bug) causing wrong hash - this file should be discarded and download process should be re-attempted (after n failed attempts an error should be thrown) rather that silently trusting downloaded file and marking mod download as successful.

Re: [0.17.25] Crazy bug [bad mod zip - no notice??!]

Posted: Wed Apr 24, 2019 7:33 am
by Rseding91
Thanks for the report however I can't reproduce having a mod fail to load and still showing up in the in-game mods GUI.

When a mod fails to load (the zip is corrupt in some way) the game treats it as "not a mod - some garabge zip file/unknown zip file) and ignores it.

Re: [0.17.25] Crazy bug [bad mod zip - no notice??!]

Posted: Wed Apr 24, 2019 9:12 am
by nuhll
I should have saved these files i guess. And or log, But i ddint know it was a bug, only when i deleted them i found out it was... (because then it was working)


Is it possible to display a message to the user if "garbage" in mod directory is found? Maybe with a "ignore" option?

Re: [0.17.25] Crazy bug [bad mod zip - no notice??!]

Posted: Fri May 17, 2019 10:21 am
by ssilk
I have the same bug:

Code: Select all

...
1.137 Graphics options: [Graphics quality: normal] [Video memory usage: all] [Light scale: 25%] [DXT: low-quality]
   1.137                   [Max load threads: 32] [Max texture size: 4096] [Tex.Stream.: 0] [Rotation quality: low] [Color: 16bit]
   1.432 Error ModManager.cpp:793: Mod package read error. Opening zip /Users/ssilk/Library/Application Support/factorio/mods/deadlock-beltboxes-loaders_2.1.12.zip failed: Bad zip file
   1.446 Error ModManager.cpp:793: Mod package read error. Opening zip /Users/ssilk/Library/Application Support/factorio/mods/FARL_3.1.9.zip failed: Bad zip file
   1.745 Loading mod settings ModuleInserter 4.0.5 (settings.lua)
...

Code: Select all

~/Library/Application Support/factorio/mods » zip -T FARL_3.1.9.zip                                                                                                                                                         ssilk@ssilkPro2-4
	zip warning: missing end signature--probably not a zip file (did you
	zip warning: remember to use binary mode when you transferred it?)
	zip warning: (if you are trying to read a damaged archive try -F)

zip error: Zip file structure invalid (FARL_3.1.9.zip)


~/Library/Application Support/factorio/mods » zip -T deadlock-beltboxes-loaders_2.1.12.zip                                                                                                                                  ssilk@ssilkPro2-4
	zip warning: missing end signature--probably not a zip file (did you
	zip warning: remember to use binary mode when you transferred it?)
	zip warning: (if you are trying to read a damaged archive try -F)

zip error: Zip file structure invalid (deadlock-beltboxes-loaders_2.1.12.zip)

The error seems to come from an Auto-Update. I removed the files by hand and I tried to reload them from mods.factorio.com

Code: Select all

~/Library/Application Support/factorio/mods » zip -T FARL_3.1.9.zip                                                                                                                                                         ssilk@ssilkPro2-4
test of FARL_3.1.9.zip OK
------------------------------------------------------------
~/Library/Application Support/factorio/mods » zip -T deadlock-beltboxes-loaders_2.1.12.zip  
 ssilk@ssilkPro2-4
test of deadlock-beltboxes-loaders_2.1.12.zip OK

Reason: Unknown. Some hickup on a storage?

Re: [0.17.25] Crazy bug [bad mod zip - no notice??!]

Posted: Sat May 25, 2019 11:02 pm
by nuhll
Did the game load the maps without notice (but without mod?)