<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 vtkInformationStringValue pointer:</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">vtkInformationStringValue* v = new vtkInformationStringValue;</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">while you use the vtk Delete():</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->Delete();</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">Shouldn't this be:</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">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->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"> </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 <andresba@hotmail.com><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->Value = value;’ at: <BR>'void vtkInformationStringKey::Set(vtkInformation* info, const char* value)'<BR><BR> Any ideas/suggestions?<BR><BR> Thanks in advance<BR><BR> Andres<BR><BR><BR>VTK CODE: (that fires the error)<BR>----------------<BR>void vtkInformationStringKey::Set(vtkInformation* info, const char*
value)<BR>{<BR> if(value)<BR> {<BR> vtkInformationStringValue* v = new vtkInformationStringValue;<BR> this->ConstructClass("vtkInformationStringValue");<BR> v->Value = value;<BR> this->SetAsObjectBase(info, v);<BR> v->Delete();<BR> }<BR> else<BR> {<BR> this->SetAsObjectBase(info, 0);<BR> }<BR>}<BR><BR><BR>SAMPLE CODE:<BR>-------------------<BR> vtkConeSource *cone = vtkConeSource::New();<BR><BR> cone->SetHeight( 3.0 );<BR> cone->SetRadius( 1.0 );<BR> cone->SetResolution( 10 );<BR><BR> vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();<BR> coneMapper->SetInputConnection( cone->GetOutputPort()
);<BR><BR> vtkActor *coneActor = vtkActor::New();<BR> coneActor->SetMapper( coneMapper );<BR><BR> vtkRenderer *ren1= vtkRenderer::New();<BR> ren1->AddActor( coneActor );<BR> ren1->SetBackground( 0.1, 0.2, 0.4 );<BR><BR> vtkRenderWindow *renWin = vtkRenderWindow::New();<BR> renWin->AddRenderer( ren1 );<BR> renWin->SetSize( 300, 300 );<BR><BR> renWin->Render();<BR><BR> // 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&wx_url=/friends.aspx&mkt=en-us"
target=_blank>http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&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>