ros-visualization / rviz

ROS 3D Robot Visualizer
BSD 3-Clause "New" or "Revised" License
827 stars 463 forks source link

Crash of STL based robot model on IFC6410 #850

Open mendimik opened 9 years ago

mendimik commented 9 years ago

Using motoman_mh5_support package, rviz crashes on attempt of adding the robot model view, with bus error.

strace https://gist.github.com/tfoote/8c7c925d2868e26babf3 gdb backtrace https://gist.github.com/tfoote/4a9db2b2d7480a08b27d

Any STL file brings to same result.

wjwwood commented 9 years ago

For people who may not know, the IFC6410 is a quad-core ARM single board computer: http://www.inforcelive.com/index.php?route=product/product&product_id=53

This might have something to do with ARM as I cannot reproduce this on a normal amd64 desktop machine.

@ahendrix wasn't there a patch to assimp for ARM? Maybe that could be the source of the difference?

rkojcev commented 9 years ago

I also have the same issue on Jetson TK1 dev board. However when loading robot models constructed with Collada files (*.dae) rviz runs fine....

trainman419 commented 9 years ago

My best guess is that this crash is related to this part of the stacktrace:

Program received signal SIGBUS, Bus error.
0x40327984 in ogre_tools::STLLoader::load(unsigned char*) () from /opt/ros/indigo/lib/librviz.so
(gdb) bt full
#0  0x40327984 in ogre_tools::STLLoader::load(unsigned char*) () from /opt/ros/indigo/lib/librviz.so
No symbol table info available.
#1  0xbef0bf68 in ?? ()

Which suggests that this is a bug in OGRE's STL loader on arm.

Two things to try which can help confirm this:

tfoote commented 9 years ago

Note ogre_tools are actually inside the rviz sources: http://docs.ros.org/indigo/api/rviz/html/c++/stl__loader_8cpp_source.html

wjwwood commented 9 years ago

The segfault is happening in rviz's code:

https://github.com/ros-visualization/rviz/blob/indigo-devel/src/rviz/ogre_helpers/stl_loader.cpp

Though those load functions are a bit scary, I don't see anything that jumps out at me. Without a debug build of rviz and a backtrace from that, I can't narrow it down to a particular line of code so I think there is little chance I can do anything about this.

tfoote commented 9 years ago

Here's a minimal package which can reproduce the problem: https://www.dropbox.com/s/p3hcpeko4w3euc1/stlcrash.tgz?dl=0

To reproduce:

For comparsion this example program does not crash: https://www.dropbox.com/s/mg3op2390qle637/stl.tgz?dl=0

jbohren commented 9 years ago

Rviz only reads binary STL files, which the mh5 models are, and the stl loader in rviz is pretty hacky.

You guys are having issues on the IFC6410 and Jetson TK1, but not on x86 platforms.

Is this just endianness problem?

mehtajaghvi commented 9 years ago

I am having issue with Rviz on Jetson-TK1 running on ubuntu 14.04 , ros indigo. I enhanced the cpu performance to maximun but still the same issue. It did run once on Jetson but I cannot run it again. I have also set the GTK_IM_MODULE and tried deleting the ~/.rviz but nothing works. Can anyone suggest anything please?

Shaluols commented 7 years ago

@mehtajaghvi Hi mehtajaghvi, i met the same problem as you, but i used the tx1 instead, have you solved it? Can you give me some advice as i confused some days!

shinichiba commented 2 years ago

Solved: Use online software to convert stl to dae, and everything work well. Thank you guy all I met same problem on Rpi3 install Xubuntu 16.04 . When use mesh to load stl file in rviz , system dump and exit.