[vtkusers] kernel32.dll error with VTK 5.0 and 5.0.2 in vtkInformationStringKey::Set

Andres Barrera andresba at hotmail.com
Mon Oct 23 12:20:37 EDT 2006


Hey Han,  ( ...yes,  I did get your message twice ;-)....  )

        Thank you very much for your help. Regarding to the error, I'll try 
modifying the original vtk implementation for vtkInformationStringValue, but 
I don't keep too much hope on it.... The construction looked weird to me 
too, but this class is being used by many people... Therefore somebody else 
should have fixed it before, but I didn't find anything on the users list... 
I addition, it is crashing 2 lines before it reaches 'v->Delete();'... 
Anyway, I will try anything anybody can think of, considering how frustrated 
I am... ;-)

        Thanks again


                              Andres




>From: echinococcus Multilocularis <lintworm2 at yahoo.co.uk>
>To: Andres Barrera <andresba at hotmail.com>, vtk-developers at vtk.org,  
>vtkusers at vtk.org
>Subject: Re: [vtkusers] kernel32.dll error with VTK 5.0 and 5.0.2 in 
>vtkInformationStringKey::Set
>Date: Sat, 21 Oct 2006 08:13:47 +0000 (GMT)
>
>The first thing that i saw was the construction of the 
>vtkInformationStringValue pointer:
>
>vtkInformationStringValue* v = new vtkInformationStringValue;
>
>while you use the vtk Delete():
>
>v->Delete();
>
>Shouldn't this be:
>
>vtkInformationStringValue* v = vtkInformationStringValue::New();
>.
>.
>.
>.
>v->Delete();
>
>I am not sure, i don't have documentation on me right now, so if i'm saying 
>stupid things: Sorry for that... :)
>
>cheers, Han
>
>
>
>----- Original Message ----
>From: Andres Barrera <andresba at hotmail.com>
>To: vtk-developers at vtk.org; vtkusers at vtk.org
>Sent: Friday, 20 October, 2006 10:18:03 PM
>Subject: [vtkusers] kernel32.dll error with VTK 5.0 and 5.0.2 in 
>vtkInformationStringKey::Set
>
>
>Can anyone help me with this error?
>
>I’m not being able to run even a simple program using neither VTK 5.0 nor
>VTK 5.0.2.
>(Using VTK 5.0 and VTK 5.0.2, CMake 2.0 Patch 6, and C++Builder 5)
>
>I successfully built both VTK versions and compiled with no errors a simple
>test code (see below), but at run time the program crashes on an error:
>
>“Access violation at address 7C8……… in module ‘kernel32.dll’. Write of
>address 0055……”
>
>While debugging the error seams to be fired by line ‘v->Value = value;’ at:
>'void vtkInformationStringKey::Set(vtkInformation* info, const char* 
>value)'
>
>    Any ideas/suggestions?
>
>     Thanks in advance
>
>         Andres
>
>
>VTK CODE: (that fires the error)
>----------------
>void vtkInformationStringKey::Set(vtkInformation* info, const char* value)
>{
>   if(value)
>     {
>     vtkInformationStringValue* v = new vtkInformationStringValue;
>     this->ConstructClass("vtkInformationStringValue");
>     v->Value = value;
>     this->SetAsObjectBase(info, v);
>     v->Delete();
>     }
>   else
>     {
>     this->SetAsObjectBase(info, 0);
>     }
>}
>
>
>SAMPLE CODE:
>-------------------
>   vtkConeSource *cone = vtkConeSource::New();
>
>   cone->SetHeight( 3.0 );
>   cone->SetRadius( 1.0 );
>   cone->SetResolution( 10 );
>
>   vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
>     coneMapper->SetInputConnection( cone->GetOutputPort() );
>
>   vtkActor *coneActor = vtkActor::New();
>     coneActor->SetMapper( coneMapper );
>
>   vtkRenderer *ren1= vtkRenderer::New();
>     ren1->AddActor( coneActor );
>     ren1->SetBackground( 0.1, 0.2, 0.4 );
>
>   vtkRenderWindow *renWin = vtkRenderWindow::New();
>     renWin->AddRenderer( ren1 );
>     renWin->SetSize( 300, 300 );
>
>     renWin->Render();
>
>   // Add cleanup using Delete()
>
>_________________________________________________________________
>Stay in touch with old friends and meet new ones with Windows Live Spaces
>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
>
>_______________________________________________
>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
>
>Send instant messages to your online friends http://uk.messenger.yahoo.com

_________________________________________________________________
Try Search Survival Kits: Fix up your home and better handle your cash with 
Live Search! 
http://imagine-windowslive.com/search/kits/default.aspx?kit=improve&locale=en-US&source=hmtagline




More information about the vtkusers mailing list