[vtkusers] VTK 6.0 with Visual Studio
Joseph Melnyk
JMelnyk at pile.com
Tue Jul 23 13:55:25 EDT 2013
I built VTK in debug mode and got a bit more information. The debugger doesn't trace into VTK, it just outputs the following to the output console:
Generic Warning: In ..\..\..\VTK6.0.0\Rendering\Core\vtkRenderer.cxx, line 47
Error: no override found for 'vtkRenderer'.
Generic Warning: In ..\..\..\VTK6.0.0\Rendering\Core\vtkRenderWindow.cxx, line 35
Error: no override found for 'vtkRenderWindow'
Which are the respective lines:
vtkAbstractObjectFactoryNewMacro(vtkRenderer)
vtkAbstractObjectFactoryNewMacro(vtkRenderWindow)
This occurs when I try to execute the following line:
vtkSmartPointer<vtkContextView> view = vtkSmartPointer<vtkContextView>::New();
Note that I am doing the autoinit as follows:
#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)
#define vtkRenderingVolume_AUTOINIT 1(vtkRenderingVolumeOpenGL)
This is defined within the header file of any class using VTK.
From: Bill Lorensen [mailto:bill.lorensen at gmail.com]
Sent: Tuesday, July 23, 2013 11:35 AM
To: Joseph Melnyk
Cc: Robert Maynard; vtkusers at vtk.org
Subject: Re: [vtkusers] VTK 6.0 with Visual Studio
If you build your VTK Debug you you should see more.
On Tue, Jul 23, 2013 at 11:24 AM, Joseph Melnyk <JMelnyk at pile.com> wrote:
Thanks for the suggestion. I can't trace directly into the vtk dll's for more information. The stack trace just tells me where they've failed in the .h file, which is just the New() call.
As I said, some objects will instantiate and can be used just fine. For example, I can use vtkTable and vtkFloatArray just fine but then when I try to use vtkContextView or vtkInteractorStyleTrackballCamera, the New() event fails.
Regards
Joseph Melnyk
> -----Original Message-----
> From: Robert Maynard [mailto:robert.maynard at kitware.com]
> Sent: Tuesday, July 23, 2013 9:14 AM
> To: Joseph Melnyk
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] VTK 6.0 with Visual Studio
>
> Are you able to provide more information on the exact violation exceptions
> with a back trace? Access violations can occur when you call methods on a
> NULL object, so it could be a case that a object factory that is NULL is being
> asked to create classes.
>
> On Mon, Jul 22, 2013 at 2:45 PM, Joseph Melnyk <JMelnyk at pile.com> wrote:
> > I'm attempting to port an existing code base from VTK 5.10 to 6.0. This
> code base has existed and worked happily with VTK 5.x for a few years now,
> being built with Visual Studio 2008. When I began the port to 6.0, I followed
> the migration guide found here:
> http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide and the code builds
> and links just fine. However, when I run it, I'm getting access violation
> exceptions (attempts to read/write protected memory) when I try
> instantiating with New(). Researching further, I see that this problem is
> mentioned here:
> http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_de
> fines HOWEVER I'm not getting NULL objects with the New() call, I'm getting
> exceptions. Furthermore, it doesn't happen with every VTK object; some
> instantiate and can be used just fine. Nonetheless, I tried the suggestions at
> the second link, regarding definition of VTK AUTOINIT, and they proved
> fruitless. So I'm currently at a loss...
> >
> > For what it's worth, I'm building VTK with CMAKE and the only options I'm
> changing from the default configuration are the following:
> > - build shared libs
> > - don't build TESTING
> > - set custom install directory
> >
> > Thanks for your time; any help would be greatly appreciated...
> > Joseph Melnyk
> >
> > __Scanned by MessageLabs
> > _______________________________________________
> > 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
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
>
> _Scanned by MessageLabs
__Scanned by MessageLabs
_______________________________________________
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
Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
--
Unpaid intern in BillsBasement at noware dot com
_Scanned by MessageLabs
__Scanned by MessageLabs
More information about the vtkusers
mailing list