createDevice segfault on linux

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
lobbin

createDevice segfault on linux

Post by lobbin »

This segfaults for me on gentoo linux

Code: Select all

#include <irrlicht.h>
 
using namespace irr;
 
int main(int argc, char **argv)
{
        createDevice(video::EDT_NULL);
}

Code: Select all

(gdb) bt
#0  0x400f3c97 in XCreatePixmap () from /usr/X11R6/lib/libX11.so.6
#1  0x0804af44 in irr::CIrrDeviceLinux::CIrrDeviceLinux(irr::video::EDriverType, irr::core::dimension2d<int> const&, unsigned, bool, bool, irr::IEventReceiver*, wchar_t const*) ()
#2  0x08050137 in irr::createDevice(irr::video::EDriverType, irr::core::dimension2d<int> const&, unsigned, bool, bool, irr::IEventReceiver*, wchar_t const*) ()
#3  0x0804a84a in main (argc=1, argv=0xbffff3e4) at main.cc:7
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Yep, I forgot to test the null renderer in linux, sorry.
lobbin
Posts: 11
Joined: Wed Jun 02, 2004 1:41 pm
Location: Sweden
Contact:

Post by lobbin »

Is it an easy fix or should I wait for the next release?
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

I don't think it is difficult, some 'if not null's are missing.
lobbin
Posts: 11
Joined: Wed Jun 02, 2004 1:41 pm
Location: Sweden
Contact:

Post by lobbin »

I created a patch which seems to do the trick at the moment atleast.

http://www.localhost.nu/irrlicht-patch.diff
lobbin
Posts: 11
Joined: Wed Jun 02, 2004 1:41 pm
Location: Sweden
Contact:

Post by lobbin »

Will this fix get included in 0.7 so I can stop worrying about that? :)
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

I think yes. But it could take some time until 0.7.
Post Reply