[vtkusers] 5.2 SetArray() with save=1 causes Delete() exception:

Berk Geveci berk.geveci at kitware.com
Thu Sep 11 10:48:47 EDT 2008


Hi Calvin,

I cannot reproduce the problem with the example you provided. I tried
on Windows, Mac and Linux. I also run a memory checker and everything
looks clean. Are you sure this example crashes? Which compiler did you
use? Did you build Release or Debug?

-berk

On Wed, Sep 10, 2008 at 1:59 PM, Berk Geveci <berk.geveci at kitware.com> wrote:
> Can you provide a short example that reproduces the problem? It may be a bug.
>
> -berk
>
> On Mon, Sep 8, 2008 at 10:46 AM,  <cdp at mcleodusa.net> wrote:
>> vtkusers at vtk.org
>>
>> I created a vtk-5.2.0 vtkUnsignedCharArray, called its InsertValue() a few
>> times, called its SetArray() first with save=1 and then with save=0, and
>> then called its Delete() which gave an exception as follows:
>>
>> First-chance exception at 0x7c812a5b in myvtk.exe: Microsoft C++ exception:
>> int at memory location 0x0012f780..
>> HEAP[myvtk.exe]: Invalid Address specified to RtlValidateHeap( 01000000,
>> 01153478 )
>>
>> This error does not happen if I eliminate the call to SetArray() with save=0
>> or if I use vtk-5.0.4 rather than vtk-5.2.0.  I also tried setting the new
>> 4th argument of the 5.2 SetArray() to
>> vtkUnsignedCharArray::VTK_DATA_ARRAY_FREE but still got the error (I am
>> using a malloc array).
>>
>> Any suggestions for getting SetArray() with save=0 to work?
>>
>> Thanks
>>
>> - cdp
>>
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>



More information about the vtkusers mailing list