[vtkusers] breaking after vtkErrorMacro

Amy Squillacote ahs at cfdrc.com
Fri Nov 7 09:25:33 EST 2008


Hi Dominik,

 From looking at the code in vtkSetGet.h for vtkErrorMacro, it seems 
that if something is observing the "ErrorEvent", then that event is 
invoked. Perhaps you could add an observer to the filter that has this 
problem -- specifically listening for the "ErrorEvent". Then you could 
exit gracefully in your event handler.

- Amy

Dominik Szczerba wrote:
> Thanks for a hint, but I need to handle this case in a release version 
> (no debugger). I looked up the vtkErrorMacro and it indeed calls 
> BreakOnError() at the end. Is there a chance to attach own code there?
>
> Thanks,
> Dominik
>
> Goodwin Lawlor wrote:
>> Dominik Szczerba wrote:
>>> Is there a way to stop execution after vtkErrorMacro?
>>> I get a malloc failure in a VTK filter that is not checked for in 
>>> the parent calling stack... (bug report due). pointer==0 is detected 
>>> (if ptr==0 vtkErrorMacro... return 0) but execution continues 
>>> (leading into bushes).
>>> If not, what do I do to exit gracefully on a malloc quit?
>>
>> Hi Dominik,
>>
>> You can place a debugger break on vtkObject::BreakOnError()
>>
>> hth
>>
>> Goodwin
>>
>

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805





More information about the vtkusers mailing list