[Bf-committers] Klocwork source analysis

Joe Eagar joeedh at gmail.com
Sun Dec 3 16:46:35 CET 2006


Mathias Panzenböck wrote:
> Alexander Ewering wrote:
>   
>> On Sun, 3 Dec 2006, [ISO-8859-1] Mathias Panzenb?ck wrote:
>>
>>     
>>> Maybe assert(ptr); would be a sufficient solution?
>>>       
>> And what is that "assert()" supposed to do?
>>
>>     
>
> Well, when a function which is not supposed to get a NULL pointer gets NULL, then there is obviously
> something very wrong in the source! How can such a error be recovered? In most cases it can't!
> So the best thing would be to give a back trace and shutdown blender (maybe *try* to save a backup
> of the file, but do not overwrite the file, because of this error a corruption could be possible).
> Maybe you can tell the user to send a (maybe automated) error report including this back trace and
> maybe other informations to the blender developers (like amarok dose on seg.faults).
Well I wrote a function once that saved the blender undo file on 
SIGSEGV; I wonder if that would be worth redoing for cvs?

Joe


More information about the Bf-committers mailing list