<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">OK. I tried this and it’s now giving the expected behavior of returning a NULL object from the New() call for vtkPolyDataMapper. The vtkSphereSource allocation
and use works fine, however. This occurs both with and without the AUTOINIT lines.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Previously, I was using a chart/plotting example from the wiki found here:
</span><a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot</a><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">. There, the usage of vtkTable and vtkFloatArray
worked fine but it would then give me the previously described access violation exception when I tried to create vtkContextView.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m not doing this with CMake, by the way; this is all within VS2008, with VTK6 referenced and linked the way I’ve always used VTK5.x<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Joseph<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Bill Lorensen [mailto:bill.lorensen@gmail.com]
<br>
<b>Sent:</b> Thursday, July 25, 2013 1:19 PM<br>
<b>To:</b> Joseph Melnyk<br>
<b>Cc:</b> Frédéric Speisser; vtkusers@vtk.org<br>
<b>Subject:</b> Re: [vtkusers] VTK 6.0 with Visual Studio<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Could you try one of the wiki examples?<br>
<br>
<a href="http://vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere">http://vtk.org/Wiki/VTK/Examples/Cxx/GeometricObjects/Sphere</a><o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Follow the download instructions on the page.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, Jul 25, 2013 at 10:32 AM, Joseph Melnyk <<a href="mailto:JMelnyk@pile.com" target="_blank">JMelnyk@pile.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Bill</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I have a small example that compiles and exhibits the same behavior. I set it up as a VS2008 project,
however even after being compressed it’s still 5MB. Obviously I don’t want to flood inboxes with this. Would you like me to send it to you directly or possibly just post the code from it and leave the project setup details aside?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Joseph</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Bill Lorensen [mailto:<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>]
<br>
<b>Sent:</b> Tuesday, July 23, 2013 11:29 AM<br>
<b>To:</b> Joseph Melnyk<br>
<b>Cc:</b> Frédéric Speisser; <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a></span><o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<b>Subject:</b> Re: [vtkusers] VTK 6.0 with Visual Studio<o:p></o:p></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">1) Can you provide a small, compilable example that fails?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2) You could try some of the VTK Wiki Examples.<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples" target="_blank">http://www.vtk.org/Wiki/VTK/Examples</a><br>
3) Find one that uses a class that is failing.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> for example, in google search:<o:p></o:p></p>
<pre>site:<a href="http://vtk.org/Wiki/VTK/Examples" target="_blank">vtk.org/Wiki/VTK/Examples</a> vtkImageViewer2<o:p></o:p></pre>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Tue, Jul 23, 2013 at 11:24 AM, Bill Lorensen <<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>> wrote:<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Have you run one of the failing programs in the VS debugger?<o:p></o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Tue, Jul 23, 2013 at 11:10 AM, Joseph Melnyk <<a href="mailto:JMelnyk@pile.com" target="_blank">JMelnyk@pile.com</a>> wrote:<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Thanks for your suggestion. This is the definition I tried when I mentioned definition of VTK AUTOINIT. The links you mentioned, and the ones I did,
all discuss this within the context of the New() function returning a NULL value, however, not generating an exception. As I said, I tried them anyway with no success.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D">Joseph Melnyk</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#1F497D"> </span><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Frédéric Speisser [mailto:<a href="mailto:speisser@kappaeng.com" target="_blank">speisser@kappaeng.com</a>]
<br>
<b>Sent:</b> Tuesday, July 23, 2013 9:56 AM<br>
<b>To:</b> Joseph Melnyk<br>
<b>Cc:</b> <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] VTK 6.0 with Visual Studio</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Hello,<br>
<br>
When I ported VTK 5.9.1 to VTK 5.6, I encountered such issues maybe you are encountering the same, ensure you've done following :<o:p></o:p></p>
<p style="margin-left:1.0in">o<span style="font-size:7.0pt"> </span>extra definitions must be added in preprocessor settings :
<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:70.8pt">
To have the os/rendering system dependent classes created, following macro must be set :
<br>
<i>#define vtkRenderingCore_AUTOINIT 4(vtkInteractionStyle,vtkRenderingFreeType,vtkRenderingFreeTypeOpenGL,vtkRenderingOpenGL)</i><br>
<br>
or a reference to a file, containing the previous macro, like this must be added in preprocessor definitions :<br>
<i>vtkRenderingCore_INCLUDE="vtkRenderingCore_AUTOINIT_vtkInteractionStyle_vtkRenderingFreeType_vtkRenderingFreeTypeOpenGL_vtkRenderingOpenGL.h"</i><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
Hope that helps !<br>
<br>
P.S. Links which were useful to me :<br>
<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><br>
<a href="http://www.visitusers.org/index.php?title=VTK_6.0_Upgrade" target="_blank">http://www.visitusers.org/index.php?title=VTK_6.0_Upgrade</a>
<br>
<br>
<br>
Le 23/07/2013 15:14, Robert Maynard a écrit :<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>Are you able to provide more information on the exact violation<o:p></o:p></pre>
<pre>exceptions with a back trace? Access violations can occur when you<o:p></o:p></pre>
<pre>call methods on a NULL object, so it could be a case that a object<o:p></o:p></pre>
<pre>factory that is NULL is being asked to create classes.<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>On Mon, Jul 22, 2013 at 2:45 PM, Joseph Melnyk <a href="mailto:JMelnyk@pile.com" target="_blank"><JMelnyk@pile.com></a> wrote:<o:p></o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>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: <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 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: <a href="http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines" target="_blank">http://www.vtk.org/Wiki/VTK/VTK_6_Migration/Factories_now_require_defines</a> HOWEVER I'm not getting NULL objects with the New() call, I'm getting exceptions. Furthermore, it doesn't happen with ever<o:p></o:p></pre>
<pre> y VTK o<o:p></o:p></pre>
<pre>bject; 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...<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>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:<o:p></o:p></pre>
<pre>- build shared libs<o:p></o:p></pre>
<pre>- don't build TESTING<o:p></o:p></pre>
<pre>- set custom install directory<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>Thanks for your time; any help would be greatly appreciated...<o:p></o:p></pre>
<pre>Joseph Melnyk<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>__Scanned by MessageLabs<o:p></o:p></pre>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>Follow this link to subscribe/unsubscribe:<o:p></o:p></pre>
<pre><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></pre>
</blockquote>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><o:p></o:p></pre>
<pre> <o:p></o:p></pre>
<pre>Follow this link to subscribe/unsubscribe:<o:p></o:p></pre>
<pre><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><o:p></o:p></pre>
<pre>.<o:p></o:p></pre>
<pre> <o:p></o:p></pre>
</blockquote>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
<br>
_Scanned by MessageLabs<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br clear="all">
__Scanned by MessageLabs<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><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 <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: <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><o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
<br clear="all">
<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="color:#888888">--
<br>
Unpaid intern in BillsBasement at noware dot com</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
<br clear="all">
<br>
-- <br>
Unpaid intern in BillsBasement at noware dot com<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><br>
_Scanned by MessageLabs<o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><br clear="all">
__Scanned by MessageLabs<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <br>
Unpaid intern in BillsBasement at noware dot com<o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
_Scanned by MessageLabs<o:p></o:p></p>
</div>
</div>
<br clear="both">
__Scanned by MessageLabs<BR>
</body>
</html>