[Bug] Can't Save in Editor

Started by FOXX, March 22, 2017, 12:39:59 PM

Previous topic - Next topic

FOXX

So i have encountered a nasty little thing.
I was busy with a map as i have done before and i couldn't save the map anymore.
I put some units extra in [and remove later] tried to add some land but i couldn't save the map.
The only thing that worked was unpause and pause really quickly and i could save but messed up the start a little bit.
Did someone else have this and more important -> is there a solution to this?
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

Dark Ambition

I have encountered this as well, and it is annoying and I don't know how to make it not happen.

Also, when this does happen, just hit "N" to advance the game a single frame, instead of unpausing and risking the start conditions of the map.

FOXX

#2
Yeah, and i don't know what 'triggered' it to happen.
I'm almost sure i didn't do things i haven't done before.

For now that 'N' key seems the solution.
Thanks Dark Ambition for this for the future.

This situation set be back 30 mins so can save time in the future.
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

FOXX

So, today this happened again in a map i am working on.
When i noticed i couldn't save i immediately made a copy of the save file. [save1]
Then i pressed N so i could save the game and made another copy. [save2]

In this case no harm done but i decided to put it up because of the 2 different ?!?! save files.
Maybe it has some info inside.
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

Karsten75

Can you re-create it using the save1  file? If so, make sure to save and attach the log file.

FOXX

Ohh, i think i forgot the most Important file to add.
Thanks for pointing that out K.
Going to try if i can do the same things as before and see if it happens again.

If it happens the next time i will make sure i include both Log files.

The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

FOXX

I have tried 2 times to make the previous happen again but didn't happen.

But now i have broken the Editor completely since i can't save at all.
Not even after running for a while. Just can't save anymore. Luckily no harm done again.
This time it happened in my Image Test Map and the only thing i have in this save is the Image.
Another thing is i have this map running for more than 2 hours.
Save AND Log included this time and i have a feeling it has something to do with the Image Script.
[Save 1 and Log 1]

Tired to Finalize and didn't have the Name and Description set. So i made a name and description and cleared the time and now i can save.
[Save 2 and Log 2]


The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

Karsten75

#7
From a Problem determination perspective that's a good set of info. The game logs show an exception. (String is too long)??

I've pinged Virgil and hopefully he'll be able to fit it in to the myriad of distractions that currently is making it hard for him to give his full attention to any of his games. :)

Thanks for taking the effort to produce the logs.

In the meantime, it's my guess that your map is too complex. Something in it. (maybe the scripts?, maybe the number of objects - who knows) is simply too big for the underlying software to handle.

Edit: the crash happens after a ship is being saved?

BuildShipButton.WriteData() s = Ship8

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

NBT_InvalidArgumentException: String is too long


If you are running (or have run) any of the mods that allow for larger ships, you are on your own. :) Virgil did not make the game to support some of those modifications and extensions.

knucracker

There is a 64k limit on string serialization.  So if a string exceeds 65535 in length, there will be a problem. This is coming from the string serialization code I use. It uses an unsigned short to specify the length of the serialized string.  Note that the limit is per string, not per save file.

Looks like Mandelbrot.prpl has a really large single string being loaded into imageY. Looks like mandelbrot data if I sit far enough back from my monitor and take my glasses off. :)  So, the only way I see to fix it would be to break that string up into different strings where no single string is greater than 64K.


FOXX

#9
Quote from: Karsten75 on August 10, 2017, 11:28:09 AM
From a Problem determination perspective that's a good set of info. The game logs show an exception. (String is too long)??

I've pinged Virgil and hopefully he'll be able to fit it in to the myriad of distractions that currently is making it hard for him to give his full attention to any of his games. :)

Thanks for taking the effort to produce the logs.
No Problem, also thanks for thinking along Karsten.

QuoteIn the meantime, it's my guess that your map is too complex. Something in it. (maybe the scripts?, maybe the number of objects - who knows) is simply too big for the underlying software to handle.

Edit: the crash happens after a ship is being saved?

BuildShipButton.WriteData() s = Ship8

(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)

NBT_InvalidArgumentException: String is too long


If you are running (or have run) any of the mods that allow for larger ships, you are on your own. :) Virgil did not make the game to support some of those modifications and extensions.

With the last save there where only Image Scripts involved. So this kinda narrows it down. And i am pretty sure in the other cases no big ships.
As a matter of facts -> I have used quite some Big Ships in my Maps and so far No issues with those.

I don't really know where that Ship8 thing comes from.
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

FOXX

#10
Quote from: virgilw on August 10, 2017, 12:11:07 PM
There is a 64k limit on string serialization.  So if a string exceeds 65535 in length, there will be a problem. This is coming from the string serialization code I use. It uses an unsigned short to specify the length of the serialized string.  Note that the limit is per string, not per save file.

Looks like Mandelbrot.prpl has a really large single string being loaded into imageY. Looks like mandelbrot data if I sit far enough back from my monitor and take my glasses off. :)  So, the only way I see to fix it would be to break that string up into different strings where no single string is greater than 64K.
I see.
So this beloved Script has a minor thing.
I will see if i can find a workaround in the future.
Or cut down on size. I will see.

Thanks for the explanation Virgil.

Greets
FOXX


Edit -> Forgot to say an important thing. I had that Mandelbrot.prpl Script running [along with others to try things] before i found out i couldn't save.
The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS

GoodMorning

Since it's unlikely that V loads an entire script to a string at once, it's probably possible to rewrite a little and provide the data by copy/paste into the script body, rather than the input. This should prevent the entire string from being required. Alternatively, you can run the calculation in PRPL.
A narrative is a lightly-marked path to another reality.

Karsten75

This is part of what he'd done in that script.

GoodMorning

#13
Consider an eyebrow raised.

Edit: I've written a Mandelbrot script to help with this, with a thread in MM,SB&C.

[Linkified the reference  - K75]
A narrative is a lightly-marked path to another reality.

FOXX

Quote from: Karsten75 on August 10, 2017, 06:36:44 PM
This is part of what he'd done in that script.
I have had longer ones without knowing that the String could be to long.
The DragonSnake is the longest i had.
So maybe it's best i cut down a little in size.
Thanks again for thinking along :)

Quote from: GoodMorning on August 10, 2017, 06:56:53 PM
Consider an eyebrow raised.

Edit: I've written a Mandelbrot script to help with this, with a thread in MM,SB&C.
Going to hava a look.

The FPAF
For My Maps and Ships!
Including  CUSTOM MODULE MAPS & SHIPS