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

While extracting: Value of '893' is not valid for 'Value' #209

Open
colemar opened this issue Nov 18, 2024 · 4 comments
Open

While extracting: Value of '893' is not valid for 'Value' #209

colemar opened this issue Nov 18, 2024 · 4 comments

Comments

@colemar
Copy link

colemar commented Nov 18, 2024

Describe the bug
A clear and concise description of what the bug is.

Value of '893' is not valid for 'Value'. 'Value' should be between 'minimum' and 'maximum'.
Parameter name: Value

Technical Detail:

   at System.Windows.Forms.ProgressBar.set_Value(Int32 value)
   at LessMsi.Gui.ExtractionProgressDialog.UpdateProgress(ExtractionProgress progress)
   at LessMsi.Gui.ExtractionProgressDialog.UpdateProgress(IAsyncResult result)
   at LessMsi.Msi.Wixtracts.ExtractionProgress.ReportProgress(ExtractionActivity activity, String currentFileName, Int32 filesExtractedSoFar)
   at LessMsi.Msi.Wixtracts.ExtractFiles(Path msi, String outputDir, MsiFile[] filesToExtract, AsyncCallback progressCallback)
   at LessMsi.Gui.MainForm.btnExtract_Click(Object sender, EventArgs e)

To Reproduce
Steps to reproduce the behavior:

  1. Open TopazVideoAI.msi
  2. Click on [Extract]
  3. At about 100% progress see error above

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
lessmsi.exe x TopazVideoAI.msi MSIEX\ works well, but last line shown is 894/892 Topaz Video AI.exe.
image

@mega5800
Copy link
Contributor

Hello @colemar.

I'd like to work on this issue and will be grateful if you can provide the msi file you used.

Thank you.

@colemar
Copy link
Author

colemar commented Feb 14, 2025

@mega5800
Sorry, I don't have the msi file anymore.

@mega5800
Copy link
Contributor

I see.
In a quick Google search, I found the next link for TopazVideoAI.msi:
https://docs.topazlabs.com/video-ai/download-and-install

Let me download it and check if I am able to reproduce the issue you have.

@activescott
Copy link
Owner

@mega5800 I bet it is possible that if there are files with the same name (which we know occurs for installers supporting x86 and x64) it could end up sending a file count during progress multiple times which could exceed the maximum value. This could occur due to the simplistic check at

if (!fileEntryMap.ContainsKey(compressedFile.Filename))

You could probably create a unit test on an msi that has two files with the same name, but two different platforms and do an extraction and get it to call progress.ReportProgress with a value that is greater than the TotalFileCount value it was initialized with.

One way to fix might be to make sure that the ExtractionProgress class updates the _totalFileCount on every updateProgress call just before it updates the _filesExtractedSoFar value at

_filesExtracted = filesExtractedSoFar;

It might be a little weird that the TotalFiles value might change over time, but seems reasonable.

Just an idea. Hope this helps!

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

3 participants