Segmentation fault in spatial mapping


I am using a ZED 2i with a Jetson Orin NX 16GB to perform spatial mapping. I am streaming the data using ‘’ to a laptop and running the sample ‘’ code. After some time, the mapping stops and I get a segmentation fault. I used ‘gdb’ to debug the problem and got the following error message:

“memmove_sse2_unaligned_erms () at …/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:513
513 …/sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: No such file or directory.”

I am using the sample spatial mapping code without any changes. Can someone suggest a fix for this problem.



If I understand correctly, it’s the laptop that runs the spatial mapping sample, right? For how long?
Can you send us a SVO of what you won’t consider a representative session?


Yes, it is a laptop that runs the spatial mapping sample. We expect to perform a continuous mapping for a duration of 30 minutes.

Unfortunately, I cannot share a SVO due to certain restrictions. I have tried the mapping for longer durations but it fails after approximately 3-5 minutes.

3 - 5 minutes is quite long. Can you try a shorter scan?
Can you monitor your RAM and VRAM during the scan?

I performed a shorter run and the system still crashes intermittently. Sometimes I get up to a minute of mapping while in some occasions, the application crashes in a few seconds.

My laptop has a 3050 Ti 4 GB GPU and 16 GB RAM. The RAM memory usage was around 10 GB and it reached 15 GB when the application crashed. The VRAM was around the 450 MB limit.

I am actually getting better performance when I run the ZEDfu application on the Jetson as compared to running spatial mapping on the laptop. The ZEDfu application does not crash like the spatial_mapping application.

It seems you are reaching the maximum amount of RAM of your machine. Our current spatial mapping implementation does not « forget » anything, and if your scan gets too big it may crash. It should definitely stop mapping and return an error instead of crashing, I will investigate.

ZEDfu has different spatial mapping parameters than the sample, maybe the resolution is lower for example. It will use up less RAM but has you noticed the scan is less precise. Also the jetson has a lot of ram (16gb too).

Thank you @alassagne for looking into it. I had a question about the maximum_memory_usage parameter. Since we are setting this value, shouldn’t the RAM memory be limited to the value that we specify? Why does the spatial mapping ignore this parameter and use up the whole memory?

It might be a bug. And what value did you set for maximum_memory_usage ?

I tried setting it to 4096 and 8192. At 8192, the mapping code would crash as soon as I would hit space bar to start the mapping (my laptop RAM is 16 GB). The application works fine at 4096, but ends up using all the RAM in spite of me setting it to 4096.

Thank you for the report. The big is logged and we are investigating.