PowerPak Problem

I am having a problem with the sprite routines for my PowerPak lib. I
was moving right along and hoped to finish all of the functions today,
but decided to stop and make an example and test what I had and had
problems.
The way I have it set up there is a structure called PD_Sprite.
PD_Sprite has in it an array of pointers to an SDL_Surface. The purpose
of this is so that all of the frames of the sprite are in the structure
and the lib will handle animation for the user.
The problem is my program doesn’t seem to like having an array of
pointers to SDL_Surface. Anytime I call a function that tries to access
one of these (except in some cases the first one, which would make sense
because that is the beginning of the memory, so it might be more likely
to work as opposed to memory the computer has to “find”, right?) the
program just exits. It doesn’t dump core but it exits prematurely, like
it would if it ran into an error handler, except all my error handlers
would tell me the problem and it doesn’t tell me anything.
If anybody knows anything about gdb here is what it says when I run a
function that uses a for statement and free Sprite->frame[i]:

0x401729eb in _SDL_FreeSurface ()

If I try to initialize one of the frames with imglib It gives me this,

Program received signal SIGSEGV, Segmentation fault.
0x0 in ?? ()

even when compiled with -g it gives me that. Why can’t it find the
error?

If anybody can help me with the debugging process I would be very
appreciative.

John Garrison wrote:

I am having a problem with the sprite routines for my PowerPak lib. I

[snip snip snipper snip snip snip]

If anybody can help me with the debugging process I would be very
appreciative.

I can’t help you with your debugging process, but I think your lib is
yucky. Don’t take it personally. But it’s soooo slow. Optimize!!!

Paul Lowe
spazz at ulink.net

Paul Lowe wrote:

John Garrison wrote:

I am having a problem with the sprite routines for my PowerPak lib. I

[snip snip snipper snip snip snip]

If anybody can help me with the debugging process I would be very
appreciative.

I can’t help you with your debugging process, but I think your lib is
yucky. Don’t take it personally. But it’s soooo slow. Optimize!!!

I told you it was too slow to use. I also believe that sometime along the
line I said that I took the code straight from tutorials and wanted to
finish more of the API before optimizing. Besides that was one of the
reasons for releasing the code, so I could maybe get some help, after all
I haven’t seen one single high-level lib for linux yet. I can’t hardly do
it all myself.>

Paul Lowe
spazz at ulink.net