[vtkusers] vtkTextureObject bind error

Ken Martin ken.martin at kitware.com
Fri Jul 21 09:45:59 EDT 2017


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 <rick at pile.com> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170721/3b93bf8e/attachment.html>


More information about the vtkusers mailing list