[vtkusers] Unhandled exception at the time of Unregistering vtkSmartPointer

David Doria daviddoria at gmail.com
Tue Jun 12 07:12:19 EDT 2012


On Tue, Jun 12, 2012 at 1:20 AM, cel02000 <cel02000 at yahoo.com> wrote:

> Perfectly understandable.
>
> I finally found the source of the problem in my code. I have about 40
> functions which have at least one VTK class in their argument. In one of
> the
> functions, I do dynamic memory allocation and use *malloc()* and *free()*
> functions. This function has one argument as *vtkDoubleArray **. When I
> comment out this function, my code ends successfully and can successfully
> delete several created *vtkDoubleArray *pointers. But when this function is
> active, the program fails in deleting *vtkDoubleArray*s. I checked the
> function to deallocate all the allocated arrays correctly. I don't know why
> this gives me the following error when mycode reaches its end.
>
> /Windows has triggered a breakpoint in mycode.exe.
> This may be due to a corruption of the heap, which indicates a bug in
> mycode.exe or any of the DLLs it has loaded./
>
> Thanks,
> Ahmad
>

Ahmad,

Again, why no small, compilable example??

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120612/f5bae9bb/attachment.htm>


More information about the vtkusers mailing list