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

A couple of issues I have been experiencing #4

Open
Alcinzal opened this issue Sep 21, 2024 · 0 comments
Open

A couple of issues I have been experiencing #4

Alcinzal opened this issue Sep 21, 2024 · 0 comments

Comments

@Alcinzal
Copy link

Hey, just wanted to first say thanks for the great crate and project.

So far I have encountered the following issues:

  1. Details not being displayed properly in properties. Although I have documented that here: Remove division by two in TrySerialize->VarFileInfo to fix properties not displaying. #3

  2. Editing the resource of a file twice, or after it has already been edited using winres-edit, results in one of the following errors:

Error: String("Header::try_deserealize(): invalid resource data type (must be 1 or 0) - possible misalignment/corruption")
error: process didn't exit successfully: `target\debug\testing_file.exe` (exit code: 1)

(upon checking with the commented println statement, the resource data type was random from file to file, ranging from 30 to 80)
or

thread 'main' panicked at C:\Users\Alcinzal\.cargo\registry\src\index.crates.io-6f17d22bba15001f\manual-serializer-0.1.0\src\lib.rs:200:45:
range end index 1062 out of range for slice of length 1060
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

It seems to be random which of these appear.

  1. This one is also about the "Translation" value in VarFileInfo. If you have a not-edited .exe file, open it with resource hacker, you see the translation value like so:
{
	VALUE "Translation", 0x0000 0x04B0  
}

Upon editing with winres_edit, it becomes so:

{
	VALUE "Translation",  
}

And then if you add the values back using Resource Hacker, compile, and save, and then try to edit the resource again using winres-edit, gives you this error:

Error: String("Unknown child type: Translation")

Which is weird, because the translation value was there on the not-edited .exe, but now it is a header key?

This last issue might be a problem within Resource hacker, I am not sure.

I know you are busy, so no rush on this, but thought I could list them up here. If you wish I could update my issues repo to better display these errors.

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

1 participant