hama3254 / Crunchyroll-Downloader-v3.0

Downloader for Crunchyroll
836 stars 110 forks source link

Application Crash #471

Closed DJPlaya closed 2 years ago

DJPlaya commented 2 years ago

The application crashed randomly while downloading. Many other downloads succeeded before. Version: 3.8.5.0 Configuration: Single threaded downloading on default mode Host: Windows Server 2019 x64

Details from event manager about .net runtime:

Anwendung: Crunchyroll Downloader.exe
Frameworkversion: v4.0.30319
Beschreibung: Der Prozess wurde aufgrund einer unbehandelten Ausnahme beendet.
Ausnahmeinformationen: System.IO.IOException
   bei System.IO.__Error.WinIOError(Int32, System.String)
   bei System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean, Boolean, Boolean)
   bei System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, System.String, Boolean, Boolean, Boolean)
   bei System.IO.StreamWriter.CreateFile(System.String, Boolean, Boolean)
   bei System.IO.StreamWriter..ctor(System.String, Boolean, System.Text.Encoding, Int32, Boolean)
   bei System.IO.StreamWriter..ctor(System.String, Boolean, System.Text.Encoding)
   bei Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText(System.String, System.String, Boolean, System.Text.Encoding)
   bei Microsoft.VisualBasic.MyServices.FileSystemProxy.WriteAllText(System.String, System.String, Boolean)
   bei Crunchyroll_Downloader.Main.ProcessRequest(System.Net.Sockets.NetworkStream, System.String)
   bei Crunchyroll_Downloader.Main.ManageConnections(System.Net.Sockets.TcpClient)
   bei System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   bei System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   bei System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   bei System.Threading.ThreadHelper.ThreadStart()

Details from event manager about the application:

Name der fehlerhaften Anwendung: Crunchyroll Downloader.exe, Version: 3.8.5.0, Zeitstempel: 0x6262a682
Name des fehlerhaften Moduls: KERNELBASE.dll, Version: 10.0.17763.2803, Zeitstempel: 0xbfcd0c87
Ausnahmecode: 0xe0434352
Fehleroffset: 0x0000000000039319
ID des fehlerhaften Prozesses: 0x1688
Startzeit der fehlerhaften Anwendung: 0x01d85d4a20512f32
Pfad der fehlerhaften Anwendung: C:\Users\Administrator\Desktop\Servers\#Download\Crunchyroll-Downloader\Crunchyroll Downloader.exe
Pfad des fehlerhaften Moduls: C:\Windows\System32\KERNELBASE.dll
Berichtskennung: 4a3ca47e-ab36-4713-92be-fa4dd752b222
Vollständiger Name des fehlerhaften Pakets: 
Anwendungs-ID, die relativ zum fehlerhaften Paket ist: 

Tell me if you need the logs as XML version, sadly i cannot provide in-time debugging since its an production server.

hama3254 commented 2 years ago

the most likely culprit is the way i displayed error messages, i just saved them and used them like a normal file.

  My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\WebInterface\error_Page.html", ErrorPage, False)
  strRequest = rootPath & "error_Page.html"
  SendHTMLResponse(strRequest, stream)

now i changed the response function to allow direct access to the variables

  SendHTMLResponse(stream, Nothing, New ServerResponse(ErrorPage, "html"))

since this a rare issue testing the fix is not easy so a release might take some time but you can use the git version of the Crunchyroll Downloader.exe which you can use to replace your current one.

DJPlaya commented 2 years ago

Thanks for the quick fix, i will reopen this issue if this ever comes up again👍