You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is because of current implementation of setTerminate in excpt.nim which doesn't handle the objc case.
this is especially problematic when such exceptions are thrown in an unsuspecting way, eg if calling a (nim-wrapped) cv::imshow from a non-main-thread, on OSX, it'll throw a objc exception, but nim will hide all useful info and just write Error: unhandled unknown cpp exception instead of smthg like:
2019-11-13 13:07:43.073 smartcam_main[48737:17265707] *** 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 0x00007fff2dc9bf53 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff63d61835 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2dcb652c -[NSException raise] + 9
3 AppKit 0x00007fff2ae6a6b2 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 310
4 AppKit 0x00007fff2ae67bc1 -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1416
5 AppKit 0x00007fff2ae67633 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 42
6 AppKit 0x00007fff2b0fa0d8 -[NSWindow initWithContentRect:styleMask:backing:defer:screen:] + 52
7 libopencv_highgui.4.1.dylib 0x000000010e055496 cvNamedWindow + 368
8 libopencv_highgui.4.1.dylib 0x000000010e054fa4 cvShowImage + 95
when nim's setTerminate isn't called
The text was updated successfully, but these errors were encountered:
objective C exceptions not handled properly
D20191113T130903
Example
Current Output
Expected Output
should show stacktrace, exception name, reason, userData (see https://developer.apple.com/documentation/foundation/nsexception)
Additional Information
this is because of current implementation of
setTerminate
in excpt.nim which doesn't handle the objc case.this is especially problematic when such exceptions are thrown in an unsuspecting way, eg if calling a (nim-wrapped) cv::imshow from a non-main-thread, on OSX, it'll throw a objc exception, but nim will hide all useful info and just write
Error: unhandled unknown cpp exception
instead of smthg like:when nim's
setTerminate
isn't calledThe text was updated successfully, but these errors were encountered: