SFML community forums

Help => Window => Topic started by: BlueCobold on March 22, 2015, 12:29:40 pm

Title: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: BlueCobold on March 22, 2015, 12:29:40 pm
Hi.

When having loaded resources in a thread on OS X, the application crashes on exit due to a failed assertion in AutoReleasePoolWrapper.

Minimal sample:
(click to show/hide)

Stacktrace:
(click to show/hide)

PS: I'm using current master version from github.
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: Hiura on March 22, 2015, 03:48:18 pm
This is a known issue. See workaround here: https://github.com/SFML/SFML/issues/790
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: BlueCobold on March 22, 2015, 05:53:53 pm
Sounds like a very odd workaround, but I will give it a try. Good to see that it is already known. Thanks.
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: BlueCobold on August 18, 2015, 02:53:59 pm
This workaround did work some time ago, but now I get that error again.
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: Hiura on August 18, 2015, 06:50:15 pm
Just to be sure, you mean that the SSCCE with the mentioned workaround from https://github.com/SFML/SFML/issues/790 no longer work, or that the workaround no longer work with your minimal example from above, or both no longer work at all?
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: BlueCobold on August 19, 2015, 09:03:07 am
The SSCCE doesn't cover my use-case (it is drawing in a separate thread whereas I draw in the main thread and just load resources in another), so I didn't try it.
My minimal sample from above though crashes even when using the workaround from issue 790 (calling sf::Shader::isAvailable()) as first line (or just about anywhere) in the main() function.
SFML 2.3.1
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: Hiura on August 20, 2015, 12:49:29 pm
Okay, thanks for the precisions. I really need to address this issue but I don't know when I'll have some time...  :-\
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: Hiura on September 08, 2015, 10:59:28 am
Patch available: could you head over https://github.com/SFML/SFML/pull/962 and give it a try? Thanks
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: BlueCobold on September 10, 2015, 10:44:19 am
I will as soon as I have access to my pcs again.
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: BlueCobold on September 21, 2015, 01:57:22 pm
Looks fine with this PR from what I can tell.
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: Hiura on September 21, 2015, 05:05:18 pm
Great! thanks for your feedback.  :)
Title: Re: [Mac] SFContext::~SFContext crashes due to failed assertion
Post by: BlueCobold on September 21, 2015, 07:13:44 pm
Thanks for your fix.