1

I have irrlicht 1.6 on my computer and I use codeblocks + tdm-gcc MinGW 4.7. What the situation is is that when I compile an example program, it compiled fine, but when I try to run it, it always give me a segmentation fault error. It returns with code -1073741819 (0xC0000005). It always has a segmentation fault at any attempt to use the graphics drivers. This is where the sementation fault occurs.

guienv->addStaticText(L"Hello World! This is the Irrlicht Software renderer!",
    rect<int>(10,10,200,22), true);
Ripspace
  • 551
  • 6
  • 21
  • Do you call `guienv = irrlichtDevice->getGUIEnvironment();` or otherwise set the `guienv`? Sound like you could be trying to call an invalid pointer – mtsvetkov Sep 24 '12 at 08:30
  • If I use the newest version of tdm-gcc, the program will compile, but crash. However, if I use the version of tdm-gcc that came with codeblocks (4.4.1), it won't crash. Why? – Ripspace Sep 25 '12 at 03:19
  • I think it might be a dll problem, since the code compiles fine. – Ripspace Sep 25 '12 at 03:30
  • Per mtsvetkov's comment, can you show how `guienv` is initialized? – user1201210 Sep 27 '12 at 18:45
  • guienv is initialized like this: IrrlichtDevice *device = createDevice( video::EDT_SOFTWARE, dimension2d(640, 480), 16, false, false, false, 0); IGUIEnvironment* guienv = device->getGUIEnvironment(); – Ripspace Sep 28 '12 at 04:30
  • I am running into this same segfault with Irrlicht 1.7.1 and TDM-MinGW with GCC 4.7. If you remove the addStaticText call, then it simply fails later on - in run / polljoysticks or in os::printer. – Dennis Oct 13 '12 at 21:38

1 Answers1

1

I've searched all over the internet for a solution, and could not find any. Even if I build my own dll, it is oversized (22mb +) and does not contain all of the functions of irrlicht despite. So, I decided to downgrade from tdm-gcc 4.7 to 4.6, and it works perfectly, with the original dll and all of the functions. In case someone has the same problem, and would like to try downgrading, get the installer at http://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/Previous/1.1006.0/

UPDATE

I found out that with the release of irrlicht 1.8, it now compiles properly with MinGW 4.7 32bit and 64bit.

Ripspace
  • 551
  • 6
  • 21