-----BEGIN PGP SIGNED MESSAGE-----
I ran into an interesting bug when attempting to add imlib2 to a program that uses GLUT. The program would compile/link fine, but segfault when the imlib_load_image() call was made. (initial call to imlib)
The fix?
change: int time;
to: //int time;
the time integer variable was a global variable that was left over from a FPS counter I had in the program at one point....it was not used at this time.
The program has no dynamic allocation, so it shouldn't be a pointer error, and because I got no compile/link errors it shouldn't have been getting confused with some other global variable...
So, it could be a tool error (gcc) or a really funky interaction between imlib2 and glut/OpenGL.
In any case, if you care to try to replicate it, I've included all the files.
Attached, or at the following URL: www.cc.gatech.edu/~summetj/drafts/funky_error.tar.gz
./doit compiles and runs the good one, and ./doit_bad compiles the bad one, and then segfaults. (at least, on my Mandrake 10.1 box...)
The VERSIONS directory lists a lot of information about what GL/MESA/imLib2 versions I'm using (whatever came with Mandrake...)
Jay -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iQCVAwUBQl8n17WkkhmZq4xxAQFOzwP+KD2U89xSiNdO2Bbo8XOLPBGbxJ5tqNoq tQRSysxOB2j8ChmYkXhnioIlQ0sdcNn6jeAfBRq+I0507rk2s5xZ7/xXCZrZx0Xt lgbJyeTPi1gp10FS70DFsaL5UbqjtqVoyn+O+pKIqbYZA9ZXaumubRA2Q0lXgnrx ZsFeWyfPPgI= =lIu2 -----END PGP SIGNATURE-----
funky_error.tar.gz
Description: application/gzip