Debugger crashes when break point is inside a function

This is very strange.

So, I have this code:

1
2
3
...
MakeTexture((char*)ilGetData(), ilGetInteger(IL_IMAGE_WIDTH), ilGetInteger(IL_IMAGE_HEIGHT));
...


And it compiles fine and, supposedly, works fine too, but when I try to put a break point inside the MakeTexture fuction gdb just goes crazy, it freezes and starts alocating memory until it reaches like 30+ mbs, and after that codeblocks freezes and I have to terminate the gdb process to return everything back to normal.

Now, another weird thing is that this only happens if I pass (char*)ilGetData(), if I pass something like NULL to the function, this doesn't happen.

Oh, also, the MakeTexture function is this:

1
2
3
4
int MakeTexture(char *pxData, unsigned w, unsigned h)
{
    return 0;
}


Any ideas people? This is driving me TO INSANITY.

Thank you in advance for any insight you may provide.
It can be that the problem is not in the function call but in its argument expressions.
Ok, the "problem" was in the arguments yes.

So, for those of you who don't know DevIL, ilGetData() gets a pointer to the place where the loaded image was stored.
Being the jackass I am, I decided to test my image loading function by loading an image that was like 4000 by 3000. Apparently, the debugger has to do some extra processing to keep track of the values passed to the function (and even solve the pointers), so what happened is that the debugger just stopped while processing the image that was being passed. Since it was such a big image it took a very long time.

So yeah, the problem was non existent, but thanks for trying to help anyway.
Topic archived. No new replies allowed.