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

Bug: eqMac crashed due to: "NSWindow drag regions should only be invalidated on the Main Thread!" #222

Closed
1 task done
nodeful opened this issue Apr 19, 2020 · 25 comments
Closed
1 task done

Comments

@nodeful
Copy link
Collaborator

nodeful commented Apr 19, 2020

Disclaimer:
Please go through existing issues to avoid creating duplicates. If you found a similar issue please post a comment there. If you are uncertain your issue is related to others then create the issue. Obvious ignorance of this rule might get you blocked from posting new issues. Please tick the box below to show that you have followed the guideline.

  • I have checked for a similar issue and sure it hasn't been reported before.

Describe the bug
Reported in #216
eqMac crashed due to error:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'

Steps to Reproduce
Could not reproduce my end. Waiting for users to report on what they did to cause such error to occur

Setup information:
Waiting for users to report the fields below

  • macOS Version: [e.g. 10.15]
  • eqMac Version [e.g. 0.0.1] (if audio related issue)

Screenshots or Console.app logs
Full crash dump from issue #216

$ /Applications/eqMac.app/Contents/MacOS/eqMac
2020-04-17 09:44:43.753 eqMac[3488:47533] Sentry Started -- Version: 4.4.0
Error: 561211770 ->  /Users/romanskisils/Programming/Bitgapp/eqmac/native/app/Source/Audio/Sources/System/Driver.swift:68

Error: 561211770 ->  /Users/romanskisils/Programming/Bitgapp/eqmac/native/app/Source/Audio/Sources/System/Driver.swift:107

2020-04-17 09:44:47.106 eqMac[3488:47573] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff3720cd07 __exceptionPreprocess + 250
	1   libobjc.A.dylib                     0x00007fff6ff305bf objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff3723550c -[NSException raise] + 9
	3   AppKit                              0x00007fff3443c24c -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 310
	4   AppKit                              0x00007fff34423cb2 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
	5   AppKit                              0x00007fff34604a15 -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 50
	6   AppKit                              0x00007fff34423723 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
	7   AppKit                              0x00007fff346049ca -[NSPanel initWithContentRect:styleMask:backing:defer:] + 64
	8   AppKit                              0x00007fff34421709 -[NSWindowTemplate nibInstantiate] + 393
	9   AppKit                              0x00007fff343ebaa6 -[NSIBObjectData instantiateObject:] + 253
	10  AppKit                              0x00007fff343eb160 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 534
	11  AppKit                              0x00007fff343df331 loadNib + 401
	12  AppKit                              0x00007fff343de8f2 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 693
	13  AppKit                              0x00007fff343de548 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
	14  AppKit                              0x00007fff347a71c4 -[NSAlert init] + 101
	15  eqMac                               0x0000000107d62dc6 eqMac + 269766
	16  eqMac                               0x0000000107d62cba eqMac + 269498
	17  eqMac                               0x0000000107d27c14 eqMac + 27668
	18  eqMac                               0x0000000107d2798d eqMac + 27021
	19  eqMac                               0x0000000107d29e5b eqMac + 36443
	20  eqMac                               0x0000000107d2a4d9 eqMac + 38105
	21  eqMac                               0x0000000107d42660 eqMac + 136800
	22  libdispatch.dylib                   0x00007fff7107e658 _dispatch_client_callout + 8
	23  libdispatch.dylib                   0x00007fff71080818 _dispatch_continuation_pop + 414
	24  libdispatch.dylib                   0x00007fff710904be _dispatch_source_invoke + 2084
	25  libdispatch.dylib                   0x00007fff71083af6 _dispatch_lane_serial_drain + 263
	26  libdispatch.dylib                   0x00007fff710845d6 _dispatch_lane_invoke + 363
	27  libdispatch.dylib                   0x00007fff7108dc09 _dispatch_workloop_worker_thread + 596
	28  libsystem_pthread.dylib             0x00007fff712d8a3d _pthread_wqthread + 290
	29  libsystem_pthread.dylib             0x00007fff712d7b77 start_wqthread + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException
[1]    3488 abort      /Applications/eqMac.app/Contents/MacOS/eqMac

Additional information
Waiting for a chance to see the error happen to myself, also waiting for more info from users.

@fbcd4f50ea5350f051450323b5abfd0b
Copy link

fbcd4f50ea5350f051450323b5abfd0b commented Apr 19, 2020

Roman, I'm very sorry I caused unnecessary work.
After some searching I found the problem. The program LuLu had caused the problems and it had nothing to do with eqMac.

Sorry again!

@nodeful
Copy link
Collaborator Author

nodeful commented Apr 19, 2020

Well I think someone else reported this as well somewhere 😅 I will see if anyone else leaves any feedback and if not I will close this

@nodeful
Copy link
Collaborator Author

nodeful commented Apr 24, 2020

I will close this issue. Please comment on this issue if this error reoccurs. Thanks

@erikhuizinga
Copy link

Still an issue with eqMac 0.1.0 beta on macOS 10.14.6.

@nodeful
Copy link
Collaborator Author

nodeful commented Apr 28, 2020

Reported again in #256

@nodeful nodeful reopened this Apr 28, 2020
@res88
Copy link

res88 commented May 1, 2020

Still crashes everytime on startup with 0.1.1

Process: eqMac [1073]
Path: /Applications/eqMac.app/Contents/MacOS/eqMac
Identifier: com.bitgapp.eqmac
Version: v0.1.1 (0.1.1)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: eqMac [1073]
User ID: 502

Date/Time: 2020-05-01 08:56:48.014 -0400
OS Version: Mac OS X 10.15.4 (19E287)
Report Version: 12
Bridge OS Version: 3.0 (14Y908)

Time Awake Since Boot: 1200 seconds

System Integrity Protection: enabled

Crashed Thread: 2 Dispatch queue: check-driver-shown

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
terminating with uncaught exception of type NSException
abort() called

Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff380bfd07 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff70de35bf objc_exception_throw + 48
2 CoreFoundation 0x00007fff380e850c -[NSException raise] + 9
3 AppKit 0x00007fff352ef24c -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 310
4 AppKit 0x00007fff352d6cb2 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
5 AppKit 0x00007fff354b7a15 -[NSPanel _initContent:styleMask:backing:defer:contentView:] + 50
6 AppKit 0x00007fff352d6723 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
7 AppKit 0x00007fff354b79ca -[NSPanel initWithContentRect:styleMask:backing:defer:] + 64
8 AppKit 0x00007fff352d4709 -[NSWindowTemplate nibInstantiate] + 393
9 AppKit 0x00007fff3529eaa6 -[NSIBObjectData instantiateObject:] + 253
10 AppKit 0x00007fff3529e160 -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 534
11 AppKit 0x00007fff35292331 loadNib + 401
12 AppKit 0x00007fff352918f2 +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 693
13 AppKit 0x00007fff35291548 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
14 AppKit 0x00007fff3565a1c4 -[NSAlert init] + 101
15 eqMac 0x000000010e676826 eqMac + 268326
16 eqMac 0x000000010e67673d eqMac + 268093
17 eqMac 0x000000010e63b6c4 eqMac + 26308
18 eqMac 0x000000010e63b432 eqMac + 25650
19 eqMac 0x000000010e63d78b eqMac + 34699
20 eqMac 0x000000010e6570a9 eqMac + 139433
21 libdispatch.dylib 0x00007fff71f31658 _dispatch_client_callout + 8
22 libdispatch.dylib 0x00007fff71f33818 _dispatch_continuation_pop + 414
23 libdispatch.dylib 0x00007fff71f434be _dispatch_source_invoke + 2084
24 libdispatch.dylib 0x00007fff71f36af6 _dispatch_lane_serial_drain + 263
25 libdispatch.dylib 0x00007fff71f375d6 _dispatch_lane_invoke + 363
26 libdispatch.dylib 0x00007fff71f40c09 _dispatch_workloop_worker_thread + 596
27 libsystem_pthread.dylib 0x00007fff7218ba3d _pthread_wqthread + 290
28 libsystem_pthread.dylib 0x00007fff7218ab77 start_wqthread + 15

@erikhuizinga
Copy link

For me too

@dincercelik
Copy link

Same here with 0.1.1 on Catalina 10.15.4

eqMac_2020-05-09-120131_Dincers-MacBook-Air.crash.zip

@nodeful
Copy link
Collaborator Author

nodeful commented May 17, 2020

Just release v0.2.0 please check if the issue still persists.
Download from website, GitHub release or update from within the app directly :)

@erikhuizinga
Copy link

v0.2.0 did start correctly for me, instead of immediately crashing, so that's progress. Let's await some hours of testing before concluding that this is fixed.

@nodeful
Copy link
Collaborator Author

nodeful commented May 24, 2020

I'm closing this issue for now as it's seems it's fine now as of v0.2 If that is not the case please tell me and I will reopen the issue

@nodeful nodeful closed this as completed May 24, 2020
@nodeful
Copy link
Collaborator Author

nodeful commented May 27, 2020

Reopening as people have reported this problem still persisting even in v0.2.0

@ZyroBlue
Copy link

Reopening as people have reported this problem still persisting even in v0.2.0

Sorry, my bad, I didn't know that I could reply to closed bugs. Very new to Github.

@ZyroBlue
Copy link

Well, I just got 10.15.5 and it works again. Sorry for bringing this up.

@kk7ds
Copy link

kk7ds commented May 27, 2020

eqMac 0.2 was working fine for me until today, where it won't run. Starts up, I see the menu bar icon for a couple seconds, then it goes away. Here's what seems relevant from the crash log:

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should
only be invalidated on the Main Thread!'
terminating with uncaught exception of type NSException
abort() called

@kk7ds
Copy link

kk7ds commented May 27, 2020

I've also deleted everything in ~/Library with eqMac in the name and can't get it to come back to life. It also seems like maybe it's remembering stuff some other way, because it seems to still be starting up in menubar-only mode, which isn't the default, IIRC.

@nodeful
Copy link
Collaborator Author

nodeful commented May 29, 2020

Hey guys, can you please check if you have Microphone read access enabled in your System Preferences > Security & Privacy > Privacy tab > Microphone section > eqMac should be checked:
image
I've encountered the NSWindow drag issue when tried to disable access to the microphone!
eqMac needs access to the Microphone as that's how it reads the System Audio...

@kk7ds
Copy link

kk7ds commented May 29, 2020

Yep, eqMac has microphone perms enabled on my system. BUT, if I disable it and then start eqMac, I get the "allow microphone permission?" dialog. I click "proceed" and eqMac crashes immediately. If I then approve it again and re-start eqmac, it loads and doesn't exit!

So, I think you're on to something there, even though it's more complicated than just not being permitted (according to the check box).

I'm on Mojave, by the way.

@nodeful
Copy link
Collaborator Author

nodeful commented May 29, 2020

I realised the underlying cause of why it's happening, but I'm not sure where is it happening from, if that makes sense. I will try to mitigate the underlying issue and also release a new version with Debug Symbols included, so the crash logs have more information I can use.

@kk7ds
Copy link

kk7ds commented May 29, 2020

Cool, well, at least I have a workaround, so very much appreciate that. I'll be glad to run the version with symbols and re-report if I can reproduce it again.

@nodeful
Copy link
Collaborator Author

nodeful commented May 30, 2020

Can you please download pre-release version v0.2.1 from here:
https://github.com/bitgapp/eqMac/releases/tag/v0.2.1
And test if this issue still persists.
Thanks

@kk7ds
Copy link

kk7ds commented Jun 1, 2020

I get "unable to activate audio driver" when I start that version. I "try again" just causes it to exit. What am I doing wrong?

@Nitebreed
Copy link

I was having this issue on previous versions as well, and also as @kk7ds is saying v.0.2.1 shows 'Driver failed to activate' when starting up.

@erikhuizinga
Copy link

I get "unable to activate audio driver" when I start that version. I "try again" just causes it to exit. What am I doing wrong?

I was having this issue on previous versions as well, and also as @kk7ds is saying v.0.2.1 shows 'Driver failed to activate' when starting up.

That should be reported as a separate issue for this version. Possibly equal to #291, although that issue doesn't specify the app version. Report there.

@nodeful
Copy link
Collaborator Author

nodeful commented Jun 22, 2020

This issue should be resolved in v0.3.1.
Please update the app and let me know if this issue is still relevant. Thank you

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

No branches or pull requests

8 participants