<HTML>
<P>Berk,</P>
<P>Thanks for checking out VTK. I agree, your result show that it is a configuration issue on my machine. Thanks for the help.</P>
<P>- cdp<BR>
<BR>
<BR>
<BR>
<B>On Sat Sep 13 7:07 , 'Berk Geveci' <BERK.GEVECI@KITWARE.COM>sent:<BR>
<BR>
</B></P>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #5167c6 2px solid; MARGIN-RIGHT: 0px">Hi Calvin,<BR>
<BR>
Still no luck reproducing this problem. So far, we tried Mac Leopard,<BR>
Linux Debian (also run the Valgrind memory checker), XP with VS 2003,<BR>
Vista with VS 2005. Is it possible that you are getting the wrong dlls<BR>
when you are running? Look for the debug output from the Visual Studio<BR>
Output window when you are running the program in the debugger. It<BR>
should look as below. Are you getting the right dlls? At this point, I<BR>
am attributing this problem to a configuration problem on your side.<BR>
<BR>
-berk<BR>
<BR>
'array.exe': Loaded 'C:\Users\david.cole\Dashboards\My<BR>
Tests\berk-email-20080912\build\debug\array.exe', Symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\ntdll.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\kernel32.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Users\david.cole\Dashboards\My Tests\VTK<BR>
VTK-5-2-Win32-vs8-Debug\bin\debug\vtkCommon.dll', Symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\user32.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\gdi32.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\advapi32.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\rpcrt4.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Users\david.cole\Dashboards\My Tests\VTK<BR>
VTK-5-2-Win32-vs8-Debug\bin\debug\vtksys.dll', Symbols loaded.<BR>
'array.exe': Loaded<BR>
'C:\Windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_none_24c8a196583ff03b\msvcr80d.dll',<BR>
Symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\msvcrt.dll', No symbols loaded.<BR>
'array.exe': Loaded<BR>
'C:\Windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_none_24c8a196583ff03b\msvcp80d.dll',<BR>
Symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\wsock32.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\ws2_32.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\nsi.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\imm32.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\msctf.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\lpk.dll', No symbols loaded.<BR>
'array.exe': Loaded 'C:\Windows\System32\usp10.dll', No symbols loaded.<BR>
The program '[2308] array.exe: Native' has exited with code 0 (0x0).<BR>
<BR>
On Mon, Sep 8, 2008 at 10:46 AM, <<A href="javascript:top.opencompose('cdp@mcleodusa.net','','','')">javascript:top.opencompose('cdp@mcleodusa.net','','','')</A>> wrote:<BR>
<SPAN style="COLOR: #ff0000">> <A href="javascript:top.opencompose('vtkusers@vtk.org','','','')">javascript:top.opencompose('vtkusers@vtk.org','','','')</A></SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
<SPAN style="COLOR: #ff0000">> I created a vtk-5.2.0 vtkUnsignedCharArray, called its InsertValue() a few</SPAN><BR>
<SPAN style="COLOR: #ff0000">> times, called its SetArray() first with save=1 and then with save=0, and</SPAN><BR>
<SPAN style="COLOR: #ff0000">> then called its Delete() which gave an exception as follows:</SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
<SPAN style="COLOR: #ff0000">> First-chance exception at 0x7c812a5b in myvtk.exe: Microsoft C++ exception:</SPAN><BR>
<SPAN style="COLOR: #ff0000">> int at memory location 0x0012f780..</SPAN><BR>
<SPAN style="COLOR: #ff0000">> HEAP[myvtk.exe]: Invalid Address specified to RtlValidateHeap( 01000000,</SPAN><BR>
<SPAN style="COLOR: #ff0000">> 01153478 )</SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
<SPAN style="COLOR: #ff0000">> This error does not happen if I eliminate the call to SetArray() with save=0</SPAN><BR>
<SPAN style="COLOR: #ff0000">> or if I use vtk-5.0.4 rather than vtk-5.2.0. I also tried setting the new</SPAN><BR>
<SPAN style="COLOR: #ff0000">> 4th argument of the 5.2 SetArray() to</SPAN><BR>
<SPAN style="COLOR: #ff0000">> vtkUnsignedCharArray::VTK_DATA_ARRAY_FREE but still got the error (I am</SPAN><BR>
<SPAN style="COLOR: #ff0000">> using a malloc array).</SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
<SPAN style="COLOR: #ff0000">> Any suggestions for getting SetArray() with save=0 to work?</SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
<SPAN style="COLOR: #ff0000">> Thanks</SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
<SPAN style="COLOR: #ff0000">> - cdp</SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
<SPAN style="COLOR: #ff0000">> _______________________________________________</SPAN><BR>
<SPAN style="COLOR: #ff0000">> This is the private VTK discussion list.</SPAN><BR>
<SPAN style="COLOR: #ff0000">> Please keep messages on-topic. Check the FAQ at:</SPAN><BR>
<SPAN style="COLOR: #ff0000">> <A href="http://webmail.mcleodusa.net/parse.pl?redirect=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ" target=_blank><SPAN style="COLOR: #ff0000">http://www.vtk.org/Wiki/VTK_FAQ</SPAN></A></SPAN><BR>
<SPAN style="COLOR: #ff0000">> Follow this link to subscribe/unsubscribe:</SPAN><BR>
<SPAN style="COLOR: #ff0000">> <A href="http://webmail.mcleodusa.net/parse.pl?redirect=http%3A%2F%2Fwww.vtk.org%2Fmailman%2Flistinfo%2Fvtkusers" target=_blank><SPAN style="COLOR: #ff0000">http://www.vtk.org/mailman/listinfo/vtkusers</SPAN></A></SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
<SPAN style="COLOR: #ff0000">></SPAN><BR>
</BLOCKQUOTE></HTML>
<BR>