[vtk-developers] kernel32.dll error with VTK 5.0 and 5.0.2 in vtkInformationStringKey::Set

Andres Barrera andresba at hotmail.com
Fri Oct 20 16:18:03 EDT 2006


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




More information about the vtk-developers mailing list