Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Mac] SFContext::~SFContext crashes due to failed assertion  (Read 3698 times)

0 Members and 1 Guest are viewing this topic.

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
[Mac] SFContext::~SFContext crashes due to failed assertion
« 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.
« Last Edit: March 22, 2015, 12:43:19 pm by BlueCobold »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #1 on: March 22, 2015, 03:48:18 pm »
This is a known issue. See workaround here: https://github.com/SFML/SFML/issues/790
SFML / OS X developer

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #2 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.

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #3 on: August 18, 2015, 02:53:59 pm »
This workaround did work some time ago, but now I get that error again.
« Last Edit: August 18, 2015, 02:56:39 pm by BlueCobold »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #4 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?
SFML / OS X developer

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #5 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
« Last Edit: August 19, 2015, 09:09:27 am by BlueCobold »

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #6 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...  :-\
SFML / OS X developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #7 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
SFML / OS X developer

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #8 on: September 10, 2015, 10:44:19 am »
I will as soon as I have access to my pcs again.

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #9 on: September 21, 2015, 01:57:22 pm »
Looks fine with this PR from what I can tell.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #10 on: September 21, 2015, 05:05:18 pm »
Great! thanks for your feedback.  :)
SFML / OS X developer

BlueCobold

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: [Mac] SFContext::~SFContext crashes due to failed assertion
« Reply #11 on: September 21, 2015, 07:13:44 pm »
Thanks for your fix.

 

anything