Author Topic: [Bug] Can't Save in Editor  (Read 402 times)

FOXX

  • Map Maker
  • *****
  • Posts: 637
  • Just Breathe
[Bug] Can't Save in Editor
« on: March 22, 2017, 12:39:59 pm »
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?
If you have the Knowledge, you only need Time.

The FPAF
For My Maps and Ships!

Dark Ambition

  • Map Maker
  • *****
  • Posts: 259
  • Nobody expects the Dark Ambiquisition!
Re: [Bug] Can't Save in Editor
« Reply #1 on: March 22, 2017, 12:53:08 pm »
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.
WHAT ARE YOUR COMMANDS?
🔺
-----
I assure you it's quite the other way around. The question is: What, my dear Samaritan, are your commands for us?
-----
CALCULATING RESPONSE


FOXX

  • Map Maker
  • *****
  • Posts: 637
  • Just Breathe
Re: [Bug] Can't Save in Editor
« Reply #2 on: March 22, 2017, 02:49:18 pm »
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.
« Last Edit: March 22, 2017, 02:50:59 pm by FOXX »
If you have the Knowledge, you only need Time.

The FPAF
For My Maps and Ships!

FOXX

  • Map Maker
  • *****
  • Posts: 637
  • Just Breathe
Re: [Bug] Can't Save in Editor
« Reply #3 on: August 07, 2017, 12:04:49 pm »
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.
If you have the Knowledge, you only need Time.

The FPAF
For My Maps and Ships!

Karsten75

  • Hero Member
  • *****
  • Posts: 6319
Re: [Bug] Can't Save in Editor
« Reply #4 on: August 08, 2017, 10:26:26 am »
Can you re-create it using the save1  file? If so, make sure to save and attach the log file.
"Any leftover cabbage can and will be mixed with mayo"
   - Cole's Law

FOXX

  • Map Maker
  • *****
  • Posts: 637
  • Just Breathe
Re: [Bug] Can't Save in Editor
« Reply #5 on: August 08, 2017, 11:03:58 am »
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.

If you have the Knowledge, you only need Time.

The FPAF
For My Maps and Ships!

FOXX

  • Map Maker
  • *****
  • Posts: 637
  • Just Breathe
Re: [Bug] Can't Save in Editor
« Reply #6 on: August 10, 2017, 11:06:17 am »
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]


If you have the Knowledge, you only need Time.

The FPAF
For My Maps and Ships!

Karsten75

  • Hero Member
  • *****
  • Posts: 6319
Re: [Bug] Can't Save in Editor
« Reply #7 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.

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?

Code: [Select]
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.
« Last Edit: August 10, 2017, 11:30:45 am by Karsten75 »
"Any leftover cabbage can and will be mixed with mayo"
   - Cole's Law

virgilw

  • Administrator
  • *****
  • Posts: 11656
Re: [Bug] Can't Save in Editor
« Reply #8 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.


FOXX

  • Map Maker
  • *****
  • Posts: 637
  • Just Breathe
Re: [Bug] Can't Save in Editor
« Reply #9 on: August 10, 2017, 12:22:41 pm »
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.

Quote
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?

Code: [Select]
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.
« Last Edit: August 10, 2017, 12:27:36 pm by FOXX »
If you have the Knowledge, you only need Time.

The FPAF
For My Maps and Ships!

FOXX

  • Map Maker
  • *****
  • Posts: 637
  • Just Breathe
Re: [Bug] Can't Save in Editor
« Reply #10 on: August 10, 2017, 12:26:49 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.
« Last Edit: August 10, 2017, 01:42:43 pm by FOXX »
If you have the Knowledge, you only need Time.

The FPAF
For My Maps and Ships!

GoodMorning

  • Map Maker
  • *****
  • Posts: 2913
  • (Pusillanimous)
Re: [Bug] Can't Save in Editor
« Reply #11 on: August 10, 2017, 05:58:07 pm »
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

  • Hero Member
  • *****
  • Posts: 6319
Re: [Bug] Can't Save in Editor
« Reply #12 on: August 10, 2017, 06:36:44 pm »
This is part of what he'd done in that script.
"Any leftover cabbage can and will be mixed with mayo"
   - Cole's Law

GoodMorning

  • Map Maker
  • *****
  • Posts: 2913
  • (Pusillanimous)
Re: [Bug] Can't Save in Editor
« Reply #13 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.

[Linkified the reference  - K75]
« Last Edit: August 11, 2017, 10:52:35 am by Karsten75 »
A narrative is a lightly-marked path to another reality.

FOXX

  • Map Maker
  • *****
  • Posts: 637
  • Just Breathe
Re: [Bug] Can't Save in Editor
« Reply #14 on: August 11, 2017, 07:02:01 am »
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 :)

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.

If you have the Knowledge, you only need Time.

The FPAF
For My Maps and Ships!