introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.81k stars 787 forks source link

iOS app crashes on map load (radiusSearch) #1347

Open zeeyang opened 1 month ago

zeeyang commented 1 month ago

I'm seeing some occasional crashes on map load. Unfortunately I wasn't able to get a crash log with debug symbols.

Thread 3 Crashed:
0   RTABMapApp                          0x0000000102d92d38 _mh_execute_header + 453944
1   RTABMapApp                          0x0000000102d57640 _mh_execute_header + 210496
2   RTABMapApp                          0x000000010320f0b8 _ZNK3pcl6search6SearchINS_15PointXYZINormalEE12radiusSearchERKNS_10PointCloudIS2_EERKNSt3__16vectorIiNS8_9allocatorIiEEEEdRNS9_ISC_NSA_ISC_EEEERNS9_INS9_IfNSA_IfEEEENSA_ISJ_EEEEj + 184948
3   RTABMapApp                          0x000000010320ee50 _ZNK3pcl6search6SearchINS_15PointXYZINormalEE12radiusSearchERKNS_10PointCloudIS2_EERKNSt3__16vectorIiNS8_9allocatorIiEEEEdRNS9_ISC_NSA_ISC_EEEERNS9_INS9_IfNSA_IfEEEENSA_ISJ_EEEEj + 184332
4   RTABMapApp                          0x00000001032123c4 _ZNK3pcl6search6SearchINS_15PointXYZINormalEE12radiusSearchERKNS_10PointCloudIS2_EERKNSt3__16vectorIiNS8_9allocatorIiEEEEdRNS9_ISC_NSA_ISC_EEEERNS9_INS9_IfNSA_IfEEEENSA_ISJ_EEEEj + 198016
5   RTABMapApp                          0x0000000103212484 _ZN8UThreadCIvE17ThreadMainHandlerEPNS0_8InstanceE + 128
6   libsystem_pthread.dylib             0x00000002121a137c _pthread_start + 136
7   libsystem_pthread.dylib             0x000000021219c494 thread_start + 8

It appears PointXYZ is not valid. https://github.com/introlab/rtabmap/blob/8c0e57bc52e9b4766db3e9d602153ae17d114f70/corelib/src/Rtabmap.cpp#L5008-L5009

matlabbe commented 1 month ago

Hi,

Thanks for reporting the issue. Just to clarify, when you say "on map load", do you mean after clicking on a map in the library, it crashes during the "Loading..." dialog box? The function radiusSearch() is used in many places (e..g, when searching nearest neighbors in point clouds). If you have a map that always crashes when you try to load, that could be useful if you could share it.

cheers, Mathieu

zeeyang commented 1 month ago

Sorry I forgot to follow up. The crash occurred when starting a new session before a map could be saved.