Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProcessingEngine::getModelFromActor is throwing read access violation #10

Open
fazila-rahman opened this issue Jan 5, 2020 · 1 comment

Comments

@fazila-rahman
Copy link

Hi,
I have managed to compile the run the code on Windows 10 (64bit) with VTK8.2 and Qt5.12.6 using the msvc2017_64 compiler. It is now loading the model fine, thanks to contributors!

The only problem I am facing is: when trying to click on the 3D model (e.g. the big hand image) it is throwing read access violation from the PocessingEngine::getModelFromActor method. As I have traced the origin of this exception I find that the shared_pointer stored inside the m_models vector is invalid (or may be out of scope) and hence the vector exception is occurring. Here is the highlighted code that is throwing this exception:
for (const std::shared_ptr& model : m_models)
{
qDebug() << "ProcessingEngine::getModelFromActor: Bingo1";
if (model->getModelActor() == modelActor)
{
qDebug() << "ProcessingEngine::getModelFromActor: Bingo2";
return model;
}
qDebug() << "ProcessingEngine::getModelFromActor: Bingo3";
}
I am a newbie at this VTK world; please help!

Thanks for your support!

@kshahim
Copy link

kshahim commented Mar 11, 2020

I have seen also several times, crashing due to probably the share pointer is getting out of scope, it is hard to track it though, any update on this aspect ? do you think worth to try vtkSmartPointer instead or something else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants