HydrogenAudio

Hosted Forums => foobar2000 => Support - (fb2k) => Topic started by: Ottodix on 2019-06-12 14:52:31

Title: Foobar 1.4.4 crashes
Post by: Ottodix on 2019-06-12 14:52:31
Hi,

I experience random crashes since.... i don't know probably since 1.4.3, but i'm not sure.
The error message in the failure report is always the same:
Code: [Select]
Illegal operation:
Code: AA67913Ch, flags: 00000001h, address: 773133D2h
Bug check

Call path not available.

I did a memory dump of the frozen foobar_2000 process, and uploaded it on google drive, here it is. There is also the automatic dump created by foobar, and the failure report there. (https://drive.google.com/open?id=1Qt9A-S9wIPb25AcXz26rixYbSjM8mHY6)
My guess is that the crash is related to Spider Monkey Panel, even if the repport says "Crash location: Module: KERNELBASE". Most of my layout is powered by this component, but I prefer avoiding annoying the developer without being sure, because... because i may be wrong : )
Title: Re: Foobar 1.4.4 crashes
Post by: Peter on 2019-06-14 18:21:42
Thanks for reporting.

I've seen similar crash reports submitted before and made an attempted workaround in foobar2000 v1.4.5.
Please try the latest foobar2000 v1.4.5 beta and see if the problem persists.
Title: Re: Foobar 1.4.4 crashes
Post by: Ottodix on 2019-06-14 20:19:30
Thanks, installed, i'll let you know
Title: Re: Foobar 1.4.4 crashes
Post by: TheQwertiest on 2019-06-14 21:00:14
but I prefer avoiding annoying the developer without being sure, because... because i may be wrong
Well, usually it's the other way around - you should annoy component developer first before annoying fb2k dev =) Since it's much more likely that the problem is in the component and @Peter is probably much busier (<rant> seeing as he ignores most of my questions directed at him :| </rant>)

@Peter : could it be that contextmenu_manager(and all other services) should be destroyed only in the main thread?
Title: Re: Foobar 1.4.4 crashes
Post by: Ottodix on 2019-06-15 11:48:49
Maybe you are too pessimist about your own work : ) Or maybe Peter found the right workaround. It needs more time to be sure that the bug isn't there anymore, but so far, no crash, and I used to have 2 or 3 crashs a day.
Title: Re: Foobar 1.4.4 crashes
Post by: Sergey77 on 2019-06-16 18:17:36
I noticed that fb2k sometimes "freezes" without response when closing the program while listening to Internet radio.
Before that two scripts in the Spider Monkey Panel were active.
fb2k v1.4.5 beta2
SMP v1.2.1
Biography v1.1.0
YouTube Track Manager v4.1.0
Title: Re: Foobar 1.4.4 crashes
Post by: Peter on 2019-06-17 10:38:38
@Peter : could it be that contextmenu_manager(and all other services) should be destroyed only in the main thread?
It was indeed an undocumented assumption that they should only be destroyed from the main thread. I made them resistant to off-main-thread destruction after seeing the reports, as was never explicitly specified before.
Title: Re: Foobar 1.4.4 crashes
Post by: TheQwertiest on 2019-06-17 11:37:24
@Peter : seems reasonable. What about the following objects? Are they safe to destroy off the main thread after your changes in 1.4.5?

@Sergey : please create a memory dump during the using the following instructions (https://github.com/TheQwertiest/foo_spider_monkey_panel/issues/61#issuecomment-470036761) and post it in SMP support thread (https://hydrogenaud.io/index.php/topic,116669.175.html).

PS: And please, use only SMP support thread for reporting SMP issues in the future =)
Title: Re: Foobar 1.4.4 crashes
Post by: Peter on 2019-06-17 12:27:04
Only the menu manager object (mainmenu_manager, contextmenu_manager) and ui_edit_context were unsafe to destroy off main thread. Everything else can be safely destroyed in any thread, at least as far as I am aware of.

There is a mechanism built into the framework already to guard against this issue - serviceRequiresMainThreadDestructor(), but it wasn't deployed until recently. I mitigated the issue on my end by enabling it for affected classes.
Title: Re: Foobar 1.4.4 crashes
Post by: Ottodix on 2019-06-20 08:21:15
It's been 5 days, for sure your fix works. I didn't experience any crashs. Thanks!