New IrrFontTool crashes 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
upbaker
Posts: 1
Joined: Sun Jan 02, 2022 11:06 pm

New IrrFontTool crashes on Linux

Post by upbaker »

This line was causing a segfault:

Code: Select all

Display* display = (Display*)Device->getVideoDriver()->getExposedVideoData().OpenGLLinux.X11Display;

Code: Select all

467		CFontTool *fc = new CFontTool(device);
(gdb) n

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7d69c0e in irr::video::CNullDriver::findTexture(irr::core::string<char, irr::core::irrAllocator<char> > const&) () from /usr/lib/libIrrlicht.so.1.8
(gdb) bt
#0  0x00007ffff7d69c0e in irr::video::CNullDriver::findTexture(irr::core::string<char, irr::core::irrAllocator<char> > const&) ()
   from /usr/lib/libIrrlicht.so.1.8
#1  0x0000555555560495 in irr::CFontTool::CFontTool (this=0x555555ae5090, device=<optimized out>) at CFontTool.cpp:416
#2  0x00005555555576b5 in main () at main.cpp:467

I wasn't sure exactly what was crashing, but after changing the line too:

Code: Select all

irr::video::IVideoDriver * driver = Device->getVideoDriver()
Display* display = (Display*)driver->getExposedVideoData().OpenGLLinux.X11Display;
It works again, so I guess it was an issue with one of the objects being casted incorrectly. Is this the case for anybody else?
CuteAlien
Admin
Posts: 9643
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: New IrrFontTool crashes on Linux

Post by CuteAlien »

Could it be because of a re-compile? Try switching the line back - if it still crashes or continues to work.
Otherwise - did you change anything? Like compiling without bmp support (asking as I might have seen a similar problem once before because it couldn't load the default-font because of missing bmp support).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply