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

+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread. #171

Closed
emersion opened this issue Jul 21, 2016 · 4 comments

Comments

@emersion
Copy link
Contributor

2016-07-21 13:07:15.965 main[2119:2088547] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1259/Misc.subproj/NSUndoManager.m:359
2016-07-21 13:07:15.966 main[2119:2088547] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2016-07-21 13:07:15.971 main[2119:2088547] (
    0   CoreFoundation                      0x00007fff94e394f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff8d8d773c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff94e3e1ca +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff9b0ca856 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
    4   Foundation                          0x00007fff9b04faf1 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 170
    5   AppKit                              0x00007fff9256c31c _DPSNextEvent + 2385
    6   AppKit                              0x00007fff9256b226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
    7   AppKit                              0x00007fff9255fd80 -[NSApplication run] + 682
    8   main                                0x0000000004453b8b uiMain + 43
    9   main                                0x000000000405da70 runtime.asmcgocall + 112
)
2016-07-21 13:07:15.971 main[2119:2088547] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1259/Misc.subproj/NSUndoManager.m:359
2016-07-21 13:07:15.972 main[2119:2088547] An uncaught exception was raised
2016-07-21 13:07:15.973 main[2119:2088547] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.
2016-07-21 13:07:15.973 main[2119:2088547] (
    0   CoreFoundation                      0x00007fff94e394f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff8d8d773c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff94e3e1ca +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff9b0ca856 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
    4   Foundation                          0x00007fff9b04faf1 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 170
    5   AppKit                              0x00007fff9255febe -[NSApplication run] + 1000
    6   main                                0x0000000004453b8b uiMain + 43
    7   main                                0x000000000405da70 runtime.asmcgocall + 112
)
2016-07-21 13:07:15.973 main[2119:2088547] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff94e394f2 __exceptionPreprocess + 178
    1   libobjc.A.dylib                     0x00007fff8d8d773c objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff94e3e1ca +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x00007fff9b0ca856 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 198
    4   Foundation                          0x00007fff9b04faf1 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 170
    5   AppKit                              0x00007fff9255febe -[NSApplication run] + 1000
    6   main                                0x0000000004453b8b uiMain + 43
    7   main                                0x000000000405da70 runtime.asmcgocall + 112
)
libc++abi.dylib: terminating with uncaught exception of type NSException
SIGABRT: abort
PC=0x7fff8ddeff06 m=4
signal arrived during cgo execution
@andlabs
Copy link
Owner

andlabs commented Jul 22, 2016

What's your code?

@paulocoutinhox
Copy link

I think the problem is with UI package:

go get github.com/andlabs/ui

ld: warning: object file (/Users/paulo/Developer/workspaces/go/src/github.com/andlabs/ui/libui_darwin_amd64.a(libui-combined.o)) was built for newer OSX version (10.11) than being linked (10.8)

@andlabs
Copy link
Owner

andlabs commented May 24, 2017

That's an unrelated problem with a linking error in libui that will be fixed in the next stable-ish release. If that fix does fix this, then there are things about OS X that I do not understand...

@andlabs
Copy link
Owner

andlabs commented Mar 26, 2018

Merged with #280.

andlabs/libui#308 will fix the built for newer SDK version issue.

@andlabs andlabs closed this as completed Mar 26, 2018
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

No branches or pull requests

3 participants