swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Swarm-Support] I have the strangest seg fault (ever)!


From: Marcus G. Daniels
Subject: Re: [Swarm-Support] I have the strangest seg fault (ever)!
Date: Fri, 15 Apr 2005 16:06:37 -0600
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Paul Johnson wrote:

You are a little over my head. How can call sequences be impossible if they show up in the backtrace?

gdb is just interpreting what it finds in the stack, and the stack can be corrupted by a malfunctioning program...

Am I declaring "colors" wrongly?

You do have an automatic variable in -createGraphWriter that will use local stack space to store the pointers to the color strings and it will become invalid as soon as the method leaves. If you assign that pointer as in [prSeatGraph setColors: colors count: 9], then prSeatGraph will be holding a invalid reference to the color array after leaving the method. So you either have to malloc that array, put it in an ivar, or make it `static'.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]