stevenlovegrove / Pangolin

Pangolin is a lightweight portable rapid development library for managing OpenGL display / interaction and abstracting video input.
MIT License
2.39k stars 855 forks source link

'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!' #923

Open GHFlibrary opened 7 months ago

GHFlibrary commented 7 months ago
@air ORB_SLAM2 % ./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt ./Examples/Monocular/TUM1.yaml /Users/ghf/SLAM/dataset/rgbd_dataset_freiburg1_360 

ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: Monocular

Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!

Camera Parameters: 
- fx: 517.306
- fy: 516.469
- cx: 318.643
- cy: 255.314
- k1: 0.262383
- k2: -0.953104
- k3: 1.16331
- p1: -0.005358
- p2: 0.002628
- fps: 30
- color order: RGB (ignored if grayscale)

ORB Extractor Parameters: 
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7

-------
Start processing sequence ...
Images in the sequence: 756

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
        0   CoreFoundation                      0x0000000189526ccc __exceptionPreprocess + 176
        1   libobjc.A.dylib                     0x000000018900e788 objc_exception_throw + 60
        2   AppKit                              0x000000018d4fb748 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3096
        3   libpango_windowing.dylib            0x000000010616de28 +[PangolinNSApplication run_step] + 56
        4   libpango_windowing.dylib            0x000000010616858c _ZN8pangolin9OsxWindowC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEiibj + 160
        5   libpango_windowing.dylib            0x000000010616c48c _ZZN8pangolin24RegisterOsxWindowFactoryEvEN16OsxWindowFactory4OpenERKNS_3UriE + 1124
        6   libpango_windowing.dylib            0x000000010616f204 _ZN8pangolin15FactoryRegistry9ConstructINS_15WindowInterfaceEEENSt3__110unique_ptrIT_NS3_14default_deleteIS5_EEEERKNS_3UriE + 896
        7   libpango_windowing.dylib            0x000000010616ee20 _ZN8pangolin15ConstructWindowERKNS_3UriE + 52
        8   libpango_display.dylib              0x0000000106d0c700 _ZN8pangolin19CreateWindowAndBindENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiRKNS_6ParamsE + 1872
        9   libORB_SLAM2.dylib                  0x0000000104dc9ea8 _ZN9ORB_SLAM26Viewer3RunEv + 108
        10  libORB_SLAM2.dylib                  0x0000000104d3f58c _ZNSt3__114__thread_proxyB8ue170006INS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN9ORB_SLAM26ViewerEFvvEPS8_EEEEEPvSD_ + 72
        11  libsystem_pthread.dylib             0x00000001893d2f94 _pthread_start + 136
        12  libsystem_pthread.dylib             0x00000001893cdd34 thread_start + 8
)
libc++abi: terminating due to uncaught exception of type NSException
zsh: abort      ./Examples/Monocular/mono_tum Vocabulary/ORBvoc.txt 

Using the macbook air m2 to deploy ORB-SLAM2 there is a threading problem, this problem is currently online there is no solution, please help. Thank you very much!