Bug#568247: libirrlicht1.6: dynamic_cast<>-ing library classes lead to Segmentation Fault

Ihor Kaharlichenko madkinder at gmail.com
Wed Feb 3 12:49:15 UTC 2010


Package: libirrlicht1.6
Version: 1.6+dfsg1-1.1
Severity: important
Tags: patch

The way Irrlicht library is built prevents developer from using dynamic_cast<>
on any of the Irrlicht's classes. In project I'm working on I heavily
realy on this feature.

An attemp to use dynamic_cast<> leads to Segmentation Fault.
In the attachement archive there's a minimalistic project which can help you
to reproduce this problem.

The cause of this problem is absence of RTTI (run time type information)
in Irrlicht library which is explicitly turned off in vanilla Makefile
for some weird reason.

I've rebuilt the package with RTTI enabled and the problem faded away.

In the attachement I've put a patch you need to put into
debian/patches/debian in order to fix it. Unfortunately
I didn't manage to cope with TopGit so please add the corresponding header.

-- System Information:
Debian Release: squeeze/sid
  APT prefers karmic-updates
  APT policy: (990, 'karmic-updates'), (990, 'karmic-security'), (990, 'karmic'), (650, 'lucid')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31-17-generic (SMP w/4 CPU cores)
Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libirrlicht1.6 depends on:
ii  libc6           2.10.1-0ubuntu16         GNU C Library: Shared libraries
ii  libgcc1         1:4.4.1-4ubuntu9         GCC support library
ii  libgl1-mesa-glx 7.6.0-1ubuntu4           A free implementation of the OpenG
ii  libjpeg62       6b-14build1              The Independent JPEG Group's JPEG 
ii  libpng12-0      1.2.37-1                 PNG library - runtime
ii  libstdc++6      4.4.1-4ubuntu9           The GNU Standard C++ Library v3
ii  libx11-6        2:1.2.2-1ubuntu1         X11 client-side library
ii  libxxf86vm1     1:1.0.2-1ubuntu1         X11 XFree86 video mode extension l
ii  zlib1g          1:1.2.3.3.dfsg-13ubuntu3 compression library - runtime

libirrlicht1.6 recommends no packages.

libirrlicht1.6 suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.gz
Type: application/x-gzip
Size: 665 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20100203/987854c2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: enable-rtti.diff
Type: text/x-diff
Size: 431 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20100203/987854c2/attachment.diff>


More information about the Pkg-games-devel mailing list