Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes crashes on quitting #77

Closed
wants to merge 1 commit into from
Closed

Conversation

poke1024
Copy link
Contributor

@poke1024 poke1024 commented Jul 29, 2018

Fixes the crashes described in #76, which are due to:

  • the audio thread calling into V8 after it's been already destroyed
  • the V8 Global destructor running in the application shutdown after exit(), which crashes on macOS

EDIT Tested on d14d0d6 (currently packaged KodeStudio version), since master doesn't work at all on macOS currently due to Metal issues. Works fine now on d14d0d6 though.

@RobDangerous
Copy link
Member

Oh, sorry, too much changed for this one but we should have a look a closing behavior again soon.

@poke1024
Copy link
Contributor Author

I'll see if I can find time to look at the new code and if is has any of the effects.

For the record, there were two separate problems:

(1) the core audio thread under macOS wasn't stopped on quit, i.e. a call to Kore::Audio2::shutdown(); was missing, and the thread crashed when accessing stuff that the main thread had already destroyed
(2) various V8 refs, that were not reset before quit, caused crashes in their shared ptr destructors (I don't remember details).

Krom switched from V8 to Chakra? Cool.

@RobDangerous
Copy link
Member

Aye. And debugging is finally working...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants