Skip to main content

Notice

If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: My horrible code which crashes foobar v1.6 and bypasses the crash reporter (Read 254 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

My horrible code which crashes foobar v1.6 and bypasses the crash reporter

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: 1.6.0.0, 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....

https://github.com/kbuffington/foo_jscript_panel/blob/8e8375c109595b18e624e8709ee6d84effba66b4/src/script_interface/Utils.cpp#L39L63
^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-2020