On Tue, Sep 16, 2008 at 11:14:46AM +0100, Philip Armstrong wrote:
>On Mon, Sep 15, 2008 at 09:09:27PM +0200, Duncan Webb wrote:
>>When I had this problem, I used gdb to track it down. Using:
>>DISPLAY="" ./freevo -d -d
>>writes a /tmp/freevo-gdb.sh which you can use to run freevo under gdb 
>>and it will break in main.
>
>Will give it a whirl & see what I get. (Should the above be put on the
>wiki somewhere? It might be useful.)

OK. Having compiled my own pygame to get debugging symbols, here's the
backtrace:

Program received signal SIGSEGV, Segmentation fault.
lines (self=0x0, arg=0x8df33ec) at src/draw.c:296
296              if(surf->format->BytesPerPixel <= 0 || 
surf->format->BytesPerPixel > 4)
(gdb) bt
#0  lines (self=0x0, arg=0x8df33ec) at src/draw.c:296
#1  0xb7437c46 in polygon (self=0x0, arg=0xa128c0c) at src/draw.c:553
#2  0xb7437d9c in rect (self=0x0, arg=0x8e78fcc) at src/draw.c:644
#3  0x080ced31 in PyEval_EvalFrameEx ()
#4  0x080d0635 in PyEval_EvalCodeEx ()
#5  0x080cea20 in PyEval_EvalFrameEx ()
#6  0x080cfeed in PyEval_EvalFrameEx ()
#7  0x080cfeed in PyEval_EvalFrameEx ()
#8  0x080cfeed in PyEval_EvalFrameEx ()
#9  0x080d0635 in PyEval_EvalCodeEx ()
#10 0x080cea20 in PyEval_EvalFrameEx ()
#11 0x080d0635 in PyEval_EvalCodeEx ()
#12 0x0811729e in ?? ()
#13 0xb7dc1410 in ?? ()
#14 0xb7dfeacc in ?? ()
#15 0x00000000 in ?? ()
(gdb) p surf
$1 = (SDL_Surface *) 0x0
(gdb) p surfobj
$2 = (PyObject *) 0x8712720
(gdb) l 278,297
278   static PyObject* lines(PyObject* self, PyObject* arg)
279   {
280        PyObject *surfobj, *colorobj, *closedobj, *points, *item;
281        SDL_Surface* surf;
282        int x, y;
283        int top, left, bottom, right;
284        int pts[4], width=1;
285        Uint8 rgba[4];
286        Uint32 color;
287        int closed;
288        int result, loop, length, drawn;
289        int startx, starty;
290   
291        /*get all the arguments*/
292        if(!PyArg_ParseTuple(arg, "O!OOO|i", &PySurface_Type, &surfobj, 
&colorobj, &closedobj, &points, &width))
293                return NULL;
294         surf = PySurface_AsSurface(surfobj);
295
296         if(surf->format->BytesPerPixel <= 0 || surf->format->BytesPerPixel 
> 4)
297                 return RAISE(PyExc_ValueError, "unsupport bit depth for 
line draw");

So it looks like the first argument to this call isn't actually a Surface?

Is there some way to get the line of python that's actually calling
this code out of the interpreter from gdb?

cheers, Phil

-- 
http://www.kantaka.co.uk/ .oOo. public key: http://www.kantaka.co.uk/gpg.txt

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to