AnthonyZJiang / D-OS-Save-Editor

A save editor for Divinity Original Sin: Enhanced Edition
Other
50 stars 15 forks source link

Hexadecimal value 0x00, is an invalid character. #17

Closed captain-soban closed 5 years ago

captain-soban commented 5 years ago

Hi! Hope you can help me out. I know you are not working on this anymore but I'm desperate to fix my save. If you can just point me in the right direction I can try to fix this if you're not up to working on this anymore. Looks like the save file structure has changed and can't be parsed correctly anymore. Getting this error on a Steam version DoS EE 2.0.119.430 I'm a beginner programmer so if you could just tell me what language you are using for this I will try to fix it. Thank you very much in advance and I hope you can still reply.

`Internal error!

System.ArgumentException: '.', hexadecimal value 0x00, is an invalid character. at System.Xml.XmlUtf8RawTextWriter.InvalidXmlChar(Int32 ch, Byte pDst, Boolean entitize) at System.Xml.XmlUtf8RawTextWriter.WriteAttributeTextBlock(Char pSrc, Char* pSrcEnd) at System.Xml.XmlUtf8RawTextWriter.WriteString(String text) at System.Xml.XmlUtf8RawTextWriterIndent.WriteString(String text) at System.Xml.XmlWellFormedWriter.WriteString(String text) at LSLib.LS.LSXWriter.WriteNode(Node node) at LSLib.LS.LSXWriter.WriteNode(Node node) at LSLib.LS.LSXWriter.WriteNode(Node node) at LSLib.LS.LSXWriter.WriteNode(Node node) at LSLib.LS.LSXWriter.WriteNode(Node node) at LSLib.LS.LSXWriter.WriteNode(Node node) at LSLib.LS.LSXWriter.WriteNode(Node node) at LSLib.LS.LSXWriter.WriteRegions(Resource rsrc) at LSLib.LS.LSXWriter.Write(Resource rsrc) at LSLib.LS.ResourceUtils.SaveResource(Resource resource, String outputPath, ResourceFormat format, FileVersion version) at D_OS_Save_Editor.Savegame.d__33.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at D_OS_Save_Editor.MainWindow.d__14.MoveNext()

v1.6.0`

AnthonyZJiang commented 5 years ago

Hi,

The program is written in C#. However, I was unfamiliar with the concept of "clean code" at the time (taught myself about C#). The codes are really messed up and it has become a nightmare to track down errors. I don't really know what part has gone wrong, but it seems it was trying to write a . character using the XML writer, which is not a valid XML language; hence, argument exception was thrown. You may download the source code and try debug it step by step.

I'm sorry if this does not help much.

Thanks.

captain-soban commented 5 years ago

Got it thanks!