seerge / g-helper

Lightweight Armoury Crate alternative for Asus laptops and ROG Ally. Control tool for ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, TUF, Strix, Scar and other models
https://seerge.github.io/g-helper/
GNU General Public License v3.0
6.97k stars 254 forks source link

GHelper 0.72 failing to autoupdate (crash) #513

Closed bel57 closed 1 year ago

bel57 commented 1 year ago

Describe the bug

Launching GHelper 0.72 opens a prompt to download the update (0.74). When accepting, it does nothing. Moving the cursor to systray icon and it disappear. The process is not running. Nothing special in GHelper logs. System logs points to a KERNELBASE.dll failure. This is the first time it's happening to me. I've tried to repeat the operation but it keeps happening, so I'll manually update. Might be a problem in your code, might be a local issue only with my system. Can you look into this?

Expected behavior Successfully completing the autoupdate.

App Logs log.txt CrashDumps.zip

Screenshots or screencasts image

Source GHelper

Résumé Fonctionnement arrêté

Date ‎vendredi ‎02/‎06/‎2023 02:58

Statut Rapport envoyé

Description Chemin d’accès de l’application défaillante : C:\Users\Bel\ASUS\GHelper.exe

Signature du problème Nom d’événement du problème : APPCRASH Nom de l’application: GHelper.exe Version de l’application: 0.72.0.0 Horodatage de l’application: 641de100 Nom du module défaillant: KERNELBASE.dll Version du module défaillant: 10.0.19041.3031 Horodateur du module défaillant: 69314b12 Code de l’exception: e0434352 Décalage de l’exception: 000000000002cf19 Version du système: 10.0.19045.2.0.0.768.101 Identificateur de paramètres régionaux: 1036 Information supplémentaire n° 1: 00c3 Information supplémentaire n° 2: 00c31b3a8bdc043497ce4fb9a1c58281 Information supplémentaire n° 3: 367d Information supplémentaire n° 4: 367dbb56656ec84274b4af9893f22d3f

Informations complémentaires sur le problème ID de compartiment : 8b1394de116eda62881954ffabc2d509 (1736512588403102985)

Desktop (please complete the following information):

Asus software

seerge commented 1 year ago

@bel57 usually this crash events come in pair. 1 mentions kernelbase (and is useless, as it doesn't show what went wrong), second one is more specific.

Can you check that ?

bel57 commented 1 year ago

Sorry the picture/logs are intacts, I'm not hiding any detail about another system event. There is no other crash reported during this period. Only G-Helper when triggering the self update process. Anyway I have manually updated from 0.72 to 0.74. We'll see if it happens again when you release the next stable build. Thanks for your fast reply.

bel57 commented 1 year ago

Okay I caught more in the logs. It looks like the autoupdate can't proceed because the file is already in use. Here is the unhandled exception:

XML de l’événement :

1026 0 2 0 0 0x80000000000000 125037 Application BEL-ZEPHYRUS Application: GHelper.exe CoreCLR Version: 7.0.523.17405 .NET Version: 7.0.5 Description: The process was terminated due to an unhandled exception. Exception Info: System.Net.WebException: An exception occurred during a WebClient request. ---> System.IO.IOException: The process cannot access the file 'C:\Users\Bel\ASUS\GHelper.exe' because it is being used by another process. at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access) at System.Net.WebClient.DownloadFile(Uri address, String fileName) --- End of inner exception stack trace --- at System.Net.WebClient.DownloadFile(Uri address, String fileName) at GHelper.SettingsForm.AutoUpdate(String requestUri) in C:\Users\Serge\g-helper\app\Settings.cs:line 417 at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() `
seerge commented 1 year ago

@bel57 reason was in github release configuration, i have fixed it here and it should work now (please try) :)

bel57 commented 1 year ago

Thanks for the quick fix, it worked just fine :)

seerge commented 1 year ago

@bel57 thanks for spotting btw. Reason was that it tried to download .exe variant from github (instead of zip) and unzip it (good luck with that).

I have added a "permament" fix in 0.76 for this. But for now, releases will be in zips )))