When loading a save with the new Grom the Paunch DLC, the following error is given.
invalid type code 00000000 at 3b
** Exception Text **
System.IO.InvalidDataException: Invalid type code 00000000 at 3b
at EsfLibrary.EsfCodec.Decode(BinaryReader reader, Byte code)
at EsfLibrary.AbcaFileCodec.Decode(BinaryReader reader, Byte typeCode)
at EsfLibrary.EsfCodec.Decode(BinaryReader reader)
at EsfLibrary.EsfCodec.ReadToOffset(BinaryReader reader, Int64 targetOffset)
at EsfLibrary.RecordNode.Decode(BinaryReader reader, EsfType unused)
at EsfLibrary.EsfCodec.ReadRecordNode(BinaryReader reader, Byte typeCode, Boolean forceDecode)
at EsfLibrary.AbcaFileCodec.ReadRecordNode(BinaryReader reader, Byte typeCode, Boolean forceDecode)
at EsfLibrary.MemoryMappedRecordNode.DecodeDelegate()
at EsfLibrary.DelegatingNode.get_Decoded()
at EsfLibrary.DelegatingNode.get_Value()
at EsfLibrary.ParentNode.get_Children()
at EsfControl.EsfTreeNode.Fill()
at EsfControl.TreeEventHandler.FillNode(Object sender, TreeViewCancelEventArgs args)
at System.Windows.Forms.TreeView.OnBeforeExpand(TreeViewCancelEventArgs e)
at System.Windows.Forms.TreeView.TvnExpanding(NMTREEVIEW* nmtv)
at System.Windows.Forms.TreeView.WmNotify(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Older saves still work so this is an issue with the new DLC.
Do you think you could forward a copy of your save that doesn't work? The more examples I have, the easier it is for me to parse the changed data format properly the first time without having to repeatedly patch it.
Hey Genreless!
Ofcourse I can do that. Here's a dropbox link to the most recent save and an autosave that both give an error. I noticed that earlier saves than Grom the Paunch still work.
https://www.dropbox.com/sh/f5qtx4h9fvu3pnr/AACTs_VzUXRvFCQdZKRqDCA8a?dl=0
Thanks for the effort on this! Your software is much appreciated 🙂
[https://www.dropbox.com/static/images/spectrum-icons/generated/content/content-folder_dropbox-large.png]https://www.dropbox.com/sh/f5qtx4h9fvu3pnr/AACTs_VzUXRvFCQdZKRqDCA8a?dl=0
Saves MPCampaignhttps://www.dropbox.com/sh/f5qtx4h9fvu3pnr/AACTs_VzUXRvFCQdZKRqDCA8a?dl=0
Shared with Dropbox
www.dropbox.com
Van: Genreless genreless@users.sourceforge.net
Verzonden: vrijdag 3 juli 2020 17:41
Aan: [packfilemanager:feature-requests] 330@feature-requests.packfilemanager.p.re.sourceforge.net
Onderwerp: [packfilemanager:feature-requests] #330 Invalid type code when trying to edit newer saves
Do you think you could forward a copy of your save that doesn't work? The more examples I have, the easier it is for me to parse the changed data format properly the first time without having to repeatedly patch it.
[feature-requests:#330]https://sourceforge.net/p/packfilemanager/feature-requests/330/ Invalid type code when trying to edit newer saves
Status: open
Milestone: EditSF 1.2.1
Created: Thu Jul 02, 2020 04:24 PM UTC by Max
Last Updated: Thu Jul 02, 2020 04:25 PM UTC
Owner: nobody
When loading a save with the new Grom the Paunch DLC, the following error is given.
invalid type code 00000000 at 3b
** Exception Text **
System.IO.InvalidDataException: Invalid type code 00000000 at 3b
at EsfLibrary.EsfCodec.Decode(BinaryReader reader, Byte code)
at EsfLibrary.AbcaFileCodec.Decode(BinaryReader reader, Byte typeCode)
at EsfLibrary.EsfCodec.Decode(BinaryReader reader)
at EsfLibrary.EsfCodec.ReadToOffset(BinaryReader reader, Int64 targetOffset)
at EsfLibrary.RecordNode.Decode(BinaryReader reader, EsfType unused)
at EsfLibrary.EsfCodec.ReadRecordNode(BinaryReader reader, Byte typeCode, Boolean forceDecode)
at EsfLibrary.AbcaFileCodec.ReadRecordNode(BinaryReader reader, Byte typeCode, Boolean forceDecode)
at EsfLibrary.MemoryMappedRecordNode.DecodeDelegate()
at EsfLibrary.DelegatingNode.get_Decoded()
at EsfLibrary.DelegatingNode.get_Value()
at EsfLibrary.ParentNode.get_Children()
at EsfControl.EsfTreeNode.Fill()
at EsfControl.TreeEventHandler.FillNode(Object sender, TreeViewCancelEventArgs args)
at System.Windows.Forms.TreeView.OnBeforeExpand(TreeViewCancelEventArgs e)
at System.Windows.Forms.TreeView.TvnExpanding(NMTREEVIEW* nmtv)
at System.Windows.Forms.TreeView.WmNotify(Message& m)
at System.Windows.Forms.TreeView.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Older saves still work so this is an issue with the new DLC.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/packfilemanager/feature-requests/330/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Issues:
#330I'm having the same issue too, but at a different address (4b instead of 3b), can I bump this ticket or help in any way?
It only occurs with EditSF, I can use SaveViewer to navigate to the value I want to change, and use SaveParser with no problems. Is there a way I can manually navigate a savefile to change a specific value without EditSF, since I can find it with SaveViewer?
Would another savefile having the same issue help @genreless?
If so whats the best way of sending them?
The mention of AbcaCodec in the stackdump isn't encouraging; it sounds like they've created another ESF format (since AB CF is the latest we have, and I think AB CA is just the fallback if no suitable one is found). To verify, check the first two bytes in the save file in a hex editor; if it's not AB CA, AB CE or AB CF, we don't have a codec for it.
In this case, it might be enough to just copy one of the existing ones (like AbcfCodec), call it after the first bytes in the file (eg AB DA -> AbdaCodec plus a corresponding Header class), and then step through while it tries to decode it. The last time I did that, it just added some fixed field in the header; identify it, create a field for it in the header and parsing, and hopefully that's it.
@fuzznutty Typically I'd say I haven't been working on PFM because I've been busy, but the truth today is that I was simply distracted, so I'm going to get to fixing this. It looks like the problem is the same as the last ~3 times and I've failed to properly parse type26 nodes. This means more examples are greatly appreciated. If you want to contribute a save file, you can either attach it to a post here in the issue tracker or email it to me at genreless@users.sourceforge.net.
@iamdaniu I think you're mis-remembering, AbcaFileCodec is the most derived of the codecs, being a superclass of AbcfFileCodec, and what I've seen used by all the esf files for modern total war games. The files do indeed start with
CA AB 00 00and the codec selector would fail if it was a new codec. It looks like the problem is actually that the type26 node parser that was pushed is still imperfect and what actually needs fixing since type26 parsing is ending on a00byte.Last edit: Genreless 2020-07-28
Hey @genreless,
thanks for the reply and for taking a look!
Tried 1.2.5 and sadly still isn't working for me, it's a multiplayer campaign so I don't know if that makes a difference, attaching our latest save to this now :)
Just wanted to report that all my save files are editable as of 1.2.6, thanks @genreless!
This was an extension of issue [#326]. Waiting to see if the fixes worked for the entire community or just our test cases.
Related
Issues:
#326Last edit: Genreless 2020-07-28
Since there have been no more complaints since the release of this fix, I am assuming the fix worked and [r1213] fixed it. This issue is thus closed.
Related
Commit: [r1213]
More failed Type26 nodes have been found so this issue is re-opened.
[r1215] should have fixed the mistake in the prior fix. This issue is closed again.
Related
Commit: [r1215]