<div dir="ltr">I don';t have these problems for some reason. I think we need to help customers like Joseph. Can you tell him how to get his code configured?<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Jul 24, 2013 at 1:41 PM, Marcus D. Hanwell <span dir="ltr"><<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Bill,<br>
<br>
I can take a look at adding some simpler macros that can be called to<br>
initialize code, we take care of all of the defines if CMake is used<br>
but it is quite difficult to get right when not using CMake. Do you<br>
have specific suggestions on how you want to see this fixed Bill? The<br>
errors output indicate the defines are not being set correctly, and<br>
that is why I added the debug output (to make this issue easier to<br>
spot).<br>
<span class="HOEnZb"><font color="#888888"><br>
Marcus<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, Jul 23, 2013 at 5:00 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>> wrote:<br>
> Marcus,<br>
><br>
> The new factory mechanism is frustrating users. Apparently, the current<br>
> documentation is not clear enough. We need to fix this.<br>
><br>
> Bill<br>
><br>
><br>
><br>
> On Tue, Jul 23, 2013 at 4:57 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
> wrote:<br>
>><br>
>> This is not your fault. It is our (vtk developers) fault.<br>
>><br>
>><br>
>><br>
>> On Tue, Jul 23, 2013 at 4:46 PM, Brooke Steele <<a href="mailto:bnsteel@gmail.com">bnsteel@gmail.com</a>> wrote:<br>
>>><br>
>>> Well, I'm not a CMake guru.<br>
>>><br>
>>> I am not smart enough to figure out how to make CMake include all of my<br>
>>> settings from my existing project, so I emulated the output of using CMake<br>
>>> with VTK6.0 to make a VTK only VS project, and ported what I found to my<br>
>>> existing VS project.<br>
>>><br>
>>> I couldn't find sufficient description of what I was "supposed" to do<br>
>>> online, so I had to wing it.<br>
>>><br>
>>> My project works, so I feel like the manual includes were the right<br>
>>> thing for me.<br>
>>><br>
>>> Brooke<br>
>>><br>
>>><br>
>>> On Tue, Jul 23, 2013 at 3:49 PM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>><br>
>>> wrote:<br>
>>>><br>
>>>> You should not have to manually include any directories in VS.<br>
>>>><br>
>>>><br>
>>>><br>
>>>> On Tue, Jul 23, 2013 at 3:33 PM, Brooke Steele <<a href="mailto:bnsteel@gmail.com">bnsteel@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Joseph,<br>
>>>>><br>
>>>>> I recently was successful in getting VTK6.0 working with my VS2008<br>
>>>>> project.<br>
>>>>><br>
>>>>> What I had to do was include the headers in BOTH the source<br>
>>>>> distribution AND the CMake build directory. It would build fine with just<br>
>>>>> the source headers, since that is where the definitions are, but it wouldn't<br>
>>>>> run because the macro/module definitions are in the build directory.<br>
>>>>><br>
>>>>> There are 50 vtk include directories in my project, half from the<br>
>>>>> source and half from the build.<br>
>>>>><br>
>>>>> Brooke<br>
>>>>><br>
>>>>><br>
>>>>> On Tue, Jul 23, 2013 at 1:55 PM, Joseph Melnyk <<a href="mailto:JMelnyk@pile.com">JMelnyk@pile.com</a>><br>
>>>>> wrote:<br>
>>>>>><br>
>>>>>> I built VTK in debug mode and got a bit more information. The<br>
>>>>>> debugger doesn't trace into VTK, it just outputs the following to the output<br>
>>>>>> console:<br>
>>>>>> Generic Warning: In<br>
>>>>>> ..\..\..\VTK6.0.0\Rendering\Core\vtkRenderer.cxx, line 47<br>
>>>>>> Error: no override found for 'vtkRenderer'.<br>
>>>>>> Generic Warning: In<br>
>>>>>> ..\..\..\VTK6.0.0\Rendering\Core\vtkRenderWindow.cxx, line 35<br>
>>>>>> Error: no override found for 'vtkRenderWindow'<br>
>>>>>><br>
>>>>>> Which are the respective lines:<br>
>>>>>> vtkAbstractObjectFactoryNewMacro(vtkRenderer)<br>
>>>>>> vtkAbstractObjectFactoryNewMacro(vtkRenderWindow)<br>
>>>>>><br>
>>>>>> This occurs when I try to execute the following line:<br>
>>>>>> vtkSmartPointer<vtkContextView> view =<br>
>>>>>> vtkSmartPointer<vtkContextView>::New();<br>
>>>>>><br>
>>>>>> Note that I am doing the autoinit as follows:<br>
>>>>>> #define vtkRenderingCore_AUTOINIT<br>
>>>>>> 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)<br>
>>>>>> #define vtkRenderingVolume_AUTOINIT<br>
>>>>>> 1(vtkRenderingVolumeOpenGL)<br>
>>>>>><br>
>>>>>> This is defined within the header file of any class using VTK.<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> From: Bill Lorensen [mailto:<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>]<br>
>>>>>> Sent: Tuesday, July 23, 2013 11:35 AM<br>
>>>>>> To: Joseph Melnyk<br>
>>>>>> Cc: Robert Maynard; <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
>>>>>> Subject: Re: [vtkusers] VTK 6.0 with Visual Studio<br>
>>>>>><br>
>>>>>> If you build your VTK Debug you you should see more.<br>
>>>>>><br>
>>>>>> On Tue, Jul 23, 2013 at 11:24 AM, Joseph Melnyk <<a href="mailto:JMelnyk@pile.com">JMelnyk@pile.com</a>><br>
>>>>>> wrote:<br>
>>>>>> Thanks for the suggestion. I can't trace directly into the vtk dll's<br>
>>>>>> for more information. The stack trace just tells me where they've failed in<br>
>>>>>> the .h file, which is just the New() call.<br>
>>>>>><br>
>>>>>> As I said, some objects will instantiate and can be used just fine.<br>
>>>>>> For example, I can use vtkTable and vtkFloatArray just fine but then when I<br>
>>>>>> try to use vtkContextView or vtkInteractorStyleTrackballCamera, the New()<br>
>>>>>> event fails.<br>
>>>>>><br>
>>>>>> Regards<br>
>>>>>> Joseph Melnyk<br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> > -----Original Message-----<br>
>>>>>> > From: Robert Maynard [mailto:<a href="mailto:robert.maynard@kitware.com">robert.maynard@kitware.com</a>]<br>
>>>>>> > Sent: Tuesday, July 23, 2013 9:14 AM<br>
>>>>>> > To: Joseph Melnyk<br>
>>>>>> > Cc: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br>
>>>>>> > Subject: Re: [vtkusers] VTK 6.0 with Visual Studio<br>
>>>>>> ><br>
>>>>>> > Are you able to provide more information on the exact violation<br>
>>>>>> > exceptions<br>
>>>>>> > with a back trace? Access violations can occur when you call methods<br>
>>>>>> > on a<br>
>>>>>> > NULL object, so it could be a case that a object factory that is<br>
>>>>>> > NULL is being<br>
>>>>>> > asked to create classes.<br>
>>>>>> ><br>
>>>>>> > On Mon, Jul 22, 2013 at 2:45 PM, Joseph Melnyk <<a href="mailto:JMelnyk@pile.com">JMelnyk@pile.com</a>><br>
>>>>>> > wrote:<br>
>>>>>> > > I'm attempting to port an existing code base from VTK 5.10 to 6.0.<br>
>>>>>> > > This<br>
>>>>>> > code base has existed and worked happily with VTK 5.x for a few<br>
>>>>>> > years now,<br>
>>>>>> > being built with Visual Studio 2008. When I began the port to 6.0,<br>
>>>>>> > I followed<br>
>>>>>> > the migration guide found here:<br>
>>>>>> > <a href="http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide" target="_blank">http://www.vtk.org/Wiki/VTK/VTK_6_Migration_Guide</a> and the code<br>
>>>>>> > builds<br>
>>>>>> > and links just fine. However, when I run it, I'm getting access<br>
>>>>>> > violation<br>
>>>>>> > exceptions (attempts to read/write protected memory) when I try<br>
>>>>>> > instantiating with New(). Researching further, I see that this<br>
>>>>>> > problem is<br>
>>>>>> > mentioned here:<br>
>>>>>> > <a href="http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_de" target="_blank">http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_de</a><br>
>>>>>> > fines HOWEVER I'm not getting NULL objects with the New() call, I'm<br>
>>>>>> > getting<br>
>>>>>> > exceptions. Furthermore, it doesn't happen with every VTK object;<br>
>>>>>> > some<br>
>>>>>> > instantiate and can be used just fine. Nonetheless, I tried the<br>
>>>>>> > suggestions at<br>
>>>>>> > the second link, regarding definition of VTK AUTOINIT, and they<br>
>>>>>> > proved<br>
>>>>>> > fruitless. So I'm currently at a loss...<br>
>>>>>> > ><br>
>>>>>> > > For what it's worth, I'm building VTK with CMAKE and the only<br>
>>>>>> > > options I'm<br>
>>>>>> > changing from the default configuration are the following:<br>
>>>>>> > > - build shared libs<br>
>>>>>> > > - don't build TESTING<br>
>>>>>> > > - set custom install directory<br>
>>>>>> > ><br>
>>>>>> > > Thanks for your time; any help would be greatly appreciated...<br>
>>>>>> > > Joseph Melnyk<br>
>>>>>> > ><br>
>>>>>> > > __Scanned by MessageLabs<br>
>>>>>> > > _______________________________________________<br>
>>>>>> > > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>>>> > ><br>
>>>>>> > > Visit other Kitware open-source projects at<br>
>>>>>> > > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>>>> > ><br>
>>>>>> > > Please keep messages on-topic and check the VTK FAQ at:<br>
>>>>>> > > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>>>>> > ><br>
>>>>>> > > Follow this link to subscribe/unsubscribe:<br>
>>>>>> > > <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>>>>>> ><br>
>>>>>> > _Scanned by MessageLabs<br>
>>>>>><br>
>>>>>> __Scanned by MessageLabs<br>
>>>>>> _______________________________________________<br>
>>>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>>>><br>
>>>>>> Visit other Kitware open-source projects at<br>
>>>>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>>>><br>
>>>>>> Please keep messages on-topic and check the VTK FAQ at:<br>
>>>>>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>>>>><br>
>>>>>> Follow this link to subscribe/unsubscribe:<br>
>>>>>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>>>>>><br>
>>>>>><br>
>>>>>><br>
>>>>>> --<br>
>>>>>> Unpaid intern in BillsBasement at noware dot com<br>
>>>>>><br>
>>>>>> _Scanned by MessageLabs<br>
>>>>>><br>
>>>>>> __Scanned by MessageLabs<br>
>>>>>> _______________________________________________<br>
>>>>>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>>>>>><br>
>>>>>> Visit other Kitware open-source projects at<br>
>>>>>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>>>>>><br>
>>>>>> Please keep messages on-topic and check the VTK FAQ at:<br>
>>>>>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>>>>>><br>
>>>>>> Follow this link to subscribe/unsubscribe:<br>
>>>>>> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
>>>>><br>
>>>>><br>
>>>><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Unpaid intern in BillsBasement at noware dot com<br>
>>><br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Unpaid intern in BillsBasement at noware dot com<br>
><br>
><br>
><br>
><br>
> --<br>
> Unpaid intern in BillsBasement at noware dot com<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>