fix(windows): release FFmpeg memory and capture native crashes (#1668)

This commit is contained in:
Levi authored and GitHub committed 2026-11-14 11:28:39 +08:00
1 parent 6cd95507fd
commit 6f7fd056ef
17 files changed
+486 -17

No files matched your search

+3 -2
View File
@@ -2659,11 +2659,12 @@ func logPanic(logDir string) {
if err := util.CreateDirIfNotExist(logDir); err != nil {
return
}
f, err := os.Create(filepath.Join(logDir, "crash.log"))
f, err := os.OpenFile(filepath.Join(logDir, "crash.log"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0600)
if err != nil {
return
}
debug.SetCrashOutput(f, debug.CrashOptions{})
defer f.Close() // SetCrashOutput duplicates the descriptor.
_ = debug.SetCrashOutput(f, debug.CrashOptions{})
}
func (d *Downloader) assignFetcherManager(task *Task) error {