gpt4 book ai didi

macos - 当我运行我的 cpp 文件时,由于未捕获的异常而终止应用程序

转载 作者:行者123 更新时间:2023-12-04 04:48:38 26 4
gpt4 key购买 nike

我试图使用 vtk 在 Qt creator 上可视化 pcd(点云数据类型)数据文件。但是它弹出了一些奇怪的错误。这是输出:

2018-12-25 01:06:59.667 test6[10199:1376847] *** 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 0x00007fff4dadbecd __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff79b97720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff4daf595d -[NSException raise] + 9
3 AppKit 0x00007fff4aff6c8e -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 324
4 AppKit 0x00007fff4aff407c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 1488
5 AppKit 0x00007fff4aff3aa6 -[NSWindow initWithContentRect:styleMask:backing:defer:] + 45
6 libvtkRenderingOpenGL2-8.1.1.dylib 0x000000010b7bbbae _ZN20vtkCocoaRenderWindow13CreateAWindowEv + 2136
7 libvtkRenderingOpenGL2-8.1.1.dylib 0x000000010b7bc1db _ZN20vtkCocoaRenderWindow10InitializeEv + 205
8 libvtkRenderingOpenGL2-8.1.1.dylib 0x000000010b7b9cb0 _ZN20vtkCocoaRenderWindow5StartEv + 18
9 libvtkRenderingOpenGL2-8.1.1.dylib 0x000000010b7b834c _ZN30vtkCocoaRenderWindowInteractor10InitializeEv + 56
10 libpcl_visualization.1.9.dylib 0x000000010c1ec797 _ZN3pcl13visualization13PCLVisualizer16createInteractorEv + 213
11 libpcl_visualization.1.9.dylib 0x000000010c1ec34e _ZN3pcl13visualization13PCLVisualizerC2ERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEb + 490
12 libpcl_visualization.1.9.dylib 0x000000010c2100f3 _ZN3pcl13visualization11CloudViewer16CloudViewer_implclEv + 49
13 libboost_thread-mt.dylib 0x000000010da602c8 _ZN5boost12_GLOBAL__N_112thread_proxyEPv + 136
14 libsystem_pthread.dylib 0x00007fff7ae59305 _pthread_body + 126
15 libsystem_pthread.dylib 0x00007fff7ae5c26f _pthread_start + 70
16 libsystem_pthread.dylib 0x00007fff7ae58415 thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

对此有什么想法吗?我的电脑是 Mojave 10.14.2

最佳答案

潜在的问题是所有 AppKit/GUI 调用都需要从主线程发生,但您的应用程序正在从非主线程调用 AppKit。我不确定这是您的代码问题还是您正在使用的库之一。

关于macos - 当我运行我的 cpp 文件时,由于未捕获的异常而终止应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53916139/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com