<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">The first thing that i saw was the construction of the&nbsp;vtkInformationStringValue pointer:</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">vtkInformationStringValue* v = new vtkInformationStringValue;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">while you use the vtk Delete():</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">v-&gt;Delete();</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Shouldn't this be:</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">vtkInformationStringValue* v = vtkInformationStringValue::New();</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">v-&gt;Delete();</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR>I am not sure, i don't have documentation on me right now, so if i'm saying stupid things: Sorry for that... :)</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">&nbsp;</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">cheers, Han<BR><BR><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Original Message ----<BR>From: Andres Barrera &lt;andresba@hotmail.com&gt;<BR>To: vtk-developers@vtk.org; vtkusers@vtk.org<BR>Sent: Friday, 20 October, 2006 10:18:03 PM<BR>Subject: [vtkusers] kernel32.dll error with VTK 5.0 and 5.0.2 in vtkInformationStringKey::Set<BR><BR>
<DIV>Can anyone help me with this error?<BR><BR>I’m not being able to run even a simple program using neither VTK 5.0 nor <BR>VTK 5.0.2.<BR>(Using VTK 5.0 and VTK 5.0.2, CMake 2.0 Patch 6, and C++Builder 5)<BR><BR>I successfully built both VTK versions and compiled with no errors a simple <BR>test code (see below), but at run time the program crashes on an error:<BR><BR>“Access violation at address 7C8……… in module ‘kernel32.dll’. Write of <BR>address 0055……”<BR><BR>While debugging the error seams to be fired by line ‘v-&gt;Value = value;’ at: <BR>'void vtkInformationStringKey::Set(vtkInformation* info, const char* value)'<BR><BR>&nbsp;&nbsp; Any ideas/suggestions?<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;Thanks in advance<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Andres<BR><BR><BR>VTK CODE: (that fires the error)<BR>----------------<BR>void vtkInformationStringKey::Set(vtkInformation* info, const char*
 value)<BR>{<BR>&nbsp;&nbsp;if(value)<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;vtkInformationStringValue* v = new vtkInformationStringValue;<BR>&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;ConstructClass("vtkInformationStringValue");<BR>&nbsp;&nbsp;&nbsp;&nbsp;v-&gt;Value = value;<BR>&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;SetAsObjectBase(info, v);<BR>&nbsp;&nbsp;&nbsp;&nbsp;v-&gt;Delete();<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;this-&gt;SetAsObjectBase(info, 0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>}<BR><BR><BR>SAMPLE CODE:<BR>-------------------<BR>&nbsp;&nbsp;vtkConeSource *cone = vtkConeSource::New();<BR><BR>&nbsp;&nbsp;cone-&gt;SetHeight( 3.0 );<BR>&nbsp;&nbsp;cone-&gt;SetRadius( 1.0 );<BR>&nbsp;&nbsp;cone-&gt;SetResolution( 10 );<BR><BR>&nbsp;&nbsp;vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;coneMapper-&gt;SetInputConnection( cone-&gt;GetOutputPort()
 );<BR><BR>&nbsp;&nbsp;vtkActor *coneActor = vtkActor::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;coneActor-&gt;SetMapper( coneMapper );<BR><BR>&nbsp;&nbsp;vtkRenderer *ren1= vtkRenderer::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;ren1-&gt;AddActor( coneActor );<BR>&nbsp;&nbsp;&nbsp;&nbsp;ren1-&gt;SetBackground( 0.1, 0.2, 0.4 );<BR><BR>&nbsp;&nbsp;vtkRenderWindow *renWin = vtkRenderWindow::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;renWin-&gt;AddRenderer( ren1 );<BR>&nbsp;&nbsp;&nbsp;&nbsp;renWin-&gt;SetSize( 300, 300 );<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;renWin-&gt;Render();<BR><BR>&nbsp;&nbsp;// Add cleanup using Delete()<BR><BR>_________________________________________________________________<BR>Stay in touch with old friends and meet new ones with Windows Live Spaces <BR><A href="http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&amp;wx_url=/friends.aspx&amp;mkt=en-us"
 target=_blank>http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&amp;wx_url=/friends.aspx&amp;mkt=en-us</A><BR><BR>_______________________________________________<BR>This is the private VTK discussion list. <BR>Please keep messages on-topic. Check the FAQ at: <A href="http://www.vtk.org/Wiki/VTK_FAQ" target=_blank>http://www.vtk.org/Wiki/VTK_FAQ</A><BR>Follow this link to subscribe/unsubscribe:<BR><A href="http://www.vtk.org/mailman/listinfo/vtkusers" target=_blank>http://www.vtk.org/mailman/listinfo/vtkusers</A></DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><BR></DIV></div><br>Send instant messages to your online friends http://uk.messenger.yahoo.com </body></html>