Segfault on Root::Initialise

Bug #913523 reported by Kai Mast
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ogre (Ubuntu)
Fix Released
Undecided
Manuel A. Fernandez Montecelo

Bug Description

With the move to Multiarch the same code that worked with the old ogre-1.7.3 packages now produces a segfault at Root::Initialise.

The ogre-1.7.3-dbg doesn't contain libraries for OgreMain, but only for plugins (or at least i can't fidn them). So I'm not able to debug this situation...

I am using latest Precise on Amd64.

Tags: precise

Related branches

Kai Mast (kai-mast)
description: updated
Revision history for this message
Manuel A. Fernandez Montecelo (mafm) wrote :

Hi Kai,

I do not use Ubuntu, but I am the maintainer of the OGRE packages in Debian and Ubuntu seems to get them directly (as they do with other of my packages), so I keep an eye on bug reports and everything.

First of all thanks for reporting. Second, please apologise for my lack of experience with some stuff -- it's one of my first packages with multi-arch enabled, and it's the first time that I see debug symbol files made with hashes.

I also maintain sdl-mixer and sdl-net, both also imported in Ubuntu without further changes, and I didn't get reports about them. They're quite popular, so even if they're also very young (6 days in Ubuntu, ~19 in Debian) bug reports can come quicker than with OGRE. So I am not sure about what can cause the problem, I followed the same procedure for both. However, one of the noticeable differences is that OGRE is C++ while SDL are in C.

I also don't know what's the problem with the -dbg package. There are 11 *.so* files in libogre-1.7.3 and also 11 debug files, so in principle there's nothing missing... but I am not sure how's the process for the debugger to get symbols with this new way of hashing, so maybe it's not finding the symbol file correctly.

What debugger are you using. Did you ever use Valgrind? Maybe you get more info about problems happening before the actual segfault hinting to some other issue (e.g. missing plugins).

Also, can you please tell the previous version where it's known to work for you?

And finally, do you have any other files installed in the system that you think that may be interfering (e.g. installation of OGRE also in /usr/local)?

Regards.

Revision history for this message
Manuel A. Fernandez Montecelo (mafm) wrote :

Uhm, I just spotted something...

In /etc/OGRE/plugins.cfg, can you please change the line:

  PluginFolder=/usr/lib/OGRE

with:

  PluginFolder=/usr/lib/x86_64-linux-gnu/OGRE

and tell me if it continues segfaulting?

Revision history for this message
Kai Mast (kai-mast) wrote :

It's still segfaulting. I don't use the plugins.cfg in my project so this can't be the problem.

I actually figured out where the debug-version libogremain is located. It turns out my synaptic installatin doesn't display the package properties correctly, apt-get -L does however. But it doesn't seem to be linked properly (or is this on purpose?)

There seem to be a lot of undefined references in the debug .so e.g. to FreeType, boost_threads, FreeImage and so on..

Revision history for this message
Manuel A. Fernandez Montecelo (mafm) wrote :

What do you mean that "is linked properly" or "with undefined references in the debug"?

If you want the debugger to show debug info also for those other libraries, you will need to install their corresponding debug versions. The debug package of OGRE doesn't pull/depend on the -dbg packages of all of the libraries that OGRE depends upon.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ogre (Ubuntu):
status: New → Confirmed
Revision history for this message
David Ballesteros Mayo (dividio) wrote :

I have the same error trying to run my Ogre game project and with the Ogre tutorials in Debian Sid with Ogre 1.7.3-3. The game runs fine with 1.7.3-2.

I have changed the PluginFolder in plugins.cfg to "PluginFolder=/usr/lib/x86_64-linux-gnu/OGRE".

I have debugged the execution and the problem seems to be with the constant "Ogre::StringUtil::BLANK" defined as "static const String BLANK;" in OgreString.h. The segfault raises in OgreRoot.cpp line 635 (Ogre::Root::initialise):

"if(customCapabilitiesConfig != StringUtil::BLANK)"

I have changed the call to Root::initialise from

m_root->initialise(false);

to

m_root->initialise(false, "test", "");

but the game crashes in the next place where there is a string comparation with "StringUtil::BLANK".

Maybe it's something related to the change of the compilation options in Ogre 1.7.3-3.

Revision history for this message
Manuel A. Fernandez Montecelo (mafm) wrote :

Can you please test 1.7.3-4? Should be directly installable in Ubuntu... just have to choose the proper architecture the same OGRE packages that you have currently installed in your system. Take from one of these places (maybe it takes a while to be available):

  http://snapshot.debian.org/package/ogre/

  http://cdn.debian.net/debian/pool/main/o/ogre/

+ogre (1.7.3-4) unstable; urgency=low
+
+ * Disabling some hardening and linking options, they were causing severe
+ problems for some users with the application aborting during initialisation
+ (Launchpad bug LP: #913523), confirmed in Debian. I think that the main
+ culprit is "-Wl,-Bsymbolic", although other hardening flags were disabled
+ because of compilation failures after disabling the previous one (+pie).
+
+ -- Manuel A. Fernandez Montecelo <email address hidden> Sun, 15 Jan 2012 16:27:57 +0000

Changed in ogre (Ubuntu):
assignee: nobody → Manuel A. Fernandez Montecelo (mafm)
Revision history for this message
David Ballesteros Mayo (dividio) wrote :

I've just tried the game with Ogre 1.7.3-4 in Debian and the game runs fine.

Thank you for solving the problem.

Revision history for this message
Manuel A. Fernandez Montecelo (mafm) wrote :

The bug then should be fixed when Ubuntu devels get my package from Debian (-4 or -5 should fix this).

Changed in ogre (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Kai Mast (kai-mast) wrote :

Thank you for fixing this. I can however not test this as I'm linking statically to Ogre1.8 now.

Revision history for this message
Kai Mast (kai-mast) wrote :

Just wanted to actually try if the packages work again an realized that ubuntu is still on -3 in precise.. Who is responsible for pushing this into Ubuntu?

Revision history for this message
Kai Mast (kai-mast) wrote :

Also I saw that 1.7.4 is already packaged in sid. Should I file a new bug for it to get included into precise too?

Revision history for this message
Manuel A. Fernandez Montecelo (mafm) wrote :

Hello,

I'm the maintainer of the package and I'm from Debian [only], so not sure how Ubuntu folks handle the upgrades. I tried to set different tags to the bug a few weeks ago trying to grab their attention, but no luck so far.

I hope that you can get them to sync the package, it'll be better for everybody.

Cheers and thanks.

Revision history for this message
Julian Taylor (jtaylor) wrote :

unless its a bugfix only update, you have to request a feature freeze exception at this point:
https://wiki.ubuntu.com/FreezeExceptionProcess

Changed in ogre (Ubuntu):
status: Fix Committed → Triaged
Kai Mast (kai-mast)
tags: added: precise
Revision history for this message
Kai Mast (kai-mast) wrote :

It is a bugfix only update! In fact, as said before, the package currently is unuseable! (at least for me)

I just want to pull the latest debian version of this package into precise. It hasn't any ubuntu specific changes so there shouldn't be any problems.

Revision history for this message
Julian Taylor (jtaylor) wrote :

if it were a proper bugfix only release we wouldn't need to do a transition.
The soversion of the package changed, which means it is not api/abi compatible and requires a transition of all its reverse dependencies.
luckily its only one (cegui-mk2), but it still needs an exception.

Revision history for this message
Kai Mast (kai-mast) wrote :

The so-version didn't change. 1.7.3 and 1.7.4 are two different packages in debian.

I understand that it's difficult to get 1.7.4 into precise but at updating 1.7.3 to the latest version of Debian should be possible as it is just a fix for a bug in packaging

Revision history for this message
Julian Taylor (jtaylor) wrote :

> The so-version didn't change. 1.7.3 and 1.7.4 are two different packages in debian.

thats how soversion changes are handled in debian packages

it is not difficult to get 1.7.4 into precise (assuming everything builds), it just needs to go by the release team. Given that 1.7.3 is broken its unlikely they will reject updating to either 1.74 or 1.7.3-6

Can you provide a simple testcase reproducing the issue?

Revision history for this message
Kai Mast (kai-mast) wrote :

As described above. Any OGRE program crashes when the library is initialised..

I would be happy with 1.7.3-6. 1.8 is about to be released soon anyways and i hope to use that version in precise+1.

Revision history for this message
Julian Taylor (jtaylor) wrote :

we are lucky that -6 is still in testing so we can sync it, from the changelog it seems that it may not need an exception.
I'll do a testbuild and do the sync it, please test it when it has been published, I do not use (or even know) any programs using ogre)

Revision history for this message
Manuel A. Fernandez Montecelo (mafm) wrote :

Hi all,

Julian, I'm the maintainer in Debian and I already gave my opinion above, please update to at least to -6, or 1.7.4-* if possible (it solves additional problems with remaining /etc/OGRE* files).

Regards.

Revision history for this message
Kai Mast (kai-mast) wrote :

Thanks. I'll test it asap.

FYI: Playdeb has some games using OGRE as 3D-framework. Sadly, they're not in the standart repositories.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ogre - 1.7.3-6

---------------
ogre (1.7.3-6) unstable; urgency=low

  * Use always "versioned" directory names, like /usr/share/OGRE-1.7.3 and
    /usr/lib/MULTIARCH_TRIPLET/OGRE-1.7.3 instead of plain .../OGRE. In this
    way several versions of the library can be installed at once, as it's
    usually the case with shared libraries but it was not with OGRE until now
    (Closes: #653527).
  * Add missing Build-Depend on "dpkg-dev (>= 1.16.1~)" (instead of the
    suggested .0 of the bug report), and substituting DEB_BUILD_MULTIARCH for
    DEB_HOST_MULTIARCH (Closes: #658015). The former was used by a propagated
    mistake. Thanks Sam Morris for the notice and the patch (although I didn't
    use the patch provided because I had already changed the more problematic
    parts with a better solution). Please reopen if there are still remaining
    problems.
  * Remove /etc/OGRE*/plugins.cfg, according to upstream it's not present in
    other systems, and indeed is more appropriate for applications to define
    what plugins they want to use (or rely only on code, not .cfg files, for
    that).
    - Remove the Debian script /usr/bin/update-ogre-plugins (and its manpage),
      it's of no use now.
    - Remove the template for plugins.cfg
  * Remove /etc/OGRE/plugins.cfg when uninstalling (or upgrading and moving the
    file elsewhere, as it happened for a few versions), if the one installed in
    the system was unmodified. Thanks Sam Morris for the report and the
    suggested fix (Closes: #656997)
  * Remove cruft provided in the past along with the package but not used for a
    few releases/years:
    - LightwaveConverter.1: binary not present since very long
    - ogre-get-orig-source-1.6.4: script obsolete and unnecessary since with 1.7
      -- it's been clarified that the documentations and the samples are DFSG
      compatible

 -- Manuel A. Fernandez Montecelo <email address hidden> Sat, 04 Feb 2012 21:18:16 +0000

Changed in ogre (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.