<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>[vtkusers] Problems in upgrade from 4.2 to 4.4</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Hi vtkusers,</FONT>
</P>
<P><FONT SIZE=2>I am trying to upgrade from VTK 4.2 to 4.4 with my Borland C++ Builder 6 (BCB6) and ran into many problems such as Resource Leaks and Access Violations.</FONT></P>
<P><FONT SIZE=2>I successfully built VTK 4.4 with BCB6 and installed vtkBorlandRenderWindow. I had no problem with Project_vtkDemo under VTK\Examples. However, my application, which used to work perfectly fine with vtk4.2, always ended up with an Access Violation in the code below.</FONT></P>
<BR>
<P><FONT SIZE=2>inline void vtkIdTypeArray::InsertValue(vtkIdType id, vtkIdType i)</FONT>
<BR><FONT SIZE=2>{</FONT>
<BR><FONT SIZE=2> if ( id >= this->Size )</FONT>
<BR><FONT SIZE=2> {</FONT>
<BR><FONT SIZE=2> this->ResizeAndExtend(id+1);</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2> this->Array[id] = i; <------------- Access Violation here</FONT>
<BR><FONT SIZE=2> if ( id > this->MaxId )</FONT>
<BR><FONT SIZE=2> {</FONT>
<BR><FONT SIZE=2> this->MaxId = id;</FONT>
<BR><FONT SIZE=2> }</FONT>
<BR><FONT SIZE=2>}</FONT>
</P>
<P><FONT SIZE=2>In one case, the code below is in a FormCreate event of my main form. The first two lines were passed but the third line caused the above access violation.</FONT></P>
<P><FONT SIZE=2> this->polydata = vtkPolyData::New();</FONT>
<BR><FONT SIZE=2> this->actor = vtkActor::New();</FONT>
<BR><FONT SIZE=2> this->planewidget = vtkPlaneWidget::New();</FONT>
</P>
<P><FONT SIZE=2>FYI, my application had no problem with float-double and old-callback issues and it had no compile-time errors. Is there any change I missed in VTK4.4? Is it the time to abandon Borland? </FONT></P>
<P><FONT SIZE=2>Thank you for your time and your help is appreciated!</FONT>
</P>
<BR>
<P><FONT SIZE=2>Yang</FONT>
</P>
</BODY>
</HTML>