Hydrogenaudio Forums

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: snotlicker on 2020-07-02 11:57:26

Title: My horrible code which crashes foobar v1.6 and bypasses the crash reporter
Post by: snotlicker on 2020-07-02 11:57:26
Of course the offending component is JScript Panel. It only happens when scripts make use of the utils.CheckFont which is commonly use in the include playlist viewer/browser scripts and other scripts out in the wild.

The changes were intrduced some months ago and worked fine in v1.4.x and v1.5x but it crashes horribly in v1.6 and doesn't give the user any clue as to the cause because the crash reporter isn't triggered. Instead, you get a generic windows popup dialog with text something like this in event viewer...

Code: [Select]
Faulting application name: foobar2000.exe, version:, time stamp: 0x5efb71b0
Faulting module name: ntdll.dll, version: 10.0.19041.207, time stamp: 0x1bdbc4b8
Exception code: 0xc0000374
Fault offset: 0x000e5af3
Faulting process id: 0x1490
Faulting application start time: 0x01d64f17e32f1cec
Faulting application path: C:\Program Files (x86)\foobar2000\foobar2000.exe
Faulting module path: C:\WINDOWS\SYSTEM32\ntdll.dll
Report Id: 26cf9a7e-ee2b-4c02-8c14-6d43beceaa5e
Faulting package full name:
Faulting package-relative application ID:

I'd like to apologise to anyone affected by this. An updated component is available here: https://hydrogenaud.io/index.php?topic=118824.msg984997#new

The offending code appears to be my probable misuse of pfc::ptr_holder_t here....

^that's not me or my repo but the latest public copy

Even with a debug build and Visual Studio attached, I only got directed to where scripts get parsed so it took much trial and error to fix it.

SimplePortal 1.0.0 RC1 © 2008-2021