<div><div class="gmail_quote">Hi Tom,</div><div class="gmail_quote"><br></div><div class="gmail_quote">What do you mean by x-plane crashing?  Does it output an error message?</div><div class="gmail_quote"><br></div><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><font face="Monaco" size="1"><span style="font-size:9px"><br></span></font></div>

<div><font face="Monaco" size="1"><span style="font-size:9px">Some immediate hunches (but not sure how to verify/fix) and questions:</span></font></div><div><font face="Monaco" size="1"><span style="font-size:9px">(1) xplane is a 32bit application.  Could my build process (described below) be inadvertently using 64bit versions of compiled ROS libs?</span></font></div>

</div></blockquote><div><br></div><div>This is certainly possible, though I would expect the linker to complain since it looks like you're only trying to build your executable 32bit and not the rest of your ROS dependencies.  What does 'file `rospack find roscpp`/lib/libros.dylib' tell you?</div>

<div><br></div><div>The first thing I'd check is if the correct compiler flags are actually getting through.  In your package:</div><div>make clean</div><div>VERBOSE=1 make</div><div> </div><div>If they are, you probably need to set them for the rest of ROS as well by using the ROS_COMPILE_FLAGS cmake variable inside a custom rosconfig.cmake as explained here: <a href="http://www.ros.org/wiki/rosbuild#Customizing_the_build_.28debug.2C_optimizations.2C_default_build_flags.29">http://www.ros.org/wiki/rosbuild#Customizing_the_build_.28debug.2C_optimizations.2C_default_build_flags.29</a></div>

<div><br></div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><font face="Monaco" size="1"><span style="font-size:9px">(2) I am calling ros::init() in a non-main fn, so I'm using the version based on map<string,string>.  I'm sending in an empty map b/c I have no params to remap.  Am I doing this wrong?  (source for XP_ROS_Plugin.cpp below; I did verify in an separate, non-X-Plane-related build that I can use ros::init() in this way without crashing...)</span></font></div>

</div></blockquote><div><br></div><div>That should be fine.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div><font face="Monaco" size="1"><span style="font-size:9px">(3) Generally: how does one go about debugging a setup like this (on mac, ros inside a plugin inside another app)?  How can I get more details about what is going on when ros::init() is called?</span></font></div>

<div><font face="Monaco" size="1"><span style="font-size:9px"><br></span></font></div></div></blockquote><div><br></div><div>You can usually debug these things the same way you'd debug anything else -- run xplane in gdb and go from there.  First I'd check what error message it's outputting when crashing though.  I'm not on my mac at the moment but if it's crashing with an OSX popup asking to report it you should be able to click the report button and it'll show a bunch more information.</div>

<div><br></div><div>Josh</div><div> </div></div></div>