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?
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.
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.
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.
Can you re-create it using the save1 file? If so, make sure to save and attach the log file.
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.
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]
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.
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.
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.
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.
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.
This is part of what he'd done in that script.
Consider an eyebrow raised.
Edit: I've written a Mandelbrot script to help with this, with a thread in MM,SB&C. (http://knucklecracker.com/forums/index.php?topic=25697.0)
[Linkified the reference - K75]
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.
I appear to be having the same issue. Making a vanilla map (no PRPL) and I suddenly can't save. I can't think of anything I did that would cause any issues.
Appreciate the help.
I can tell this much: There is an exception thrown. Did you resize the map (recently a common cause of errors :) ) or is there an errant PhalanxGun at large on the map? More than that, Virgil will have to step in and give an opinion - and he's out of pocket for the weekend.
You may want to try to re-load the save and see of loading the save file cleared up the error.
NullReferenceException: Object reference not set to an instance of an object
at PhalanxGun.WriteData () [0x00000] in <filename unknown>:0
at SaveGameManager.SaveUnits (NBT.Tags.TagCompound baseTag) [0x00000] in <filename unknown>:0
at SaveGameManager.SaveMission (System.String fileName, Boolean includeGUID) [0x00000] in <filename unknown>:0
at InEditorEditModeMenuManager.SaveGameEntryClicked (Boolean forceSave) [0x00000] in <filename unknown>:0
at UnityEngine.Events.InvokableCall`1[System.Boolean].Invoke (System.Object[] args) [0x00000] in <filename unknown>:0
at UnityEngine.Events.CachedInvokableCall`1[System.Boolean].Invoke (System.Object[] args) [0x00000] in <filename unknown>:0
at UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0
at UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) [0x00000] in <filename unknown>:0
at UnityEngine.Events.UnityEvent.Invoke () [0x00000] in <filename unknown>:0
at UnityEngine.UI.Button.Press () [0x00000] in <filename unknown>:0
at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) [0x00000] in <filename unknown>:0
at UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) [0x00000] in <filename unknown>:0
at UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) [0x00000] in <filename unknown>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMousePress(MouseButtonEventData)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent(Int32)
UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent()
UnityEngine.EventSystems.StandaloneInputModule:Process()
UnityEngine.EventSystems.EventSystem:Update()
(Filename: Line: -1)
PS. In case you were wondering, I don't really know if the PhalanxGun is a legit game object (Virgil sometimes retain early prototype names in his code).
Ok, yeah I haven't added any guns or custom items. I tried reloading earlier and the save function still wasn't working. If I move the game forward one frame it will save, but that messes up my map so I'm trying to avoid that at all costs. Plus I did a fair amount of work since my last save so I'm afraid to close it down, lol.
EDIT: Could deleting an enemy mine, then re-adding it cause an issue? I had one that was sending out energy packets already to one of the ticon guns and I deleted and re-added it, to clean up the start state of my map.
That sounds likely. You'd have to wait for Virgil to provide an authoritative answer. :)
As I recall, the class name for "mine cannons" is PhalanxGun. If it's not been properly cleaned up, that will be the issue.
I can't recall if the last instance was fixed by a more recent game version. Searching the forum for "PhalanxGun" will find wherever that last topic is.