Page 1 of 1

JSON error in (old, but disabled) mod crashes game

Posted: Fri Jul 15, 2016 11:58 pm
by Jürgen Erhard
0.624 Error Util.cpp:57: JSON parser error in package metadata: C:/Factorio 0.13 all mods/mods/autorequesttologisticchestrequester_1.0.2.zip/info.json(8): invalid code sequence

Suggested fix: mod interface needs a big helping of robustness. In Python, I'd "just" put a big try:except: around it ;-) C++? Been ages since I last touched that.

The error in the mod is that it uses literal line breaks in a string, which is invalid JSON. But it worked in 0.13.8. Not mentioned an update to the JSON library, I guess. Which seems reasonable, sort-of. Changelogging is hard, let's play Factorio. ;-)

Re: JSON error in (old, but disabled) mod crashes game

Posted: Sat Jul 16, 2016 12:44 am
by daniel34
info.json
Image

Re: JSON error in (old, but disabled) mod crashes game

Posted: Mon Jul 18, 2016 11:36 am
by Klonan
This isn't a bug, you're just doing it wrong, don't put line breaks in the json

Re: JSON error in (old, but disabled) mod crashes game

Posted: Mon Jul 18, 2016 11:37 am
by HanziQ
It's not valid JSON, so this is not a bug. Also putting a try/catch block to "fix" it doesn't really help with robustness, it just ignores meaningful errors.

Re: JSON error in (old, but disabled) mod crashes game

Posted: Mon Jul 18, 2016 12:55 pm
by Jürgen Erhard
So, you consider it better to just have the game crash, completely?

I can understand and accept it getting a *way* low priority at this point. But frankly, the mod loading needs to be more robust.

Oh, for one, I didn't write this mod. For another, I put quotes around "just" for a reason... and added a smiley too, for the same reason.