UZ-SLAMLab / ORB_SLAM3

ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM
GNU General Public License v3.0
6.55k stars 2.55k forks source link

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

Closed Janmajayamall closed 3 years ago

Janmajayamall commented 3 years ago

Hi, I was trying to run mono_euroc example on my device (MacOS 11.0.1) and the command crashes. I have mentioned the details below.

Command executed -

./Examples/Monocular/mono_euroc ./Vocabulary/ORBvoc.txt ./Examples/Monocular/EuRoC.yaml ./Datasets/MH01 ./Examples/Monocular/EuRoC_TimeStamps/MH01.txt dataset-MH01_mono

Output -

num_seq = 1
file name: dataset-MH01_mono
Loading images for sequence 0...LOADED!

-------

ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, 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!

Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name:

Camera Parameters:
- Camera: Pinhole
- fx: 458.65399169921875
- fy: 457.29598999023438
- cx: 367.21499633789062
- cy: 248.375
- k1: -0.28340810537338257
- k2: 0.073959067463874817
- p1: 0.00019359000725671649
- p2: 1.7618711353861727e-05
- fps: 20
- color order: RGB (ignored if grayscale)

ORB Extractor Parameters:
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2000000476837158
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7
2020-12-03 04:51:42.722 mono_euroc[43304:120160] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff204816af __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007fff201b93c9 objc_exception_throw + 48
    2   AppKit                              0x00007fff22c1e310 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4379
    3   libpangolin.dylib                   0x000000010585d8c0 +[PangolinNSApplication run_step] + 96
    4   libpangolin.dylib                   0x000000010585ac4e _ZN8pangolin9OsxWindowC2ERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEiib + 222
    5   libpangolin.dylib                   0x000000010585bcfd _ZZN8pangolin24RegisterOsxWindowFactoryEvEN16OsxWindowFactory4OpenERKNS_3UriE + 941
    6   libpangolin.dylib                   0x00000001057e59c0 _ZN8pangolin15FactoryRegistryINS_14VideoInterfaceEE4OpenERKNS_3UriE + 64
    7   libpangolin.dylib                   0x00000001057e4b1a _ZN8pangolin19CreateWindowAndBindENSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEEiiRKNS_6ParamsE + 1242
    8   libORB_SLAM3.dylib                  0x0000000101ed2ab5 _ZN9ORB_SLAM36Viewer3RunEv + 133
    9   libORB_SLAM3.dylib                  0x0000000101d53a3e _ZNSt3__1L14__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEMN9ORB_SLAM36ViewerEFvvEPS8_EEEEEPvSD_ + 62
    10  libsystem_pthread.dylib             0x00007fff2030f950 _pthread_start + 224
    11  libsystem_pthread.dylib             0x00007fff2030b47b thread_start + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException
zsh: abort      ./Examples/Monocular/mono_euroc ./Vocabulary/ORBvoc.txt  ./Datasets/MH01

Thanks for your help :) !

ghost commented 2 years ago

Same issue here. I am on MacOS Monterey with M1 CPU. Have you solved it ?