[vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx, continued

Richard Frank rickfrank at me.com
Fri May 20 16:46:15 EDT 2016


Hi,

I was able to fix the problem by a simple modification to raycasterfs.glsl.

At line 45 I added 

vec3 g_aspect;

I touched the CMakeLists.txt file in Y:\ThirdParty\vtk700\Rendering\VolumeOpenGL2 so that vtkEncodeString
would rebuild the shader, rebuilt VTK and that allows my test program to render correctly without crash

I will also fix locally the check for null pointer problem.

I'm surprised it hasn't surfaced before.

I will try this with our full application and hopefully that is the correct fix.

Rick Frank


------------------------------
.
Message: 15
Date: Wed, 4 May 2016 06:51:46 -0400
From: Aashish Chaudhary <aashish.chaudhary at kitware.com>
To: Richard Frank <rickfrank at me.com>
Cc: Alvaro Sanchez <alvaro.sanchez at kitware.com>, VTK Users
   <vtkusers at vtk.org>
Subject: Re: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx,
     continued
Message-ID:
   <CAEw35Z_dzQ_EkHsioOrd8XDWYeOQovfjqz26AzJzuW_NP4VJiQ at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Rick,

Not yet, we were looking into another bug. One of our team member will look
into it and will get back to the mailing list. Thanks for your test script.

Thanks,


On Tue, May 3, 2016 at 6:10 PM, Richard Frank <rickfrank at me.com> wrote:

Hi,

Were you able to reproduce the issue with LightKit (or the source I posted
to Dropbox)?


I?m hoping to migrate to 7.0 as soon as we can.

Thanks

Rick Frank

Re: [vtkusers] Error in vtkOpenGLGPUVolumeRayCastMapper.cxx,
continued
Message-ID:
<CAEw35Z-MrTkAXabTc+BQSorXc+urJPFg5A+U04TLMJnyf50HUg at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Thanks Rick for giving us the case for reproducing the error. I will have
someone look into it.

Thanks,



Hi,

I was able to isolate?the problem.

We are using vtkLightKit in our application.

Here is a small app that will demonstrate the problem

https://www.dropbox.com/s/crwlm6njmqvdrz4/Source.7z?dl=0


But basically all you have to do is:

vtkSmartPointer<vtkLightKit> lightKit =
vtkSmartPointer<vtkLightKit>::New();
lightKit->AddLightsToRenderer(ren1);

and render a volume
and the shader fails to compile.

Can you verify?

Also, while in there the code

this->Impl->ShaderProgram = this->Impl->ShaderCache->ReadyShaderProgram(
vertexShader.c_str(), fragmentShader.c_str(), "");
if (!this->Impl->ShaderProgram->GetCompiled())
{
vtkErrorMacro("Shader failed to compile");
}

should be changed to?
if (this->Impl->ShaderProgram == nullptr ||
!this->Impl->ShaderProgram->GetCompiled())
{

}

as?ReadyShaderProgram returns nullptr at least in this case (which causes
the crash)

Let me ?know if you can repro and, if you fix it I will fetch from git and
try again.

Thanks!

Rick Frank




-- 

************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160520/dd4b853f/attachment.html>


More information about the vtkusers mailing list