[raiguard][2.1.8] Linux X11 Drag to import does not work on non-minified JSON

This subforum contains all the issues which we already resolved.
Chindraba
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Wed Oct 13, 2021 7:11 pm
Contact:

[raiguard][2.1.8] Linux X11 Drag to import does not work on non-minified JSON

Post by Chindraba »

To ensure everything was correct with new versions and potential changes I launced a new game, switched to editor, placed 4 storage tanks and made a blueprint. I exported the generated string, standard and JSON, to files. I also minified the JSON into a third file. With the each file open in Kate, I highlighted the text and pulled it into the game.

The original compressed and encoded version of the string imported perfectly. The minified JSON imported just as well. The standard, pretty-print version of JSON - exactly what the game generated, failed with an error. The game gave some error type bong sound and a brief floating text message. It actually looks like there are at least two messages overlaid, though I can only see the top one for sure. (Attached)

The issue with pretty-print JSON is not limited to this one file, but the sample I tested with is in the 4-tanks.json file, attached.

What I expected is for the JSON text to be imported as a blueprint to either place or save in the library, same as the other formats of text

I tested this in a few random versions going back as far as 2.0.69 and it's all the same. Guessing it was this way from the beginning.

The attached log files seem entirely silent about the error.

Tested with in a new vanilla space age game and no existing blueprints. Though it also will fail in a non-expansion binary.

Space Age 2.1.8 binary test in space-age-factorio-current.log
Base 2.1.8 binary test in base-game-factorio-current.log
Attachments
base-game-factorio-current.log
Base game binary log file
(8.84 KiB) Downloaded 21 times
space-age-factorio-current.log
Expansion binary log file
(10.16 KiB) Downloaded 20 times
4-tanks.json
JSON blueprint text
(940 Bytes) Downloaded 24 times
Error message(s)
Error message(s)
Error-messages.png (8.6 KiB) Viewed 588 times
Chindraba
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Wed Oct 13, 2021 7:11 pm
Contact:

Re: [2.1.8] Linux X11 Drag to import does not work on non-minified JSON

Post by Chindraba »

Chasing down the file drop issue I also think I found the problem here.
The non-minified JSON is being treated as a separate file for each line, probably by SDL. The first 'file' is not a valid JSON string as are none of the 'file' entries, and each is causing an error. Also explaining the seemingly stacked error messages in the image.
Attachments
factorio-console-2.0.log
(72.31 KiB) Downloaded 20 times
User avatar
raiguard
Factorio Staff
Factorio Staff
Posts: 817
Joined: Wed Dec 13, 2017 8:29 pm
Contact:

Re: [raiguard][2.1.8] Linux X11 Drag to import does not work on non-minified JSON

Post by raiguard »

Thanks for the report, this has been fixed for 2.1.12.

Side note: In 2.1 regular copy/paste with large strings should work fine on X11.
Don't forget, you're here forever.
Chindraba
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Wed Oct 13, 2021 7:11 pm
Contact:

Re: [raiguard][2.1.8] Linux X11 Drag to import does not work on non-minified JSON

Post by Chindraba »

Th copy/paste, even for pretty printed JSON worked fine from the day of it's release. It was only the drag/drop of multiple lines which was an issue.

Confirmed fixed in 2.1.12.
Much thanks.
Post Reply

Return to “Resolved Problems and Bugs”