Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when I set boundingObject in a Fluid node #6485

Open
nm46nm opened this issue Jan 19, 2024 · 2 comments
Open

Crash when I set boundingObject in a Fluid node #6485

nm46nm opened this issue Jan 19, 2024 · 2 comments
Assignees

Comments

@nm46nm
Copy link

nm46nm commented Jan 19, 2024

Describe the Bug
I want to simulate robot in water. I find an example that tells me to do the following and the webots crashed after step 4.

Steps to Reproduce

  1. Creat a new project
  2. Add a node "fluid"
  3. Set the boundingObject of the fluid as Shape
  4. Set the geometry of the boundingObject as Sphere

Expected behavior
I have tried other node like box, but it still crashed.

Hardware&System
I have tried on four computers.
The most strong one is with intel Xeon(R) platinum 8163, 2.5Ghz*96, Nvidia Geforce RTX4090, Linux Ubuntu 18.04.
Another is with intel i7-10875H, Nvidia Geforce RTX2060, Windows 10.

@ShuffleWire
Copy link
Contributor

Can confirm on Debian 12, with Webots 2023b
But work when I use the PROTO Torus as a boundingObject, for instance
Traceback :

Thread 1 "webots-bin" received signal SIGABRT, Aborted.
__pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
44	./nptl/pthread_kill.c: No such file or directory.
(gdb) where
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007f795e2a9e8f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x00007f795e25afb2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f795e245472 in __GI_abort () at ./stdlib/abort.c:79
#4  0x00007f795e4b9746 in dDebug(int, char const*, ...) (num=2, msg=0x7f795e5f9740 "geom must be placeable in %s()") at ode/src/error.cpp:96
#5  0x00007f795e47dd69 in dGeomSetPosition_ST(dxGeom*, double, double, double) (g=0x55be07e09920, x=0, y=0, z=0) at ode/src/collision_kernel.cpp:569
#6  0x00007f795e5083c2 in dGeomSetPosition_MT(dxGeom*, double, double, double, void (*)(dxGeom*, double, double, double))
    (g=0x55be07e09920, x=0, y=0, z=0, _geomSetPositionFunc=0x7f795e47dcf3 <dGeomSetPosition_ST(dxGeom*, double, double, double)>) at ode/src/ode_MT/ode_MT.cpp:501
#7  0x00007f795e47defd in dGeomSetPosition(dxGeom*, dReal, dReal, dReal) (g=0x55be07e09920, x=0, y=0, z=0) at ode/src/collision_kernel.cpp:595
#8  0x000055be06b8d483 in WbGeometry::setOdePosition(WbVector3 const&) (this=0x7f79540071e0, translation=...) at nodes/WbGeometry.cpp:522
#9  0x000055be06c18037 in WbMatter::updateOdePlaceableGeomPosition(dxGeom*) (this=0x55be0e604470, g=0x55be07e09920) at nodes/WbMatter.cpp:549
#10 0x000055be06c18329 in WbMatter::updateOdeGeomPosition(dxGeom*) (this=0x55be0e604470, g=0x55be07e09920) at nodes/WbMatter.cpp:589
#11 0x000055be06c172e1 in WbMatter::createOdeGeomFromInsertedShapeItem() (this=0x55be0e604470) at nodes/WbMatter.cpp:393
#12 0x000055be06b8775f in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (WbMatter::*)()>::call(void (WbMatter::*)(), WbMatter*, void**)
    (f=(void (WbMatter::*)(class WbMatter * const)) 0x55be06c16f20 <WbMatter::createOdeGeomFromInsertedShapeItem()>, o=0x55be0e604470, arg=0x7fff26fa4af0)
    at ../../include/qt/QtCore/QtCore/qobjectdefs_impl.h:135
#13 0x000055be06b87655 in QtPrivate::FunctionPointer<void (WbMatter::*)()>::call<QtPrivate::List<>, void>(void (WbMatter::*)(), WbMatter*, void**)
    (f=(void (WbMatter::*)(class WbMatter * const)) 0x55be06c16f20 <WbMatter::createOdeGeomFromInsertedShapeItem()>, o=0x55be0e604470, arg=0x7fff26fa4af0)
    at ../../include/qt/QtCore/QtCore/qobjectdefs_impl.h:172
#14 0x000055be06b8757b in QtPrivate::QSlotObject<void (WbMatter::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x7f7954009290, r=0x55be0e604470, a=0x7fff26fa4af0, ret=0x0) at ../../include/qt/QtCore/QtCore/qobjectdefs_impl.h:383
#15 0x00007f7961197772 in  () at /home/yann/webots/lib/webots/libQt6Core.so.6
#16 0x000055be06f76cb9 in WbShape::geometryInShapeInserted() (this=0x55be0f043610) at build/debug/WbShape.moc.cpp:260
#17 0x000055be06d3ec36 in WbShape::createOdeGeom() (this=0x55be0f043610) at nodes/WbShape.cpp:476
#18 0x000055be06c1955f in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (WbShape::*)()>::call(void (WbShape::*)(), WbShape*, void**)
    (f=(void (WbShape::*)(class WbShape * const)) 0x55be06d3ebc8 <WbShape::createOdeGeom()>, o=0x55be0f043610, arg=0x7fff26fa4ce0) at ../../include/qt/QtCore/QtCore/qobjectdefs_impl.h:135
#19 0x000055be06c193ff in QtPrivate::FunctionPointer<void (WbShape::*)()>::call<QtPrivate::List<>, void>(void (WbShape::*)(), WbShape*, void**)
    (f=(void (WbShape::*)(class WbShape * const)) 0x55be06d3ebc8 <WbShape::createOdeGeom()>, o=0x55be0f043610, arg=0x7fff26fa4ce0) at ../../include/qt/QtCore/QtCore/qobjectdefs_impl.h:172
#20 0x000055be06c19237 in QtPrivate::QSlotObject<void (WbShape::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x55be0ef60480, r=0x55be0f043610, a=0x7fff26fa4ce0, ret=0x0) at ../../include/qt/QtCore/QtCore/qobjectdefs_impl.h:383
#21 0x00007f7961197772 in  () at /home/yann/webots/lib/webots/libQt6Core.so.6
#22 0x000055be06f82569 in WbValue::changed() (this=0x55be0f03d2a0) at build/debug/WbValue.moc.cpp:189
#23 0x000055be06d3abd1 in WbSFNode::setValue(WbNode*) (this=0x55be0f03d2a0, node=0x7f79540071e0) at vrml/WbSFNode.cpp:79
#24 0x000055be06c714c5 in WbNodeOperations::initNewNode(WbNode*, WbNode*, WbField*, int, bool, bool)
    (this=0x55be07e434e0, newNode=0x7f79540071e0, parentNode=0x55be0f043610, field=0x55be0f0f98e0, newNodeIndex=0, subscribe=false, finalize=true) at nodes/utils/WbNodeOperations.cpp:251
#25 0x000055be06d2a5c1 in WbSceneTree::addNew() (this=0x55be07edd7c0) at scene_tree/WbSceneTree.cpp:994
#26 0x000055be06d2cb53 in WbSceneTree::handleDoubleClickOrEnterPress() (this=0x55be07edd7c0) at scene_tree/WbSceneTree.cpp:1514
#27 0x000055be06d31109 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (WbSceneTree::*)()>::call(void (WbSceneTree::*)(), WbSceneTree*, void**)
    (f=(void (WbSceneTree::*)(class WbSceneTree * const)) 0x55be06d2ca9c <WbSceneTree::handleDoubleClickOrEnterPress()>, o=0x55be07edd7c0, arg=0x7fff26fa52d0)
    at ../../include/qt/QtCore/QtCore/qobjectdefs_impl.h:135
#28 0x000055be06d30977 in QtPrivate::FunctionPointer<void (WbSceneTree::*)()>::call<QtPrivate::List<>, void>(void (WbSceneTree::*)(), WbSceneTree*, void**)
    (f=(void (WbSceneTree::*)(class WbSceneTree * const)) 0x55be06d2ca9c <WbSceneTree::handleDoubleClickOrEnterPress()>, o=0x55be07edd7c0, arg=0x7fff26fa52d0)
    at ../../include/qt/QtCore/QtCore/qobjectdefs_impl.h:172
#29 0x000055be06d2fc03 in QtPrivate::QSlotObject<void (WbSceneTree::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
    (which=1, this_=0x55be112a76c0, r=0x55be07edd7c0, a=0x7fff26fa52d0, ret=0x0) at ../../include/qt/QtCore/QtCore/qobjectdefs_impl.h:383
#30 0x00007f7961197772 in  () at /home/yann/webots/lib/webots/libQt6Core.so.6
#31 0x000055be06f8183b in WbTreeView::doubleClickOrEnterPressed() (this=0x55be10bec1e0) at build/debug/WbTreeView.moc.cpp:270
#32 0x000055be06e0d71c in WbTreeView::mouseDoubleClickEvent(QMouseEvent*) (this=0x55be10bec1e0, event=0x7fff26fa58e0) at scene_tree/WbTreeView.cpp:158
#33 0x00007f795ffcd383 in QWidget::event(QEvent*) () at /home/yann/webots/lib/webots/libQt6Widgets.so.6
#34 0x00007f7960061322 in QFrame::event(QEvent*) () at /home/yann/webots/lib/webots/libQt6Widgets.so.6
#35 0x00007f7961138d7a in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /home/yann/webots/lib/webots/libQt6Core.so.6
#36 0x00007f795ff76f51 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /home/yann/webots/lib/webots/libQt6Widgets.so.6
#37 0x00007f795ff7f8d8 in QApplication::notify(QObject*, QEvent*) () at /home/yann/webots/lib/webots/libQt6Widgets.so.6
#38 0x00007f7961138fda in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /home/yann/webots/lib/webots/libQt6Core.so.6
#39 0x00007f795ff7ec40 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) ()
    at /home/yann/webots/lib/webots/libQt6Widgets.so.6
#40 0x00007f795ffdde61 in  () at /home/yann/webots/lib/webots/libQt6Widgets.so.6
#41 0x00007f795ffe0a5b in  () at /home/yann/webots/lib/webots/libQt6Widgets.so.6
#42 0x00007f795ff76f62 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /home/yann/webots/lib/webots/libQt6Widgets.so.6
#43 0x00007f7961138fda in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /home/yann/webots/lib/webots/libQt6Core.so.6
#44 0x00007f79607bd4d1 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /home/yann/webots/lib/webots/libQt6Gui.so.6
#45 0x00007f796080f0dc in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/yann/webots/lib/webots/libQt6Gui.so.6
#46 0x00007f795b355aca in  () at /home/yann/webots/lib/webots/libQt6XcbQpa.so.6
#47 0x00007f795ef1c7a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007f795ef1ca38 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007f795ef1cacc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#50 0x00007f79613df90a in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/yann/webots/lib/webots/libQt6Core.so.6
#51 0x00007f7961144c9b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /home/yann/webots/lib/webots/libQt6Core.so.6
#52 0x00007f796114107e in QCoreApplication::exec() () at /home/yann/webots/lib/webots/libQt6Core.so.6
#53 0x000055be06b992a2 in WbGuiApplication::exec() (this=0x7fff26fa6000) at gui/WbGuiApplication.cpp:288
#54 0x000055be06e733a8 in main(int, char**) (argc=1, argv=0x7fff26fa6418) at gui/main.cpp:214

@ShuffleWire
Copy link
Contributor

Ok got it : A sphere is considered "NON-PLACEABLE" by the ODE solver, it means that it position can't be changed (and indeed in Webots a Sphere don't have any location/rotation) (http://ode.org/wiki/index.php, see Geoms)

The workaround in the first add a Pose as the BoundingObject, and then insert a Shape in it children, and finally add the Sphere.

I think Webots should clearly document this behavior and/or add a warning to catch that before ODE raise an abrupt ABORT signal.

@ShuffleWire ShuffleWire self-assigned this Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants