0

Anyone happen to know why I'm getting a segmentation fault at line 2 below (this is after all my glInit stuff)? I've tried different image formats (.jpeg, .png, .bmp, all from internet). Debug tips or anything helps! If you wanna see more source, ask and I'll edit promptly.

ilutRenderer(ILUT_OPENGL);
GLuint tex1 = ilutGLLoadImage("/home/brent/Desktop/myimage.jpeg");

gdb backtrace, for what it's worth:

#0  0x00000000 in ?? ()
#1  0x021b318e in ilDetermineType (
    FileName=0x804ad84 "/home/brent/Desktop/myimage.jpeg")
    at ./../src-IL/src/il_io.c:178
#2  0x021b3290 in ilLoadImage (
    FileName=0x804ad84 "/home/brent/Desktop/myimage.jpeg")
    at ./../src-IL/src/il_io.c:2124
#3  0x003bafc2 in ilutGLLoadImage () from /usr/lib/libILUT.so.1
#4  0x08049f43 in init () at facecube.cpp:112
#5  0x0804a539 in main (argc=1, argv=0xbffff3d4) at facecube.cpp:295

Closer look at entry #1:

#1  0x021b318e in ilDetermineType (
    FileName=0x804ad84 "/home/brent/Desktop/myimage.jpeg")
    at ./../src-IL/src/il_io.c:178
    178     File = iopenr(FileName);
Rooster
  • 1,267
  • 3
  • 15
  • 23
  • 1
    You can answer and accept your own question (without getting reputation for it), that's how things are marked as "solved" here. – datenwolf Dec 02 '11 at 08:52
  • I'm under 100 pts so I have to wait 8 hours to answer (and risk people wasting time on my question), so I do the above in the meantime. – Rooster Dec 02 '11 at 10:04

1 Answers1

0

Solution:

ilInit();
iluInit();
ilutRenderer(ILUT_OPENGL);
GLuint tex1 = ilutGLLoadImage("/home/brent/Desktop/myimage.jpeg");
Rooster
  • 1,267
  • 3
  • 15
  • 23