murrty / youtube-dl-gui

Download/Convert videos from websites without needing to learn command line
GNU General Public License v3.0
427 stars 45 forks source link

I have an error when I click on download (v. 3.2.1) Windows 7 #162

Closed SGvagon closed 1 year ago

SGvagon commented 1 year ago

Hello,

I tried download few videos or audio from Youtube after few months. But when I click on Download button, error table popup. Strange is, if I don't close this error table, video SUCCESSFULLY download. It is a little annoying, but downloading works.

Here is the error code:

A caught FormatException occured.

Message: Vstupní řetězec nemá správný formát.
Stacktrace:    v System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   v System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   v youtube_dl_gui.frmDownloader.<>c__DisplayClass19_0.<BeginDownload>b__0()
Source: System.Windows.Forms
Target Site: System.Object MarshaledInvoke(System.Windows.Forms.Control, System.Delegate, System.Object[], Boolean)
Inner Exception: 

========== FULL REPORT ==========
System.FormatException: Vstupní řetězec nemá správný formát.
   v System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   v System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   v youtube_dl_gui.frmDownloader.<>c__DisplayClass19_0.<BeginDownload>b__0()
========== END  REPORT ==========

========== OS  INFO ==========
(Please don't omit this info, it may be important)
Current version: 3.2.1
Curernt culture: Czech (Czech Republic)
System Caption: Microsoft Windows 7 Professional 
Version: 6.1.7601
Service Pack Major: 1
Service Pack Minor: 0
========== END INFO ==========
SGvagon commented 1 year ago

If I try (re)Download Youtube-dl I have this error:

An unhandled exception occurred.
The application will exit after closing this dialog.

System.NullReferenceException: Odkaz na objekt není nastaven na instanci objektu.
   v youtube_dl_gui.UpdateChecker.CheckForYoutubeDlUpdate(Boolean ForceCheck)
   v youtube_dl_gui.frmSettings.<btnSettingsRedownloadYoutubeDl_Click>b__22_0()
   v System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   v System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   v System.Threading.ThreadHelper.ThreadStart()

========== FULL REPORT ==========
System.UnhandledExceptionEventArgs
========== END  REPORT ==========

========== OS  INFO ==========
(Please don't omit this info, it may be important)
Current version: 3.2.1
Curernt culture: Czech (Czech Republic)
System Caption: Microsoft Windows 7 Professional 
Version: 6.1.7601
Service Pack Major: 1
Service Pack Minor: 0
========== END INFO ==========

But again, download is working and sucessfully download all files. But, when I close this error, program crashed.

murrty commented 1 year ago

I'll look into it soon-ish. FormatException leads me to believe it's another culture issue. I'll be very upset if it's another culture issue.

murrty commented 1 year ago

By any chance, do you have "use youtube-dls internal updater" enabled?

SGvagon commented 1 year ago

Yes, in settings I have this check/enable.

murrty commented 1 year ago

Can you test this build? Open the Log before trying to redownload youtube-dl and you should be able to copy/paste the text if it fails again.

removed since it shouldn't be used passed testing. zip sha256: 4EDC93CA6E53F298ACE5A9BFDDD0BCD7E52819DB73A788FF59291D960D6D6F95

you shouldn't use this build outside of testing the redownloading function since it's a bit of a thrown together build.

SGvagon commented 1 year ago

In this build download videos works without any error, but if I try (re)Download Youtube-DL , I have this error

A caught InvalidOperationException occurred.

Message: LatestYoutubeDl is still null!
Type: System.InvalidOperationException
Source: 
Target Site: 
Stacktrace:

========== OS  INFO ==========
Current Version: 3.2.1
Current Culture: Czech (Czech Republic)
System Caption: Microsoft Windows 7 Professional 
System Version: 6.1.7601
Service Pack Major: 1
Service Pack Minor: 0
========== END INFO ==========

and then this in log

An uncaught NullReferenceException occurred and the application may resume.

Message: Odkaz na objekt není nastaven na instanci objektu.
Type: System.NullReferenceException
Source: youtube-dl-gui
Target Site: System.Windows.Forms.DialogResult <btnSettingsRedownloadYoutubeDl_Click>b__22_2()
Stacktrace:
   v youtube_dl_gui.frmSettings.<>c.<btnSettingsRedownloadYoutubeDl_Click>b__22_2()

========== OS  INFO ==========
Current Version: 3.2.1
Current Culture: Czech (Czech Republic)
System Caption: Microsoft Windows 7 Professional 
System Version: 6.1.7601
Service Pack Major: 1
Service Pack Minor: 0
========== END INFO ==========
murrty commented 1 year ago

I mean the general log, in the menu bar on the main form, Help -> Log

SGvagon commented 1 year ago

Ok, here is all log after start program, download video and then (re)download Youtube-DL

[2022.12.09 17:25:18.165] Logging has been enabled.
[2022.12.09 17:25:18.177] Creating unhandled exception event.
[2022.12.09 17:25:18.177] Creating unhandled thread exception event.
[2022.12.09 17:25:18.177] Creating ComputerVersionInformation for exceptions.
[2022.12.09 17:25:18.234] Loading Initialization config.
[2022.12.09 17:25:18.254] Loading Batch config.
[2022.12.09 17:25:18.261] Loading Converter config.
[2022.12.09 17:25:18.273] Loading Download config.
[2022.12.09 17:25:18.293] Loading Error config.
[2022.12.09 17:25:18.296] Loading General config.
[2022.12.09 17:25:18.311] Loading Saved config.
[2022.12.09 17:25:18.348] Resetting language values.
[2022.12.09 17:25:18.352] Loading internal english.
[2022.12.09 17:25:18.360] TLS 1.3 will be used.
[2022.12.09 17:25:18.364] No arguments are in the arguments array.
[2022.12.09 17:25:18.493] Checking for program update.
[2022.12.09 17:25:18.493] Startup finished.
[2022.12.09 17:25:18.802] Release found: 3.2.1
[2022.12.09 17:25:54.565] Beginning download for https://www.youtube.com/watch?v=r7YhQ9Gfpos.
[2022.12.09 17:25:54.584] Beginning download thread.
[2022.12.09 17:26:32.401] Checking for update provider
[2022.12.09 17:26:32.408] Using youtube-dls' internal updater to update the program.
[2022.12.09 17:26:32.409] Argument applied.
[2022.12.09 17:26:32.410] Given the appropriate file.
[2022.12.09 17:26:32.439] Assuming the update check finished.
[2022.12.09 17:26:32.440] An InvalidOperationException occurred.
murrty commented 1 year ago

Alright I think I got it, try this build and it should work.

youtube-dl-gui.zip zip sha256: B58C773A841CF4DB6EC50F8C3E43D5CE707E6B83618005024D973CC772D6E253

SGvagon commented 1 year ago

Hmm, now (re)download Youtube-dl button not working at all (only show blank CMD windows and then close) . If I deleted youtube-dl.exe file, it only play Windows error sound without any log after click on re-download button. Maybe because it's build version?

But strange is, I tried download youtube-dl in the latest v3.2.1 and it working again without any error.

murrty commented 1 year ago

That's expected. Updating youtube-dl is also done through the command line, and since I don't redirect the output during updating it will pop up a command line window and automatically close after it finishes.

I don't really have many plans to expand this part of youtube-dl updating since doing it through youtube-dl-gui can have more granular versioning control, less need to parse text.

SGvagon commented 1 year ago

Ok, so now all problems solved again :) . Thank you :) .