Re: Core dump revisited

2006-12-19 Thread Sheldon
Nick Craig-Wood skrev: > Sheldon <[EMAIL PROTECTED]> wrote: > > Man. You are good. This is most insight I have had from anyone. > > :-) > > > I did initialize the arrays with PyObjects and today, after hours of > > debugging and now with your insight, I think the problem lies here: > > Good! > >

Re: Core dump revisited

2006-12-19 Thread Nick Craig-Wood
Sheldon <[EMAIL PROTECTED]> wrote: > Man. You are good. This is most insight I have had from anyone. :-) > I did initialize the arrays with PyObjects and today, after hours of > debugging and now with your insight, I think the problem lies here: Good! You need to release some python references

Re: Core dump revisited

2006-12-19 Thread Duncan Booth
"Sheldon" <[EMAIL PROTECTED]> wrote: > > Duncan Booth skrev: > >> "Sheldon" <[EMAIL PROTECTED]> wrote: >> >> > I am new to this and copied this code from a colleague. So, it >> > corrupts the pointer. How do I do this properly? >> > >> Here is at least part of your problem: >> >> msgop = PyL

Re: Core dump revisited

2006-12-19 Thread Sheldon
Duncan Booth skrev: > "Sheldon" <[EMAIL PROTECTED]> wrote: > > > I am new to this and copied this code from a colleague. So, it > > corrupts the pointer. How do I do this properly? > > > Here is at least part of your problem: > > msgop = PyList_GetItem(work.msgobj, i); > work.msg_scenes[i

Re: Core dump revisited

2006-12-19 Thread Duncan Booth
"Sheldon" <[EMAIL PROTECTED]> wrote: > I am new to this and copied this code from a colleague. So, it > corrupts the pointer. How do I do this properly? > Here is at least part of your problem: msgop = PyList_GetItem(work.msgobj, i); work.msg_scenes[i] = PyString_AsString(msgop); pps

Re: Core dump revisited

2006-12-19 Thread Sheldon
Nick Craig-Wood skrev: > Sheldon <[EMAIL PROTECTED]> wrote: > > Sheldon skrev: > > > Wonderful! Now I know how to used gdb with python. > > Good! > > > > The are results area posted below. Since I am new at this I could > > > used some help in interpreting the problem. What I do know is > > > th

Re: Core dump revisited

2006-12-19 Thread pythoncurious
Sheldon wrote: > > Program received signal SIGSEGV, Segmentation fault. > [Switching to Thread 1077321856 (LWP 32710)] > 0x40297b83 in mallopt () from /lib/tls/libc.so.6 > (gdb) bt > #0 0x40297b83 in mallopt () from /lib/tls/libc.so.6 > #1 0x402958ba in free () from /lib/tls/libc.so.6 > #2 0x40

Re: Core dump revisited

2006-12-19 Thread Nick Craig-Wood
Sheldon <[EMAIL PROTECTED]> wrote: > Sheldon skrev: > > Wonderful! Now I know how to used gdb with python. Good! > > The are results area posted below. Since I am new at this I could > > used some help in interpreting the problem. What I do know is > > this: my allocation of the array is good bu

Re: Core dump revisited

2006-12-18 Thread Sheldon
Nick Craig-Wood skrev: > Sheldon <[EMAIL PROTECTED]> wrote: > > gdb msgppscomp.py core.3203 > > Run > > gdb python > > Then type > > run msgppscomp.py > > at the gdb prompt. > > When it crashes, type "bt" for a back trace. This will pinpoint > exactly where it crashes. > > Hopefully that wi

Re: Core dump revisited

2006-12-18 Thread Sheldon
Nick Craig-Wood skrev: > Sheldon <[EMAIL PROTECTED]> wrote: > > gdb msgppscomp.py core.3203 > > Run > > gdb python > > Then type > > run msgppscomp.py > > at the gdb prompt. > > When it crashes, type "bt" for a back trace. This will pinpoint > exactly where it crashes. > > Hopefully that wi

Re: Core dump revisited

2006-12-18 Thread Nick Craig-Wood
Sheldon <[EMAIL PROTECTED]> wrote: > gdb msgppscomp.py core.3203 Run gdb python Then type run msgppscomp.py at the gdb prompt. When it crashes, type "bt" for a back trace. This will pinpoint exactly where it crashes. Hopefully that will make things clearer. If not post the output. --

Re: Core dump revisited

2006-12-18 Thread Gabriel Genellina
On 17 dic, 07:01, "Sheldon" <[EMAIL PROTECTED]> wrote: > I have a python script that uses a C extention. I keep getting a > recurring problem that causes a core dump a few lines after the C > extention return data back tp python. I tried using pbd and gdb but I Most probably the error is inside t

Core dump revisited

2006-12-17 Thread Sheldon
Hi, I have a python script that uses a C extention. I keep getting a recurring problem that causes a core dump a few lines after the C extention return data back tp python. I tried using pbd and gdb but I have not succeeded in understanding what went wrong and where. I post the python script here