begin process at 2008 07 05 07:30:18
1 205 055 membres
41 nouveaux aujourd'hui
14 118 membres club

Vous ne trouvez pas de réponse à votre problème ? Alors posez la question dans le forum.
Souvenez-vous qu'il n'y a jamais de question bête, mais rester dans l'ignorance parce que l'on n'ose pas poser une question, ça c'est une erreur !

Sujet : Unhandled exception at 0x7c422981 in vtk_minimal.exe: 0xC0000005: Access violation writing location 0x00652493. [ Windows / Autre ] (limen)

Unhandled exception at 0x7c422981 in vtk_minimal.exe: 0xC0000005: Access violation writing location 0x00652493. le 17/04/2008 15:40:08

limen
Salut tout le monde,
J'essayes d'utiliser la bibliothèque VTK (Visualisation ToolKit) avec visual studio .NET 2005, je l'ai installé et compilé, tous marche bien.
Mais l'orsque j'ai essayé d'éxécuter un petit programme de teste j'ai eu l'erreur suivante:

Unhandled exception at 0x7c422981 in vtk_minimal.exe: 0xC0000005: Access violation writing location 0x00652493.

le code que j'ai mit est le suivant:
#include "project_config.h"

#include "vtkActor.h"
#include "vtkConeSource.h"
#include "vtkInteractorStyleTrackballCamera.h"
#include "vtkPolyDataMapper.h"
#include "vtkRenderWindow.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkRenderer.h"


int main(int argc, char** argv[])
{
    //Create a cone source object

    vtkConeSource *cone = vtkConeSource::New();
    cone->SetHeight(3.0);
    cone->SetRadius(1.0);
    cone->SetResolution(10);

    //Create a cone mapper object

    vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
    coneMapper->SetInputConnection(cone->GetOutputPort());

    //Associate the cone mapper to an actor object

    vtkActor *coneActor = vtkActor::New();
    coneActor->SetMapper(coneMapper);

    //Add that actor to the renderer

    vtkRenderer *ren1 = vtkRenderer::New();
    ren1->AddActor(coneActor);
    ren1->SetBackground(0.1, 0.2, 0.4);


    //Create a render window

    vtkRenderWindow *renWin = vtkRenderWindow::New();
    renWin->AddRenderer(ren1);
    renWin->SetSize(300, 300);

    //Create an interactor and associate it to the render window

=>
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
    iren->SetRenderWindow(renWin);
    //Define the interacting style

    vtkInteractorStyleTrackballCamera *style = vtkInteractorStyleTrackballCamera::New();
    iren->SetInteractorStyle(style);

    //Start to interact

    iren->Initialize();
    iren->Start();   

    return 0;
}

ça plante exactement là ou il ya la flèche
Sachant que la bibliothèque VTK utilise OpenGL.
Merci pour vos aides!!


Re : Unhandled exception at 0x7c422981 in vtk_minimal.exe: 0xC0000005: Access violation writing location 0x00652493. le 17/04/2008 18:50:53

luhtor
J'y connais rien à vtk, mais il manque un genre de vtkInit quelque part ?


Classé sous : include, create, vtk, cone, iren

Participer à cet échange

Pub



Appels d'offres

CalendriCode

Juillet 2008
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

VS Express FR Gratuit !

VS Express en français et 100% gratuit !

Téléchargements

Boutique

Boutique de goodies CodeS-SourceS