-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nwn_gff unhandled exception #11
Comments
Same issue when trying to run nwn_gff installed from nimble on Win10. Tried compiling it with mingw-w64 and MSVC, both resulting binaries giving me the The precompiled binaries (1.2.7) from the releases tab are working with some issues. Mod files can be unpacked, files can be converted to json but it fails to convert some files back to GFF:
Running nwn_gff on linux on that same file works without issues. I tracked down the problem to the GFF->JSON conversion, where invalid values are written as signed ( Linux output, working:
Windows output, not readable:
EDIT: RE: the EDIT2: Laputian Bird confirmed that the latest precompiled binaries throw an error when converting a faction file from GFF->JSON->GFF on Win7 too. |
Also experiencing this issue on windows 10 pro. Extracting DungeonEternalX.mod to C:\Users\urothis\Documents\Projects\dex
Error: Could not parse .nasher\tmp\011.uti: gff.nim(534) readGffRoot
... Error: unhandled exception: Expectation failed: header.structOffset == 56
... [ValueError]` |
I'm trying this file on Linux and getting the same error:
|
The problem with that file is that it was corrupted because it wasn't extracted properly from the .mod file, causing the header to hold unexpected values. Linux binaries seem to be working fine. I don't know what could cause the linux and windows versions to behave differently but the issue is with the windows version not reading files properly (this includes unpacking mod files, as I explained in my previous comment) and writing the json files differently from the linux version (in the case of FAC files it writes signed values instead of unsigned values). PS: To summarize, windows self compiled binaries truncate and corrupt files extracted from .mod files. The precompiled binaries extract the .mod files properly but write incorrect .json files that can't be converted back to GFF. The problems are isolated to the windows binaries, I tested the same modules on linux and had no issues at all. |
Tracked down the problem to the writeFile() calls resulting in incomplete files. There is a closed issue ( nim-lang/Nim#12315 ) with details on the fix. Compiling nim from devel branch and recompiling the tools with the devel build fixes the issue. |
Confirmed that this resolved the issue. As it is a Nim issue and not these tools specifically, I'd suggest the issue can be closed. Suggestion to @niv to update the binaries to resolve this alongside the issues GoLoT noted in the pre-compiled binaries. EDIT: Nim has released 1.0.2, which fixes the compiler issue at the root of this. |
https://github.com/niv/neverwinter.nim/releases/tag/1.2.8 Thanks everyone for chasing this down. Hopefully that'll be the end of that. |
Attempting to use nwn_gff on Windows 10 produces the following error (command included)
nwn_gff -i .nasher\tmp\module.ifo -o module.ifo.json
gff.nim(534) readGffRoot
Error: unhandled exception: Expectation failed: header.structOffset == 56 [ValueError]`
Also attempted by someone on Linux for whom nwn_gff works as expected on their own files.
File is attached. It is from a 'default mod' - the bare minimum the toolset creates before you can save and close. Also tried the area001.are from the same and it failed with the same error.
module.ifo.zip
The text was updated successfully, but these errors were encountered: