Comments (49)
TinyNvidiaUpdateChecker v1.11.0-beta.zip this build has the workaround @darealshinji mentioned. Everyone please try it and report back.
from tinynvidiaupdatechecker.
I'm always getting an error from 7zip that translates to "The process cannot access the file because it's already being used by another process":
Error from the gist:
System.IO.IOException: 'The process cannot access the file 'C:\Users\me\source\repos\ConsoleApp1\ConsoleApp1\bin\Debug\test.zip' because it is being used by another process.'
It sure looks suspiciously similar.
from tinynvidiaupdatechecker.
Please try the new build.zip (didn't mean to close the issue)
from tinynvidiaupdatechecker.
Yet again dude thanks a lot for helping me out! The code example you provided me with helped me understand what was really going on. Releasing v1.12.0 as we speak.
from tinynvidiaupdatechecker.
At least 2 other people have reported this exact issue.
Have you tried 7zip 17.01? And what version of 7zip are you currently using
from tinynvidiaupdatechecker.
I was using 16.01. I've now installed 17.04 but in the meanwhile I had updated my drivers manually with the downloaded setup file, so now it just shows that my drivers are up to date.
from tinynvidiaupdatechecker.
Try running the application again with the --force-dl
command line argument. I suspect this is a bug related to 7-zip and not the application
from tinynvidiaupdatechecker.
Weird, now it can't find 7zip at all, neither if it's 16.04 or 17.01. Location is always C:\Program Files\7-Zip
.
Can't you just bundle the command line version of 7z.exe
and use that instead?
Or what about this: if I get it right 7zip is used to extract components for a minimal installation, right? Why not add an option to just start the installer non-quietly so that I can decide which features I want? Because if I click Download + Install
it'll perform a silent full installation since it doesn't find 7zip.
from tinynvidiaupdatechecker.
Did you install 7-Zip using the default installer? It should detect the registry keys that the installer creates, and I don't want to implement an automatic download of 7-Zip if you don't have it installed because who doesn't have 7zip (or winrar) in the first place?
Are you on a amd64 system?
from tinynvidiaupdatechecker.
I've reinstalled 7zip using the .exe installer instead of .msi package and now it works. I'm on x64.
If 7zip isn't found in the registry, why not look into the default installation directories?
%ProgramFiles%\7-Zip\7zG.exe
%ProgramFiles(x86)%\7-Zip\7zG.exe
from tinynvidiaupdatechecker.
Oh the msi installer (shit)? I'll add support for it. Look in #29 for MSI installer support
from tinynvidiaupdatechecker.
v1.10.0 released! try the build and report!
from tinynvidiaupdatechecker.
Had same error on 1.10.0
from tinynvidiaupdatechecker.
@albpara what error? What version of 7-Zip are you using?
from tinynvidiaupdatechecker.
Same error described on the issue, of course.
I was using (mostly sure) the .msi version. I just removed it and downloaded the latest .exe installer and it worked, but unfortunately, version 1.10.0 still threw the error
from tinynvidiaupdatechecker.
Having this issue again, but I figured something out:
If I select "Download + Extract" I get the same error after the download finished. But if I select "Download + Extract" a second time and chose the directory with the already downloaded installer the extraction works.
By the way maybe using SevenZipSharp is an option?
from tinynvidiaupdatechecker.
@albpara ok... You never answered what version of 7-Zip you're using
@darealshinji what version of 7-Zip are you using?
Thanks a lot for the feedback btw!
from tinynvidiaupdatechecker.
Sorry @ElPumpo, I didn’t mention the version because as I said, I updated my 7-zip to latest and I didn't check before erasing.... I assume that I was using a 16.x but certainly, I am just gessing, sorry about that :(
from tinynvidiaupdatechecker.
@albpara then try 7-Zip 17.xx versions instead, currently 17.01 which can be found here
As I've said before I highly suspect that this problem is caused by 7-Zip and not TNUC, I'll do some more digging once you can confirm if the 17.xx version solves the issue. This did not occur me whilst implementing 7-Zip support.
from tinynvidiaupdatechecker.
Deactivating Windows Defender (temporarily) fixes the problem for me.
from tinynvidiaupdatechecker.
Then this is a bug related to Defender, and not TNUC. But why can't 7-Zip extract a file used by another process.. kinda silly
from tinynvidiaupdatechecker.
Good question. I wonder if saving the .exe as .7z would trick Defender.
from tinynvidiaupdatechecker.
Changing the extension does nothing. However I did some testing and figured out a few things:
-
WinRAR has no such issues.
-
Running TNUC with
--quiet
does work, 7zG shows no errors and extracts files on the first try. Not sure what's so different about this. -
Changing the part here to
try {
SevenZip.Start();
SevenZip.WaitForExit();
SevenZip.Start();
SevenZip.WaitForExit();
} catch (Exception ex) {
makes the second attempt succeed, just as expected.
Update
Making the app wait a bit before starting 7z seems to fix it:
--- a/TinyNvidiaUpdateChecker/MainConsole.cs
+++ b/TinyNvidiaUpdateChecker/MainConsole.cs
@@ -1006,6 +1006,7 @@ private static void MakeInstaller(bool silent)
SevenZip.StartInfo.UseShellExecute = false;
SevenZip.StartInfo.CreateNoWindow = true; // don't show the console in our console!
try {
+ System.Threading.Thread.Sleep(1000);
SevenZip.Start();
SevenZip.WaitForExit();
} catch (Exception ex) {
from tinynvidiaupdatechecker.
This is really strange... what's causing it...... If you're sure that Thread.Sleep(1000);
will make it work, then I'll add it to the code.
from tinynvidiaupdatechecker.
@ElPumpo I have the same issue even with 1.10 and just extract fails too.
from tinynvidiaupdatechecker.
@exadeci this bug doesn't seem to be caused by my application, what version of 7-Zip are you using?
from tinynvidiaupdatechecker.
@ElPumpo The last stable one 16.04 (2016-10-04) http://www.7-zip.org/download.html
from tinynvidiaupdatechecker.
@exadeci then try 17.01
from tinynvidiaupdatechecker.
v1.11.0 failed on my first attempt but then it succeeded on all later attempts for me.
from tinynvidiaupdatechecker.
Can you confirm that it's caused by Defender?
from tinynvidiaupdatechecker.
v1.10 fails with Defender on and succeeds with with Defender off. v1.11 succeeds even if Defender is on.
from tinynvidiaupdatechecker.
Ok, how about running the application with --quiet
, as it uses 7z.exe
instead of 7zG.exe
from tinynvidiaupdatechecker.
That's working but it shows a GUI, so is it really using 7z.exe
?
from tinynvidiaupdatechecker.
Wouuups! My bad - you should use the following arguments: --confirm-dl --quiet --force-dl
from tinynvidiaupdatechecker.
It's downloading the driver into %TEMP%/388.13
, silently. But it doesn't seem to do anything else.
from tinynvidiaupdatechecker.
It runs the nvidia installer without any user interaction, you sure it didn't update your drivers?
from tinynvidiaupdatechecker.
I've checked it again and running TinyNvidiaUpdateChecker.exe --confirm-dl
on v1.10 updates the driver without any issues.
from tinynvidiaupdatechecker.
This looks like a race condition: sometimes you try to extract (read) the file that's still open for writing (the download).
I'm not quite familiar with webclient, but maybe the DownloadFileCompleted
event should be used, as that's fired later. As I understand DownloadProgressChanged
is fired as soon as data is received from the network, before writing it to the file.
from tinynvidiaupdatechecker.
I honestly don't know what to do @darealshinji, I've been too lazy (sorry) to test with Defender enabled, I use a third party anti-malware program instead so I have always had Defender disabled.
@indivisible I'm sure that the downloader has nothing to do with it, you can try it yourself if you already have the driver file downloaded and select its folder in TNUC. Also if this were the case, then it would occur to WinRAR users aswell (including me?).
I am taking @darealshinji's word that Defender is causing this problem, but I'll test it myself soon enough.
from tinynvidiaupdatechecker.
@ElPumpo 7zip complains about the file being used by another process. Not much else can happen to it to lock out reading.
A lot of things can cause one application to sometimes fail and another to succeed: time from beginning of execution to point of opening the file, how it tries to handle locked files, etc.
There's a really small window of time when this error can occour, so it's normal that many people never see it.
I've looked at the reference implementation of webclient, and it really does fire the progress changed event before actually writing the bytes, so the current behaviour is incorrect anyway.
from tinynvidiaupdatechecker.
Maybe you should recommend only WinRar or point out that there might be issues with 7zip until this is fixed.
from tinynvidiaupdatechecker.
I'll take a closer look on this issue sooner lor later, but it must be said that I have not contributed enough the past weeks than what I used to. Feel free to help me fixing this issue.
from tinynvidiaupdatechecker.
Issue persists with v1.11.0 and 7-zip 18.01.
from tinynvidiaupdatechecker.
I still don't get why you guys are experiencing this and I don't. If someone could reproduce it, it could be a great help to fix this issue. @darealshinji's mentioned fix apparently doesn't work. Alternative I'll get started on implementing #35
from tinynvidiaupdatechecker.
https://gist.github.com/indivisible/eb4cca2f2465dc80ddf9df180b02971c
There you go, small demonstration that should work for you too.
The PR I submitted is trash, I noticed that you have the exact same download code twice and I only patched 1 of them, badly (need to check 2 fields as you mentioned).
from tinynvidiaupdatechecker.
I don't think that this is related to the downloader tho, how about we try to isolate the extracting process and let you guys test it.
Thinking about it you can isolate the downloading process by downloading the driver, then exit the program (the driver file will be saved). Now run the application and it'll try to extract it. (requires the second option, do not use the automatic install)
from tinynvidiaupdatechecker.
Sorry for being retarded, expect a beta build fixing this bug in 4 minutes. Thanks for your help.
from tinynvidiaupdatechecker.
Seems to work now. Thanks a lot!
from tinynvidiaupdatechecker.
You're welcome!
from tinynvidiaupdatechecker.
Related Issues (20)
- TNUC shows Studio Driver as latest driver available and no opt-out available HOT 10
- Disable "Press any key to exit..." with command line argument `--noprompt` HOT 3
- Implement Studio Driver support HOT 1
- Optimize gpu-data.json and os-data.json fetching HOT 2
- Check, if driver already is in folder XY HOT 1
- Questions about TNUC HOT 1
- quiet is not quiet HOT 1
- Always telling: there is a new driver available HOT 2
- Skip update HOT 1
- WinRAR 7 update causes Win32Exception on "Extracting drivers" phase HOT 3
- [NVIDIA API intermittent issue] API returning Studio drivers when GRD is chosen HOT 6
- Slow internet connect on login causes TNUC exception HOT 3
- Crash if internet connection is disconnected whilst downloading driver HOT 13
- [Request] NanaZip Support HOT 6
- Custom paths for extract libary HOT 1
- Network Interface Binding. HOT 1
- The future of TNUC HOT 4
- Run quietly installed the entire driver in Windows 10 HOT 1
- Fix duplicate code
- GPU metadata for your card does not exist HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinynvidiaupdatechecker.