> I am writing a libVL app with libIL, libGL and other libraries. For 4-5
> days everything used to work fine. However, now it crashes like hell. I
> have retrieved an older, working version from the CVS. Again, crashes over
> crashes. It looks like the problems are in 'internal' calls to memcpy,
> malloc, memfree and other *mem* functions. By internal I mean that the
> program crashes in middle of a harmless jpeg_file = new ilImgFile(), when
> __malloc or other functions alike ar called.
The fact that it crashes in those functions doesn't mean they are
causing the problem. It's very possible that you've pointer related
problems somewhere in your code.
Try using a product for debugging memory problems. If you don't have
one, a good free example to start with is the Electric Fence library.
Just relink your software with that library (no changes needed in your
source code), and your program will (hopefully) crash in the first line
of code with illegal memory operations.
Note however that big programs are hard to debug with Electric Fence: If
it isn't little, you may need to enlarge your swap area (Electric Fence
allocates extra memory for every malloc call), and if it has a GUI, it
may take many minutes before you see the main window appear.
Btw, I don't remember where I downloaded Electric Fence from, but it
should be easy to locate on the net.
Another good idea is to run the program on other IRIX versions (if you
have several machines): It may crash in a different place (if you're
lucky), so you can have extra clues in your bug hunting session.
Hope you find your bad pointer,
> I have done a "complete reinstall" of the system. (keep *; install S; go;
> at the inst prompt). Nothing changed. Do you have other ideas ?
> Thanks a lot,
> * Ionut Georgescu
> * http://www.physik.tu-cottbus.de/~george/
> * ICQ: 38973105
> * "In Windows you can do everything Microsoft wants you to do; in Unix you
> * can do anything the computer is able to do."