<html><body><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content">Hi,</span></div><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content">I was able to fix the problem by a simple modification to raycasterfs.glsl.</span></div><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content">At line 45 I added </span></div><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content">vec3 g_aspect;</span></div><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content">I touched the CMakeLists.txt file in Y:\ThirdParty\vtk700\Rendering\VolumeOpenGL2 so that vtkEncodeString</span></div><div><span class="body-text-content">would rebuild the shader, rebuilt VTK and that allows my test program to render correctly without crash</span></div><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content">I will also fix locally the check for null pointer problem.</span></div><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content">I'm surprised it hasn't surfaced before.</span></div><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content">I will try this with our full application and hopefully that is the correct fix.</span></div><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content">Rick Frank</span></div><div><span class="body-text-content"><br data-mce-bogus="1"></span></div><div><span class="body-text-content"><br>------------------------------<br>.<br>Message: 15<br>Date: Wed, 4 May 2016 06:51:46 -0400<br>From: Aashish Chaudhary <aashish.chaudhary@kitware.com><br>To: Richard Frank <rickfrank@me.com><br>Cc: Alvaro Sanchez <alvaro.sanchez@kitware.com>, VTK Users<br>    <vtkusers@vtk.org><br>Subject: Re: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx,<br>      continued<br>Message-ID:<br>    <CAEw35Z_dzQ_EkHsioOrd8XDWYeOQovfjqz26AzJzuW_NP4VJiQ@mail.gmail.com><br>Content-Type: text/plain; charset="utf-8"<br><br>Hi Rick,<br><br>Not yet, we were looking into another bug. One of our team member will look<br>into it and will get back to the mailing list. Thanks for your test script.<br><br>Thanks,<br><br><br>On Tue, May 3, 2016 at 6:10 PM, Richard Frank <rickfrank@me.com> wrote:<br><br><blockquote type="cite" class="quoted-plain-text">Hi,</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Were you able to reproduce the issue with LightKit (or the source I posted</blockquote><blockquote type="cite" class="quoted-plain-text">to Dropbox)?</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">I?m hoping to migrate to 7.0 as soon as we can.</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Thanks</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Rick Frank</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Re: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx,</blockquote><blockquote type="cite" class="quoted-plain-text">continued</blockquote><blockquote type="cite" class="quoted-plain-text">Message-ID:</blockquote><blockquote type="cite" class="quoted-plain-text"><CAEw35Z-MrTkAXabTc+BQSorXc+urJPFg5A+U04TLMJnyf50HUg@mail.gmail.com></blockquote><blockquote type="cite" class="quoted-plain-text">Content-Type: text/plain; charset="utf-8"</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Thanks Rick for giving us the case for reproducing the error. I will have</blockquote><blockquote type="cite" class="quoted-plain-text">someone look into it.</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Thanks,</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Hi,</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">I was able to isolate?the problem.</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">We are using vtkLightKit in our application.</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Here is a small app that will demonstrate the problem</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text"><a href="https://www.dropbox.com/s/crwlm6njmqvdrz4/Source.7z?dl=0" data-mce-href="https://www.dropbox.com/s/crwlm6njmqvdrz4/Source.7z?dl=0">https://www.dropbox.com/s/crwlm6njmqvdrz4/Source.7z?dl=0</a></blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">But basically all you have to do is:</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">vtkSmartPointer<vtkLightKit> lightKit =</blockquote><blockquote type="cite" class="quoted-plain-text">vtkSmartPointer<vtkLightKit>::New();</blockquote><blockquote type="cite" class="quoted-plain-text">lightKit->AddLightsToRenderer(ren1);</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">and render a volume</blockquote><blockquote type="cite" class="quoted-plain-text">and the shader fails to compile.</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Can you verify?</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Also, while in there the code</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">this->Impl->ShaderProgram = this->Impl->ShaderCache->ReadyShaderProgram(</blockquote><blockquote type="cite" class="quoted-plain-text">vertexShader.c_str(), fragmentShader.c_str(), "");</blockquote><blockquote type="cite" class="quoted-plain-text">if (!this->Impl->ShaderProgram->GetCompiled())</blockquote><blockquote type="cite" class="quoted-plain-text">{</blockquote><blockquote type="cite" class="quoted-plain-text">vtkErrorMacro("Shader failed to compile");</blockquote><blockquote type="cite" class="quoted-plain-text">}</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">should be changed to?</blockquote><blockquote type="cite" class="quoted-plain-text">if (this->Impl->ShaderProgram == nullptr ||</blockquote><blockquote type="cite" class="quoted-plain-text">!this->Impl->ShaderProgram->GetCompiled())</blockquote><blockquote type="cite" class="quoted-plain-text">{</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">}</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">as?ReadyShaderProgram returns nullptr at least in this case (which causes</blockquote><blockquote type="cite" class="quoted-plain-text">the crash)</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Let me ?know if you can repro and, if you fix it I will fetch from git and</blockquote><blockquote type="cite" class="quoted-plain-text">try again.</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Thanks!</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text">Rick Frank</blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><blockquote type="cite" class="quoted-plain-text"><br></blockquote><br><br>-- <br><br>************************<br></span></div><div><blockquote type="cite"><div class="msg-quote"></div></blockquote></div></body></html>