Segfault on OSX for CFBundleCopyBundleURL

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

Hansg91
Just popping in
Just popping in
Posts: 1
Joined: Mon Mar 04, 2013 12:49

Segfault on OSX for CFBundleCopyBundleURL

Postby Hansg91 » Mon Mar 04, 2013 13:03

Hey,

I have been trying to get a robotics simulator (gazebo) to compile under OSX. After a lot of struggle I finally got everything to compile and run, however I could not get focus on the gazebo window and it seemed no mouse events were recorded. After googling this could apparently be fixed by adding :

Code: Select all

set_property(TARGET gzclient PROPERTY MACOSX_BUNDLE TRUE)


to the CMakeLists.txt. However after adding this, I get another segmentation fault, in CEGui this time. I get the same error if I remove that line from the CMakeLists.txt again and rebuild, so I am not sure what is causing it. The backtrace is :

Code: Select all

#0  0x00007fff8eaf9939 in CFBundleCopyBundleURL ()
#1  0x00000001027c12b8 in CEGUI::createFullPluginsURL (bundle=0x0) at macPlugins.cpp:54
#2  0x00000001027c1778 in CEGUI::createBundle () at /Users/hansgaiser/Downloads/CEGUI-0.7.9/cegui/src/implementations/mac/macPlugins.cpp:79
#3  0x00000001027c1778 in CEGUI::mac_loadExeBundle (name=0x119208080 "\020\016Dx?") at macPlugins.cpp:127
#4  0x000000010269f616 in CEGUI::DynamicModule::DynamicModule (this=0x111d9c590, name=@0x7fff5fbfb480) at CEGUIDynamicModule.cpp:108
#5  0x00000001026d7303 in CEGUI::System::setXMLParser (this=0x1192087b0, parserName=@0x111d9c590) at CEGUISystem.cpp:1599
#6  0x00000001026dc7ca in CEGUI::System::setupXMLParser () at /Users/hansgaiser/Downloads/CEGUI-0.7.9/cegui/src/CEGUISystem.cpp:1540
#7  0x00000001026dc7ca in CEGUI::System::System (this=0x1192087b0, renderer=@0x1047de10c, resourceProvider=0x1058b9c00, xmlParser=0x7fff5fbfc3e0, imageCodec=0x7fff5fbfc3e0, scriptModule=0x7fff5fbfc3e0, configFile=@0x7fff5fbfd010, logFile=@0x7fff5fbfcf60) at CEGUISystem.cpp:246
#8  0x00000001026dd1ac in CEGUI::System::System () at /Users/hansgaiser/Downloads/CEGUI-0.7.9/cegui/src/CEGUISystem.cpp:1900
#9  0x00000001026dd1ac in CEGUI::System::create (renderer=@0x400000004000, resourceProvider=0x7fff7846f468, xmlParser=0x0, imageCodec=0x119207e60, scriptModule=0x0, configFile=@0x7fff5fbfd010, logFile=@0x7fff5fbfcf60) at CEGUISystem.cpp:1900
#10 0x00000001006cd1cb in gazebo::rendering::GUIOverlay::Init (this=0x111dbd040, _renderTarget=<value temporarily unavailable, due to optimizations>) at /Users/hansgaiser/ros_ws/simulator_gazebo/gazebo/build/gazebo-r3c730325a4dd/gazebo/rendering/GUIOverlay.cc:75
#11 0x000000010074190d in gazebo::rendering::UserCamera::SetRenderTarget (this=0x1177fa320, _target=<value temporarily unavailable, due to optimizations>) at /Users/hansgaiser/ros_ws/simulator_gazebo/gazebo/build/gazebo-r3c730325a4dd/gazebo/rendering/UserCamera.cc:523
#12 0x0000000100039994 in boost::detail::shared_count::~shared_count () at /Users/hansgaiser/ros_ws/simulator_gazebo/gazebo/build/gazebo-r3c730325a4dd/gazebo/gui/GLWidget.cc:159
#13 boost::shared_ptr<gazebo::rendering::Camera>::~shared_ptr () at /usr/local/Cellar/boost/1.49.0/include/boost/smart_ptr/detail/shared_count.hpp:304
#14 0x0000000100039994 in gazebo::gui::GLWidget::showEvent (this=0x104890400, _event=<value temporarily unavailable, due to optimizations>) at shared_count.hpp:164


It seems like the bundle parameter in createFullPluginsURL is NULL. Furthermore it seems in mac_loadExeBundle that it failed to find the bundle (I don't know where the log is, but logger->logEvent("-- Couldn't get bundle from main app bundle reference; trying CEGUIbase instead."); is getting called). The 'name' parameter in this case, according to gdb, is :

Code: Select all

(gdb) p name
$1 = 0x1053a1ec0 "\020\016Dx?"


That doesn't seem right? Is there something gone corrupt? Is there any additional information I can provide?

EDIT: I added "net.sourceforge.crayzedsgui.CEGUIBase" to the Info.plist for CFBundleIdentifier, not sure if this is intended but it did solve (this) segmentation fault, on to the next xD (Failed to load module 'CEGUIExpatParser': Unknown Error)

Return to “Help”

Who is online

Users browsing this forum: No registered users and 39 guests