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

Phoenix.reload causes a crash #169

Closed
metakirby5 opened this issue Mar 1, 2017 · 4 comments
Closed

Phoenix.reload causes a crash #169

metakirby5 opened this issue Mar 1, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@metakirby5
Copy link
Contributor

  • Version: 2.5.1 (60)
  • macOS: 10.12.3 (16D32)

This only happens sometimes - I'll post again when I can consistently reproduce.

Keybinding:

Key.on 'r', ['cmd', 'alt', 'ctrl'], -> Phoenix.reload()

Console log:

default	19:04:00.386696 -0800	Phoenix	subsystem: com.apple.AppKit, category: General, enable_level: 0, persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0, generate_symptoms: 0, enable_oversize: 1, privacy_setting: 0, enable_private_data: 0
error	19:04:00.386739 -0800	Phoenix	An uncaught exception was raised

error	19:04:00.386793 -0800	Phoenix	<private>
error	19:04:00.386847 -0800	Phoenix	<private>
default	19:04:00.386925 -0800	Phoenix	*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSConcreteTask terminationStatus]: task still running'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff83d1ee7b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fff98908cad objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff83d9d99d +[NSException raise:format:] + 205
	3   Foundation                          0x00007fff8574f7ec -[NSConcreteTask terminationStatus] + 189
	4   Phoenix                             0x000000010fd62499 +[NSTask(PHExtension) outputFromLaunchedTaskWithEnvironment:arguments:error:] + 713
	5   Phoenix                             0x000000010fd620e1 +[NSTask(PHExtension) searchPath] + 225
	6   Phoenix                             0x000000010fd558ef +[PHShebangPreprocessor process:atPath:error:] + 287
	7   Phoenix                             0x000000010fd4ce00 -[PHContext loadScript:] + 240
	8   Phoenix
default	19:04:00.399257 -0800	kernel	AMFI: allowing exception handler for 'Phoenix' (46476) because the process is not restricted.
@kasper
Copy link
Owner

kasper commented Mar 1, 2017

Could this now be caused by your fix in #168? Seems related.

@metakirby5
Copy link
Contributor Author

It's very probable, given that the stack trace goes through PHShebangPreprocessor.

I think it might be a race condition from task.terminationStatus being accessed prior to [task waitUntilExit]. I might know how to fix it, though, so I'll report back in a bit.

@metakirby5
Copy link
Contributor Author

metakirby5 commented Mar 1, 2017

Seems solid so far; changes are in latest commit of #168.

In retrospect, the log message makes total sense - maybe I should have actually read it :)

@kasper kasper added the bug label Dec 17, 2017
@kasper kasper added this to the 2.6 milestone Dec 17, 2017
@kasper
Copy link
Owner

kasper commented Dec 17, 2017

Fixed in #198.

@kasper kasper closed this as completed Dec 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants