Skip to content
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

ModuleWriterException: Invalid section RVA #545

Open
Drovosek01 opened this issue Feb 19, 2024 · 1 comment
Open

ModuleWriterException: Invalid section RVA #545

Drovosek01 opened this issue Feb 19, 2024 · 1 comment

Comments

@Drovosek01
Copy link

I'm exploring. A dll file compiled using dotNet on a Mac with Apple Silicon processors.

I open the file in dnSpyEx v6.5.0 and then just try to save the module without any modifications
Screenshot 2024-02-19 at 16 03 42
and I get an error:

An exception has occurred dnlib.DotNet.Writer.ModuleWriterException: Invalid section RVA
   at dnlib.DotNet.Writer.NativeModuleWriter.WriteFile()
   at dnlib.DotNet.Writer.NativeModuleWriter.Write()
   at dnlib.DotNet.Writer.NativeModuleWriter.WriteImpl()
   at dnlib.DotNet.Writer.ModuleWriterBase.Write(Stream dest)
   at dnlib.DotNet.Writer.ModuleWriterBase.Write(String fileName)
   at dnlib.DotNet.ModuleDefMD.NativeWrite(String filename, NativeModuleWriterOptions options)
   at dnSpy.AsmEditor.SaveModule.ModuleSaver.Save(SaveModuleOptionsVM vm) in D:\a\dnSpy\dnSpy\Extensions\dnSpy.AsmEditor\SaveModule\ModuleSaver.cs:line 187
   at dnSpy.AsmEditor.SaveModule.ModuleSaver.SaveAll() in D:\a\dnSpy\dnSpy\Extensions\dnSpy.AsmEditor\SaveModule\ModuleSaver.cs:line 151
   at dnSpy.AsmEditor.SaveModule.SaveMultiModuleVM.SaveAsync(SaveOptionsVM[] mods) in D:\a\dnSpy\dnSpy\Extensions\dnSpy.AsmEditor\SaveModule\SaveMultiModuleVM.cs:line 250
Screenshot 2024-02-19 at 16 04 00

I tried to do this on Windows 10 x64 on an AMD laptop, and also tried to do it on Windows 11 ARM via Parallels Desktop and always get the same error.

Does anyone know how to fix this? Here is an example of such a file:
CsvHelper dll for arm64.zip

@ElektroKill
Copy link
Contributor

Probably related to: #533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants