vtkTextureObject bind error

classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

vtkTextureObject bind error

Rick Dailey
This is an ongoing issue I have had since starting my project with VTK 6.3 until today when I am using 7.1.1.  I have seen it mentioned many times by other users and no one has been able to help.  I even had VTK paid support for over a year and even working directly with a Kitware engineer failed to the problem.

There are many times when I will display a 3D object and numerous errors related to vtkTextureObject will be generated.  The result is that I get notified of these errors and my object does not display.

The first problem occurs here, on the second line, assert(this->Handle).  Note that nowhere in my code do I explicitly use a vtkTextureObject.  It is my understanding that VTK must use this object for displaying text, even when the text is a solid color, so if I don't specify a texture then a default is created.

void vtkTextureObject::Bind()
{
  assert(this->Context);
  assert(this->Handle);
  ...
}

The next error occurs here:

void vtkTextureObject::SendParameters()
{
  assert("pre: is_bound" && this->IsBound());
  ...
}

Unfortunately, I am unable to provide sample code that reliably demonstrates this issue.  The software it is used in is a commercial release which is quite large and not open-source.  Out of the hundreds of users of this software, approximately one half report the bug.  Many attempts at creating a demo had varying results.  I was able to create one demo that failed on half the computers I tried it on but no one at Kitware could duplicate them.  There are many things I tried at the suggestion of Kitware and I will try to organize a list at some time in the future.






Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Ken Martin
My quick thoughts on this are 

(1) There have been some fixes in object destruction that may fix this issue in newer versions of VTK.

(2) I believe vtkSystemTools includes support for printing stack traces. If this happens on a debug build adding some code there to print a stack trace prior to the assert (but when the assert will fail) could help narrow down who is trying to bind a freed (or never created) texture.  If not in System tools I know windows has fairly lightweight stack printing code that could be pasted in.

Even with a stack trace these can sometimes be tricky to track down as sometimes the issue revolves around not who is using the texture after deletion, but who deleted it. But even then the issue can be tracked down given time and some extra logging.  If it only happens on release (and not reldebinfo) builds then it gets tougher.



On Thu, Jul 20, 2017 at 12:45 PM, Rick Dailey <[hidden email]> wrote:
This is an ongoing issue I have had since starting my project with VTK 6.3
until today when I am using 7.1.1.  I have seen it mentioned many times by
other users and no one has been able to help.  I even had VTK paid support
for over a year and even working directly with a Kitware engineer failed to
the problem.

There are many times when I will display a 3D object and numerous errors
related to vtkTextureObject will be generated.  The result is that I get
notified of these errors and my object does not display.

The first problem occurs here, on the second line, assert(this->Handle).
Note that nowhere in my code do I explicitly use a vtkTextureObject.  It is
my understanding that VTK must use this object for displaying text, even
when the text is a solid color, so if I don't specify a texture then a
default is created.

void vtkTextureObject::Bind()
{
  assert(this->Context);
  assert(this->Handle);
  ...
}

The next error occurs here:

void vtkTextureObject::SendParameters()
{
  assert("pre: is_bound" && this->IsBound());
  ...
}

Unfortunately, I am unable to provide sample code that reliably demonstrates
this issue.  The software it is used in is a commercial release which is
quite large and not open-source.  Out of the hundreds of users of this
software, approximately one half report the bug.  Many attempts at creating
a demo had varying results.  I was able to create one demo that failed on
half the computers I tried it on but no one at Kitware could duplicate them.
There are many things I tried at the suggestion of Kitware and I will try to
organize a list at some time in the future.










--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
I have made a substantial advance in my debugging capabilities but still not able to solve this.  What I did was to move my entire tomography project into the VTK solution as an “example” project.  This allows me to step-into and debug the VTK dlls, automatically view stack traces, local variables, class member variables, etc. anywhere that I need and it works great.  The problem now is that even with this capability I am still unable to locate and fix the bug.  Much of it has to do with the complexity of the VTK code.

As a reminder:

On some volumes I display I get an assert in the VTK code that says a certain vtkTextureObject is not valid.  This happens on maybe one in fifty specific volumes but still accounts for a lot of customer complaints when the program crashes or fails to display the volume.

Can anyone provide hints as to how I should attempt to debug this now that I have complete debugging access to the VTK code?
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Ken Martin
Have you checked if the issue persists with VTK master? That would be my next suggestion.

On Thu, Jul 27, 2017 at 7:19 AM, Rick Dailey <[hidden email]> wrote:
I have made a substantial advance in my debugging capabilities but still not
able to solve this.  What I did was to move my entire tomography project
into the VTK solution as an “example” project.  This allows me to step-into
and debug the VTK dlls, automatically view stack traces, local variables,
class member variables, etc. anywhere that I need and it works great.  The
problem now is that even with this capability I am still unable to locate
and fix the bug.  Much of it has to do with the complexity of the VTK code.

As a reminder:

On some volumes I display I get an assert in the VTK code that says a
certain vtkTextureObject is not valid.  This happens on maybe one in fifty
specific volumes but still accounts for a lot of customer complaints when
the program crashes or fails to display the volume.

Can anyone provide hints as to how I should attempt to debug this now that I
have complete debugging access to the VTK code?




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744174.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
I have converted my project to use VTK master (8.1) and the problem persists.

Note again that for current purposes my project is essentially a part of the VTK build.   I am able to debug, set breakpoints, view call stacks, step into VTK code, monitor VTK local and class variables, etc.

Unfortunately, I find the VTK code far too complex to track down texture object binding errors without guidance - especially when it is the VTK code, not mine, that creates these objects.
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Ken Martin
Can you email me off list the stack trace when the assert happens?

On Fri, Jul 28, 2017 at 11:01 AM, Rick Dailey <[hidden email]> wrote:
I have converted my project to use VTK master (8.1) and the problem persists.

Note again that for current purposes my project is essentially a part of the
VTK build.   I am able to debug, set breakpoints, view call stacks, step
into VTK code, monitor VTK local and class variables, etc.

Unfortunately, I find the VTK code far too complex to track down texture
object binding errors without guidance - especially when it is the VTK code,
not mine, that creates these objects.




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744196.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
Note 1: PDI-TOMO.exe vtkControlBase::Render() is my code that starts the render process from a Windows WM_PAINT message.  I should not have have named this class with the vtk prefix (may be confusing) and will probably change it eventually.

Note 2: This stack trace only includes the render portion of the code - not adding the objects to the renderer.  I could probably supply that too if necessary.

Note 3: Remember that this error occurs only on a fraction of the volumes that are rendered.  Most work fine.

> ucrtbased.dll!common_assert_to_message_box<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 351 C++
  ucrtbased.dll!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 386 C++
  ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 404 C++
  vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Bind() Line 546 C++
  vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Activate() Line 491 C++
  vtkRenderingVolumeOpenGL2-8.1.dll!vtkVolumeTexture::LoadTexture(const int interpolation, vtkVolumeTexture::VolumeBlock * volBlock) Line 268 C++
  vtkRenderingVolumeOpenGL2-8.1.dll!vtkVolumeTexture::LoadVolume(vtkRenderer * ren, vtkImageData * data, vtkDataArray * scalars, const int interpolation) Line 114 C++
  vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMapper::vtkInternal::LoadData(vtkRenderer * ren, vtkVolume * vol, vtkVolumeProperty * volProp, vtkImageData * input, vtkDataArray * scalars) Line 900 C++
  vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMapper::GPURender(vtkRenderer * ren, vtkVolume * vol) Line 3427 C++
  vtkRenderingVolume-8.1.dll!vtkGPUVolumeRayCastMapper::Render(vtkRenderer * ren, vtkVolume * vol) Line 154 C++
  vtkRenderingCore-8.1.dll!vtkVolume::RenderVolumetricGeometry(vtkViewport * vp) Line 370 C++
  vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::UpdateGeometry() Line 273 C++
  vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::DeviceRender() Line 170 C++
  vtkRenderingCore-8.1.dll!vtkRenderer::Render() Line 351 C++
  vtkRenderingCore-8.1.dll!vtkRendererCollection::Render() Line 51 C++
  vtkRenderingCore-8.1.dll!vtkRenderWindow::DoStereoRender() Line 781 C++
  vtkRenderingCore-8.1.dll!vtkRenderWindow::DoFDRender() Line 747 C++
  vtkRenderingCore-8.1.dll!vtkRenderWindow::DoAARender() Line 626 C++
  vtkRenderingCore-8.1.dll!vtkRenderWindow::Render() Line 439 C++
  PDI-TOMO.exe!vtkControlBase::Render(HDC dc, const wchar_t * location) Line 694 C++
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
The assert you asked me to add never gets hit.

Here is an updated error log:

ERROR: In E:\VTK\VTK-master\Rendering\VolumeOpenGL2\vtkVolumeTexture.cxx, line 720
vtkVolumeTexture (10FA4E18): Invalid texture dimensions [53, 54, 3191]

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E0A8): failed at glBindTexture 1 OpenGL errors detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 678
vtkTextureObject (1421E0A8): failed after SendParameters 1 OpenGL errors detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E0A8): failed at glBindTexture 1 OpenGL errors detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 678
vtkTextureObject (1421E0A8): failed after SendParameters 1 OpenGL errors detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E180): failed at glBindTexture 1 OpenGL errors detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 678
vtkTextureObject (1421E180): failed after SendParameters 1 OpenGL errors detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E0A8): failed at glBindTexture 1 OpenGL errors detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E180): failed at glBindTexture 1 OpenGL errors detected
  0 : (1280) Invalid enum



Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Ken Martin
Ahh, it seems your graphics card cannot handle the size volume you are trying to render. I would guess the issue is the 3191 dimension. A few options come to mind depending on your situation.

1) require a larger graphics card

2) shrink any volumes that to fit in 2048 (that would be my guess for the largest size on your card) 

3) The volume rendering folks may some other tricks to handle this by streaming or etc


On Fri, Jul 28, 2017 at 12:43 PM, Rick Dailey <[hidden email]> wrote:
The assert you asked me to add never gets hit.

Here is an updated error log:

ERROR: In E:\VTK\VTK-master\Rendering\VolumeOpenGL2\vtkVolumeTexture.cxx,
line 720
vtkVolumeTexture (10FA4E18): Invalid texture dimensions [53, 54, 3191]

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E0A8): failed at glBindTexture 1 OpenGL errors
detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 678
vtkTextureObject (1421E0A8): failed after SendParameters 1 OpenGL errors
detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E0A8): failed at glBindTexture 1 OpenGL errors
detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 678
vtkTextureObject (1421E0A8): failed after SendParameters 1 OpenGL errors
detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E180): failed at glBindTexture 1 OpenGL errors
detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 678
vtkTextureObject (1421E180): failed after SendParameters 1 OpenGL errors
detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E0A8): failed at glBindTexture 1 OpenGL errors
detected
  0 : (1280) Invalid enum

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E180): failed at glBindTexture 1 OpenGL errors
detected
  0 : (1280) Invalid enum







--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744200.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and legally privileged information, and it is intended only for the use of the addressee.  Access to this email by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution or any action taken in reliance on it is prohibited and may be unlawful. If you received this communication in error please notify us immediately and destroy the original message.  Thank you.

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
Thanks for all your help.  This is certainly the cause of the crash.

1) require a larger graphics card - Not practical at this point.  We have numerous customer support issues and we can't tell the to get a new computer.

2) shrink any volumes that to fit in 2048 (that would be my guess for the largest size on your card) - Don't know how I would go about doing something like this.  It's a large and complex program and it seems to me that a change like this would touch the code widely.  In other words, a major re-write.

3) The volume rendering folks may some other tricks to handle this by streaming or etc. - TRICKS ARE WELCOME!

Thanks again
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Alvaro Sanchez
Hi Rick,


3) The volume rendering folks may some other tricks to handle this by
streaming or etc. - TRICKS ARE WELCOME!

You can enable streaming by setting a number of partitions (vtkOpenGLGPUVolumeRayCastMapper::SetPartitions).

Check-out  the following test, let me know if you have any questions.
 




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744202.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
Great idea Alvaro.  I won't be able to test this until Monday morning but will post with results when available.

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
In reply to this post by Alvaro Sanchez
The suggested solution (setting partitions) does not work for me. Although the error message indicating invalid texture dimensions is gone there is still a failure to bind the texture.

This error message (in vtkVolumeTexture::SafeLoadTexture()) is no longer seen:

ERROR: In E:\VTK\VTK-master\Rendering\VolumeOpenGL2\vtkVolumeTexture.cxx, line 720
vtkVolumeTexture (10FA4E18): Invalid texture dimensions [53, 54, 3191]

This assert (in  vtkTextureObject::Bind()) still fires:

assert(this->Handle);

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E0A8): failed at glBindTexture 1 OpenGL errors detected
  0 : (1280) Invalid enum
 
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Alvaro Sanchez
Could you run the texture-streaming test?

$ ctest -R CastTextureStreaming

It might help to know if that also fails.


On Mon, Jul 31, 2017 at 6:54 AM, Rick Dailey <[hidden email]> wrote:
The suggested solution (setting partitions) does not work for me. Although
the error message indicating invalid texture dimensions is gone there is
still a failure to bind the texture.

This error message (in vtkVolumeTexture::SafeLoadTexture()) is no longer
seen:

ERROR: In E:\VTK\VTK-master\Rendering\VolumeOpenGL2\vtkVolumeTexture.cxx,
line 720
vtkVolumeTexture (10FA4E18): Invalid texture dimensions [53, 54, 3191]

This assert (in  vtkTextureObject::Bind()) still fires:

assert(this->Handle);

ERROR: In E:\VTK\VTK-master\Rendering\OpenGL2\vtkTextureObject.cxx, line 549
vtkTextureObject (1421E0A8): failed at glBindTexture 1 OpenGL errors
detected
  0 : (1280) Invalid enum




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744215.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
I tried running ctest but no matter what I do it always says "No tests were found!!!"  I tried running it from several folders (bin, testing, etc.) but still the same message.  It seems that I have built VTK with testing enabled (BUILD_TESTING check set) so a I am out of ideas.  What is the correct way of running ctest?

The latest stack trace:

> ucrtbased.dll!common_assert_to_message_box<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 351 C++
  ucrtbased.dll!common_assert<wchar_t>(const wchar_t * const expression, const wchar_t * const file_name, const unsigned int line_number, void * const return_address) Line 386 C++
  ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t * file_name, unsigned int line_number) Line 404 C++
  vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Bind() Line 546 C++
  vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Activate() Line 491 C++
  vtkRenderingVolumeOpenGL2-8.1.dll!vtkVolumeMask::Activate() Line 64 C++
  vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMapper::DoGPURender(vtkRenderer * ren, vtkVolume * vol, vtkOpenGLCamera * cam, vtkShaderProgram * prog, int noOfComponents, int independentComponents) Line 3739 C++
  vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMapper::GPURender(vtkRenderer * ren, vtkVolume * vol) Line 3610 C++
  vtkRenderingVolume-8.1.dll!vtkGPUVolumeRayCastMapper::Render(vtkRenderer * ren, vtkVolume * vol) Line 154 C++
  vtkRenderingCore-8.1.dll!vtkVolume::RenderVolumetricGeometry(vtkViewport * vp) Line 370 C++
  vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::UpdateGeometry() Line 273 C++
  vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::DeviceRender() Line 170 C++
  vtkRenderingCore-8.1.dll!vtkRenderer::Render() Line 351 C++
  vtkRenderingCore-8.1.dll!vtkRendererCollection::Render() Line 51 C++
  vtkRenderingCore-8.1.dll!vtkRenderWindow::DoStereoRender() Line 781 C++
  vtkRenderingCore-8.1.dll!vtkRenderWindow::DoFDRender() Line 747 C++
  vtkRenderingCore-8.1.dll!vtkRenderWindow::DoAARender() Line 626 C++
  vtkRenderingCore-8.1.dll!vtkRenderWindow::Render() Line 439 C++
  PDI-TOMO.exe!vtkControlBase::Render(HDC * dc, const wchar_t * location) Line 694 C++
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Alvaro Sanchez
If you built vtk with BUILD_TESTING checked then you should be able to
run it from the build directory as

C:\YOUR_VS_SOLUTION_DIR>ctest -R TextureStreaming -C Debug

Change the last parameter to your particular configuration.

Are you setting a volume mask or are you only rendering input data?

On Mon, Jul 31, 2017 at 9:35 AM, Rick Dailey <[hidden email]> wrote:
I tried running ctest but no matter what I do it always says "No tests were
found!!!"  I tried running it from several folders (bin, testing, etc.) but
still the same message.  It seems that I have built VTK with testing enabled
(BUILD_TESTING check set) so a I am out of ideas.  What is the correct way
of running ctest?

The latest stack trace:

>       ucrtbased.dll!common_assert_to_message_box<wchar_t>(const wchar_t * const
expression, const wchar_t * const file_name, const unsigned int line_number,
void * const return_address) Line 351   C++
        ucrtbased.dll!common_assert<wchar_t>(const wchar_t * const expression,
const wchar_t * const file_name, const unsigned int line_number, void *
const return_address) Line 386  C++
        ucrtbased.dll!_wassert(const wchar_t * expression, const wchar_t *
file_name, unsigned int line_number) Line 404   C++
        vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Bind() Line 546   C++
        vtkRenderingOpenGL2-8.1.dll!vtkTextureObject::Activate() Line 491       C++
        vtkRenderingVolumeOpenGL2-8.1.dll!vtkVolumeMask::Activate() Line 64     C++

vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMapper::DoGPURender(vtkRenderer
* ren, vtkVolume * vol, vtkOpenGLCamera * cam, vtkShaderProgram * prog, int
noOfComponents, int independentComponents) Line 3739    C++

vtkRenderingVolumeOpenGL2-8.1.dll!vtkOpenGLGPUVolumeRayCastMapper::GPURender(vtkRenderer
* ren, vtkVolume * vol) Line 3610       C++
        vtkRenderingVolume-8.1.dll!vtkGPUVolumeRayCastMapper::Render(vtkRenderer *
ren, vtkVolume * vol) Line 154  C++
        vtkRenderingCore-8.1.dll!vtkVolume::RenderVolumetricGeometry(vtkViewport *
vp) Line 370    C++
        vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::UpdateGeometry() Line 273
C++
        vtkRenderingOpenGL2-8.1.dll!vtkOpenGLRenderer::DeviceRender() Line 170  C++
        vtkRenderingCore-8.1.dll!vtkRenderer::Render() Line 351 C++
        vtkRenderingCore-8.1.dll!vtkRendererCollection::Render() Line 51        C++
        vtkRenderingCore-8.1.dll!vtkRenderWindow::DoStereoRender() Line 781     C++
        vtkRenderingCore-8.1.dll!vtkRenderWindow::DoFDRender() Line 747 C++
        vtkRenderingCore-8.1.dll!vtkRenderWindow::DoAARender() Line 626 C++
        vtkRenderingCore-8.1.dll!vtkRenderWindow::Render() Line 439     C++
        PDI-TOMO.exe!vtkControlBase::Render(HDC * dc, const wchar_t * location)
Line 694        C++




--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744223.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
With the additional information you supplied I was able to successfully run ctest.  

100% tests passed, 0 tests failed out of 1

Yes, I am using a volume mask.
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Alvaro Sanchez
Using masks with streaming enabled might be the issue. Currently, only the input supports
texture streaming.  Could you try rendering without any masks?

On Mon, Jul 31, 2017 at 1:41 PM, Rick Dailey <[hidden email]> wrote:
With the additional information you supplied I was able to successfully run
ctest.

100% tests passed, 0 tests failed out of 1

Yes, I am using a volume mask.



--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744226.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Rick Dailey
Rendering without a mask works, but of course this is not a solution for us as the mask is an integral part of our product.

Is there anything that can be done about this?
Reply | Threaded
Open this post in threaded view
|

Re: vtkTextureObject bind error

Alvaro Sanchez
There is on-going work to support streaming with masks on.  It is too early to try the branch
however,  I will keep you posted.

The only solution I see for now (as Ken suggested earlier) would be to resize your input
volume (and masks).  You could use vtkImageResize for this,  have a look at the following
test as an example.

On Tue, Aug 1, 2017 at 6:51 AM, Rick Dailey <[hidden email]> wrote:
Rendering without a mask works, but of course this is not a solution for us
as the mask is an integral part of our product.

Is there anything that can be done about this?



--
View this message in context: http://vtk.1045678.n5.nabble.com/vtkTextureObject-bind-error-tp5744068p5744234.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers



--
Alvaro Sanchez
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4901

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers
12