ElPumpo / TinyNvidiaUpdateChecker

Open sourced tool for keeping NVIDIA GPUs updated, featuring fully customizable driver installs for complete control, multi-GPU support, and more!
GNU General Public License v3.0
1.41k stars 56 forks source link

Crash if internet connection is disconnected whilst downloading driver #204

Closed jiut closed 4 months ago

jiut commented 8 months ago
.\TinyNvidiaUpdateChecker.exe
TinyNvidiaUpdateChecker v1.17.1

Verifying internet connection . . . OK!

Searching for Updates . . . OK!

Retrieving GPU information . . . OK!
There is a new GPU driver available to download!
Downloading the driver . . . [#####-----]  55% \Unhandled exception. System.IO.FileNotFoundException: Could not find file 'C:\Users\jiut\AppData\Local\Temp\546.33\546.33-notebook-win10-win11-64bit-international-dch-whql.exe.part'.
File name: 'C:\Users\jiut\AppData\Local\Temp\546.33\546.33-notebook-win10-win11-64bit-international-dch-whql.exe.part'
   at System.IO.File.Move(String sourceFileName, String destFileName, Boolean overwrite)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at TinyNvidiaUpdateChecker.MainConsole.<>c__DisplayClass34_0.<HandleDownload>b__1(Object sender, AsyncCompletedEventArgs e) in C:\Users\Samuel\Documents\GitHub\TinyNvidiaUpdateChecker\TinyNvidiaUpdateChecker\MainConsole.cs:line 883
   at System.Net.WebClient.OnDownloadFileCompleted(AsyncCompletedEventArgs e)
   at System.Net.WebClient.<StartAsyncOperation>b__78_4(Object arg)
   at System.Threading.SynchronizationContext.<>c.<Post>b__8_0(ValueTuple`2 s)
   at System.Threading.QueueUserWorkItemCallbackDefaultContext`1.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
   at System.Threading.Thread.StartCallback()
-
ElPumpo commented 8 months ago

Hi. This is a weird error it looks like the partial download gets deleted half way through... What anti virus program are you using, as perhaps it is or some other program interfering?

jiut commented 8 months ago

At the time I tested it, it succeeded once, only once. Causing me to not be able to test it anymore. All the errors are the same.

ElPumpo commented 7 months ago

So what anti virus did you have? For curiosity

jiut commented 7 months ago

So what anti virus did you have? For curiosity

https://www.huorong.cn/ A Chinese anti virus

ElPumpo commented 7 months ago

Okay thanks for the info. I am going to close this issue as the file should not be deleted whilst downloading. And the behavior is correct.. something outside of TNUC must have caused this I am concerned about your AV

jiut commented 7 months ago

I have tested for many times. It worked less than 5 times, both with and without AV. It's completely unpredictable.

jiut commented 6 months ago

When attempting to intercept a file deletion operation, I discovered that it was initiated by the TNVC itself. Below is a screen recording of the intercepted deletion action.

https://github.com/ElPumpo/TinyNvidiaUpdateChecker/assets/52725935/728d295a-98b3-48ff-8c07-26337f65fee4

When allowing this operation, the above error occurs. Further investigation revealed that this may be caused by an unstable network connection. When the download connection is interrupted, the program will attempt to delete the file.

ElPumpo commented 6 months ago

This is super confusing so seperate what you're trying to say.

  1. You use some sort of tool to stop TNUC from working. Of course it will fail, what did you expect?? I am super confused to your video what you hoped to achieve
  2. Yes in fact unstable network connections are not accounted for which belogs in a seperate bug report
jiut commented 6 months ago

To verify whether downloaded files were deleted by antivirus software, I monitored all deletion operations occurring in the download folder.

The diagram below illustrates that any deletion operation initiated by any program on files within that folder triggers a warning. 1709435029526

Upon launching the program and downloading files to the designated download folder, I discovered that each deletion operation on downloaded files was carried out by TNUC itself, rather than the antivirus software. If this operation is allowed, the previous error message will be displayed.

Subsequently, I speculated that the issue might be related to the network environment. The occurrence of this error seems too random, and my network stability is not optimal. During the file download process, I manually closed the download connection in the network proxy software, and the same situation occurred. Therefore, I believe that this error is caused by unstable network connections.

https://github.com/ElPumpo/TinyNvidiaUpdateChecker/assets/52725935/31df06aa-8c17-48d7-b5fc-5a579c31f09b

ElPumpo commented 6 months ago

Okay I understand. Will have to investigate but don't count on it being some priority

jiut commented 6 months ago

OK, only someone using a poor VPN may encounter this error.

ElPumpo commented 4 months ago

Hi again. I realized I misunderstood your bug report. I tested this and you are correct. If you cut internet connection it causes a crash. I will fix this

image

ElPumpo commented 4 months ago

Actually, TNUC has really bad exception handling and could use an overhaul which won't come.