[vtkusers] Access violation only when using VTK through Unreal Engine 4.

Sankhesh Jhaveri sankhesh.jhaveri at kitware.com
Sun Jul 31 00:22:42 EDT 2016


Magnus,

The error "No override found" means that VTK's object factory mechanism
could not instantiate the right OpenGL class
(vtkOpenGLRayCastImageDisplayHelper, in this case) for the super class used
(vtkRayCastImageDisplayHelper, in this case).

Check to see that UE4 is creating the right OpenGL context and if there are
any GLEW errors when instantiating the render window.


*Sankhesh*




On Fri, Jul 29, 2016 at 10:53 AM, Magnus Elden <magnus_elden at hotmail.com>
wrote:

> Access violation - code c0000005 (first/second chance not available)
>
>
>
>
> UE4Editor_ViveTest_3713!vtkFixedPointVolumeRayCastMapper::vtkFixedPointVolumeRayCastMapper()
>
> UE4Editor_ViveTest_3713!vtkFixedPointVolumeRayCastMapper::New()
>
> UE4Editor_ViveTest_3713!vtkSmartVolumeMapper::vtkSmartVolumeMapper()
>
> UE4Editor_ViveTest_3713!vtkSmartVolumeMapper::New()
>
> UE4Editor_ViveTest_3713!vtkSmartPointer<vtkSmartVolumeMapper>::New()
> [c:\users\noobsdesroobs\documents\unreal
> projects\vivetest\thirdparty\vtk\include\vtk-7.0\vtksmartpointer.h:117]
>
> UE4Editor_ViveTest_3713!AVTKVolumeActor::Render()
> [c:\users\noobsdesroobs\documents\unreal
> projects\vivetest\source\vivetest\vtkvolumeactor.cpp:118]
>
>
>
> This is the error I get when I execute this code:
>
>        // Process each file on the command line
>
>        vtkSmartPointer<vtkImageData> imageData =
>
>               vtkSmartPointer<vtkImageData>::New();
>
>        vtkSmartPointer<vtkXMLImageDataReader> reader =
>
>               vtkSmartPointer<vtkXMLImageDataReader>::New();
>
>        reader->SetFileName(path.c_str());
>
>        reader->Update();
>
>        reader->GetOutput()->Register(reader);
>
>        imageData->ShallowCopy(reader->GetOutput());
>
>        vtkSmartPointer<vtkSmartVolumeMapper> volumeMapper =
> vtkSmartPointer<vtkSmartVolumeMapper>::New();
>
>
>
> It fails at the last line.
>
>
>
> What makes me wonder why I get the error above is that it works when I am
> using this code in a standalone project just fine and that the New() static
> function has been used and did not crash.
>
> I built the library from the VTK 7.0 source using VC14 and then included
> it as normal in my UE4 project. However, the UE4 project crashes with this
> error being printed to terminal:
>
>
>
> http://puu.sh/qiF7t/25c8fc6a4d.png
>
>
>
> I have no idea why it is talking about the source file and I have no idea
> why it works outside the UE4 environment and not inside.
>
> Naturally, that should mean that the problem lies with UE4, but I have
> used other libraries just fine and I managed to run the code above if I
> removed the last line. I also know why such an exception is thrown, but I
> don’t see why it is thrown when the include path, lib path and lib files
> are all the same.
>
>
>
> Thank you for your help.
>
>
>
> Yours,
>
> Magnus Elden
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160731/4f71a658/attachment.html>


More information about the vtkusers mailing list