Hi,

recently I stumbled over a problem using the VRML loader on linux, using 
osg 2 rev 1446. It works without any problems on windows, so I don't 
know where the begin my search for the problem. The segmentation fault 
happens on the following line of the function, using the tie.wrl from 
osg examples  (see bottom):

scene->addChild(OSG::SceneFileHandler::the()->read(file.c_str()));

The function is being called from a gui running in a separate thread via 
boost thread safe signals lib.

I attached the gdb output and backtrace... if you need more info let me 
know.

Cheers,
Christoph


=== gdb output ========================================
Begin Proto TimeSensor

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb4094b90 (LWP 13636)]
0xb63d627f in 
OSG::PointerSFieldCommon<OSG::PointerAccessHandler<OSG::UnrecordedRefCountPolicy>,
 
0>::ptrStoreGet (this=0x44)
   at 
build.linux.g++/instlinks/include/OpenSG/OSGPointerSFieldCommon.inl:103
103        return AccessHandler::validate(_fieldValue);

=== gdb backtrace ========================================
#0  0xb63d627f in 
OSG::PointerSFieldCommon<OSG::PointerAccessHandler<OSG::UnrecordedRefCountPolicy>,
 
0>::ptrStoreGet (this=0x44)
   at 
build.linux.g++/instlinks/include/OpenSG/OSGPointerSFieldCommon.inl:103
#1  0xb618c463 in OSG::PointerSField<OSG::SensorTask*, 
OSG::UnrecordedRefCountPolicy, 0>::getValue (this=0x44)
   at build.linux.g++/instlinks/include/OpenSG/OSGPointerSField.inl:113
#2  0xb61ac494 in OSG::ComplexSceneManagerBase::getSensorTask (this=0x0) 
at 
build.linux.g++/instlinks/include/OpenSG/OSGComplexSceneManagerBase.inl:97
#3  0xb6212b04 in OSG::Sensor::onCreate (this=0x8826218, 
source=0x8211720) at 
Source/Contrib/ComplexSceneManager/Sensor/OSGSensor.cpp:123
#4  0xb61f5b01 in OSG::FieldContainer::newPtr<OSG::TimeSensor> 
([EMAIL PROTECTED], pPrototype=0x8211720, bFlags=0)
   at build.linux.g++/instlinks/include/OpenSG/OSGFieldContainer.inl:747
#5  0xb61f417a in OSG::TimeSensorBase::shallowCopy (this=0x8211720) at 
Source/Contrib/ComplexSceneManager/VRMLNodes/OSGTimeSensorBase.cpp:708
#6  0xb61f210e in OSG::TimeSensorBase::create () at 
Source/Contrib/ComplexSceneManager/VRMLNodes/OSGTimeSensorBase.cpp:655
#7  0xb61f0e0d in OSG::VRMLGenericHelper<OSG::TimeSensor>::init 
(this=0x8825df0, szName=0xb57624ca "TimeSensor")
   at build.linux.g++/instlinks/include/OpenSG/OSGVRMLNodeHelper.inl:64
#8  0xb5597a2b in 
OSG::VRMLNodePrototypeHandler<OSG::ScanParseFieldTypeMapper<OSG::ScanParseSkel> 
 >::beginProto (this=0x87ff6e8,
   szProtoname=0xb57624ca "TimeSensor") at 
Source/System/FileIO/WRL/OSGVRMLPrototypeHandler.inl:124
#9  0xb5585926 in OSG::VRMLFile::beginProto (this=0x87ff6e8, 
szProtoname=0xb57624ca "TimeSensor") at 
Source/System/FileIO/WRL/OSGVRMLFile.cpp:440
#10 0xb558267f in OSG::VRMLFile::createStandardPrototypes 
(this=0x87ff6e8) at Source/System/FileIO/WRL/OSGVRMLProtos.inl:1763
#11 0xb559a831 in OSG::VRMLSceneFileType::read (this=0xb58083e0, 
[EMAIL PROTECTED]) at Source/System/FileIO/WRL/OSGVRMLSceneFileType.cpp:109
#12 0xb48976d6 in OSG::SceneFileHandlerBase::read (this=0x8139d98, 
[EMAIL PROTECTED],
   fileNameOrExtension=0x87fc6d4 
"/home/christoph/src/lib/opensg2/Examples/CSM/Simple/tie.wrl", 
graphOpSeq=0x81a7d88, [EMAIL PROTECTED])
   at Source/System/FileIO/Base/OSGSceneFileHandler.cpp:230
#13 0xb4896a77 in OSG::SceneFileHandlerBase::read (this=0x8139d98, 
fileName=0x87fc99c 
"/home/christoph/src/lib/opensg2/Examples/CSM/Simple/tie.wrl",
   graphOpSeq=0x81a7d88, [EMAIL PROTECTED]) at 
Source/System/FileIO/Base/OSGSceneFileHandler.cpp:314
#14 0xb67719f6 in model::modelmanager::ModelManager::loadModelFromPath 
(this=0x82681b0, [EMAIL PROTECTED])
   at build.posix/Model/ModelManager.cpp:96
#15 0xb6771dbc in model::modelmanager::openModelSlotBoost () at 
build.posix/Model/ModelManager.cpp:52
#16 0xb40bcd61 in boost::detail::function::void_function_invoker0<void 
(*)(), void>::invoke ([EMAIL PROTECTED])
   at 
/home/christoph/src/lib/boost_1_35_0/boost/function/function_template.hpp:117 

#17 0xb40be889 in boost::function0<void, std::allocator<void> 
 >::operator() (this=0x82e11bc)
   at 
/home/christoph/src/lib/boost_1_35_0/boost/function/function_template.hpp:825 

#18 0xb40be8c2 in 
boost::signals::detail::call_bound0<void>::caller<boost::function<void 
()(), std::allocator<void> > 
 >::operator()<boost::signals::detail::connection_slot_pair> 
(this=0xb4093228, [EMAIL PROTECTED]) at 
/home/christoph/src/lib/boost_1_35_0/boost/signals/signal_template.hpp:119
#19 0xb40be921 in 
boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound0<void>::caller<boost::function<void
 
()(), std::allocator<void> > >, 
boost::signals::detail::named_slot_map_iterator>::dereference 
(this=0xb4093208)
   at 
/home/christoph/src/lib/boost_1_35_0/boost/signals/detail/slot_call_iterator.hpp:61
 

#20 0xb40be96b in 
boost::iterator_core_access::dereference<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound0<void>::caller<boost::function<void
 
()(), std::allocator<void> > >, 
boost::signals::detail::named_slot_map_iterator> > ([EMAIL PROTECTED])
   at 
/home/christoph/src/lib/boost_1_35_0/boost/iterator/iterator_facade.hpp:517
#21 0xb40be997 in 
boost::iterator_facade<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound0<void>::caller<boost::function<void
 
()(), std::allocator<void> > >, 
boost::signals::detail::named_slot_map_iterator>, 
boost::signals::detail::unusable, boost::single_pass_traversal_tag, 
boost::signals::detail::unusable const&, int>::operator* 
(this=0xb4093208) at 
/home/christoph/src/lib/boost_1_35_0/boost/iterator/iterator_facade.hpp:635
#22 0xb40be9bb in postfix_increment_proxy (this=0xb40931b3, 
[EMAIL PROTECTED]) at 
/home/christoph/src/lib/boost_1_35_0/boost/iterator/iterator_facade.hpp:144
#23 0xb40be9e7 in 
boost::operator++<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound0<void>::caller<boost::function<void
 
()(), std::allocator<void> > >, 
boost::signals::detail::named_slot_map_iterator>, 
boost::signals::detail::unusable, boost::single_pass_traversal_tag, 
boost::signals::detail::unusable const&, int> ([EMAIL PROTECTED]) at 
/home/christoph/src/lib/boost_1_35_0/boost/iterator/iterator_facade.hpp:733
#24 0xb40bea2c in 
boost::last_value<void>::operator()<boost::signals::detail::slot_call_iterator<boost::signals::detail::call_bound0<void>::caller<boost::function<void
 
()(), std::allocator<void> > >, 
boost::signals::detail::named_slot_map_iterator> > (this=0x82cfe0c, 
[EMAIL PROTECTED], [EMAIL PROTECTED])
   at /home/christoph/src/lib/boost_1_35_0/boost/last_value.hpp:49
#25 0xb40beb9d in boost::signal0<void, boost::last_value<void>, int, 
std::less<int>, boost::function<void ()(), std::allocator<void> > 
 >::operator() (
   this=0xb40941c8) at 
/home/christoph/src/lib/boost_1_35_0/boost/signals/signal_template.hpp:354
#26 0xb40bb196 in 
desktopgui::desktopguimanager::DesktopGuiMainWindow::openModelSlot 
(this=0xb4094160)
   at build.posix/DesktopGui/DesktopGuiMainWindow.cpp:106
#27 0xb40bf703 in 
desktopgui::desktopguimanager::DesktopGuiMainWindow::qt_metacall 
(this=0xb4094160, _c=QMetaObject::InvokeMetaMethod, _id=1,
at kernel/qobject.cpp:3097
#30 0xb70ab131 in QAction::triggered (this=0x82cffe0, _t1=false) at 
.moc/release-shared/moc_qaction.cpp:210
#31 0xb70aba2f in QAction::activate (this=0x82cffe0, 
event=QAction::Trigger) at kernel/qaction.cpp:1119
#32 0xb7474b01 in QMenuPrivate::activateAction (this=0x82df488, 
action=0x82cffe0, action_e=QAction::Trigger, self=true) at 
widgets/qmenu.cpp:1005
#33 0xb7476da4 in QMenu::mouseReleaseEvent (this=0x82df470, 
e=0xb40939ac) at widgets/qmenu.cpp:2169
#34 0xb7104cdb in QWidget::event (this=0x82df470, event=0xb40939ac) at 
kernel/qwidget.cpp:7021
#35 0xb74724d5 in QMenu::event (this=0x82df470, e=0xb40939ac) at 
widgets/qmenu.cpp:2265
#36 0xb70b176c in QApplicationPrivate::notify_helper (this=0x8291f60, 
receiver=0x82df470, e=0xb40939ac) at kernel/qapplication.cpp:3800
#37 0xb70b67e0 in QApplication::notify (this=0xb40941e0, 
receiver=0x82df470, e=0xb40939ac) at kernel/qapplication.cpp:3527
#38 0xb79ba409 in QCoreApplication::notifyInternal (this=0xb40941e0, 
receiver=0x82df470, event=0xb40939ac) at kernel/qcoreapplication.cpp:591
#39 0xb70b4321 in QApplicationPrivate::sendMouseEvent 
(receiver=0x82df470, event=0xb40939ac, alienWidget=0x0, 
nativeWidget=0x82df470, buttonDown=0xb7878a50,
   [EMAIL PROTECTED]) at 
../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:218
#40 0xb71186dc in QETWidget::translateMouseEvent (this=0x82df470, 
event=0xb4093ec8) at kernel/qapplication_x11.cpp:3982
#41 0xb7116e51 in QApplication::x11ProcessEvent (this=0xb40941e0, 
event=0xb4093ec8) at kernel/qapplication_x11.cpp:3166
#42 0xb713e52a in x11EventSourceDispatch (s=0x82a69a0, callback=0, 
user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:148
#43 0xb6b8cdd6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#44 0xb6b90193 in ?? () from /usr/lib/libglib-2.0.so.0
#45 0xb6b9074e in g_main_context_iteration () from 
/usr/lib/libglib-2.0.so.0
#46 0xb79e45f8 in QEventDispatcherGlib::processEvents (this=0x82a3840, 
[EMAIL PROTECTED]) at kernel/qeventdispatcher_glib.cpp:325
#47 0xb713e325 in QGuiEventDispatcherGlib::processEvents 
(this=0x82a3840, [EMAIL PROTECTED]) at 
kernel/qguieventdispatcher_glib.cpp:204
#48 0xb79b95ed in QEventLoop::processEvents (this=0xb4094110, 
[EMAIL PROTECTED]) at kernel/qeventloop.cpp:149
#49 0xb79b977d in QEventLoop::exec (this=0xb4094110, [EMAIL PROTECTED]) 
at kernel/qeventloop.cpp:200
#50 0xb79bb69d in QCoreApplication::exec () at 
kernel/qcoreapplication.cpp:849
#51 0xb70b0f17 in QApplication::exec () at kernel/qapplication.cpp:3330
#52 0xb40af012 in 
desktopgui::desktopguimanager::DesktopGuiEventLoop::run (this=0x8288b08)
   at build.posix/DesktopGui/DesktopGuiEventLoop.cpp:88
#53 0xb7e59f17 in Poco::ThreadImpl::entry (pThread=0x8293508) at 
src/Thread_POSIX.cpp:186
#54 0xb6c334fb in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#55 0xb6d1ce5e in clone () from /lib/tls/i686/cmov/libc.so.6


=== Function ========================================
void ModelManager::loadModelFromPath(const string file)
{ 
    OSG::ExternalThread *_pLocalThread = OSG::ExternalThread::get(NULL);
    _pLocalThread->initialize(0);

    OSG::NodeRefPtr scene = OSG::Node::create();
    OSG::GroupRefPtr g = OSG::Group::create();         
scene->setCore(g);                    
    scene->addChild(OSG::SceneFileHandler::the()->read(file.c_str()));
    setRoot(scene);
    showAll();
    redraw();
}

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to