bmaupin / civ5save-editor

Civilization V save editor
https://bmaupin.github.io/civ5save-editor/
MIT License
28 stars 2 forks source link

"Offset is outside the bounds of the DataView" #6

Closed Jordan7890 closed 6 years ago

Jordan7890 commented 6 years ago

Browser

Chrome Version 65.0.3325.162

Description

Error message: Offset is outside the bounds of the DataView

A.k.a. Title

bmaupin commented 6 years ago

I'd love to help if possible. When you get a chance can you attach the save file you're having problems with either directly to this issue or using your preferred sharing service? Thanks!

bmaupin commented 6 years ago

If you get a chance, please attach your save file. Without that, there's no way I can know what the cause of your problem is. Thanks!

bmaupin commented 6 years ago

I'll go ahead and close this for now. If you get a chance to attach your save file I'll reopen it. Thanks!

silasary commented 6 years ago

I've been able to replicate this with the following save file. (iGMR) XXL _ 43 Players World Map.zip

Note: The attached save uses a DLL mod (https://steamcommunity.com/sharedfiles/filedetails/?id=159305629), and that appears to be the source of the problem.

From my exploration of the save, the two bytes (offset 21EC) between GameSeed and "Map File Path" (usually [0x0 0x0]), contain [0x1 0x35], and then there are an additional five additional bytes ([0x57 0x3E 0x24 0x0 0x0]) that usually don't exist.

Hope this helps!

bmaupin commented 6 years ago

That should help. I wonder if @Jordan7890 was using a mod too.

I'll take a look and see if I can fix it in a way that doesn't break non-modded saves.

Thanks!

bmaupin commented 6 years ago

and then there are an additional five additional bytes ([0x57 0x3E 0x24 0x0 0x0]) that usually don't exist.

I think I found where those extra 5 bytes came from. At 0x20e3 there's this string: Shaka. Unless it means something else to you, it seems to be the leader for player 1's civilization (Zulu).

I think I should be able to fix it without breaking non-modded saves.

bmaupin commented 6 years ago

I've just pushed an update that should hopefully fix this. If you still have this issue, the app may be cached in your browser. Try closing it or using a different browser. Because this is a modded save there could be other issues, but everything seems to be working for now.

Thanks!