[vtkusers] kernel32.dll error with VTK 5.0 and 5.0.2 in vtkInformationStringKey::Set

Obada Mahdi omahdi at gmx.de
Mon Oct 23 16:24:56 EDT 2006


Hi Andres!

On 10/23/06, Andres Barrera <andresba at hotmail.com> wrote:
>         Thank you very much for your help. Regarding to the error, I'll try
> modifying the original vtk implementation for vtkInformationStringValue, but
> I don't keep too much hope on it.... The construction looked weird to me
> too, but this class is being used by many people... Therefore somebody else
> should have fixed it before, but I didn't find anything on the users list...
> I addition, it is crashing 2 lines before it reaches 'v->Delete();'...

Just to be sure:
- Did you build VTK in "Debug" mode, or as "Release" or
"RelWithDebInfo" (something that involves optimization flags)?  WIth
compiler optimizations, references to lines in the original source
code can be inaccurate.
- Is the value of "v" non-NULL just before executing the offending line?

Regarding Han's comment:
> >vtkInformationStringValue* v = new vtkInformationStringValue;
[...]
> >Shouldn't this be:
> >
> >vtkInformationStringValue* v = vtkInformationStringValue::New();

vtkInformationStringValue is defined only locally inside
"vtkInformationStringKey.cxx" and does not adapt the construction
scheme that involves protected constructors and a static New() method,
yet it supports the reference counting mechanism inherited from
vtkObjectBase, so calling Delete() should work just fine.

> >I am not sure, i don't have documentation on me right now, so if i'm saying
> >stupid things: Sorry for that... :)

I don't think it is a stupid thing to mention at all.  I suppose that
mixing up construction conventions for custom VTK classes could indeed
cause trouble :-)

> > >  Any ideas/suggestions?

Headers and libraries: Any chance that the VTK headers used for
building the example do not match the version of the libraries used
for linking?  This can cause weird problems, for example if you
compile using the "right" headers, but the linker uses libraries from
a different VTK build.

CMake version: You seem to use a relatively old version of CMake--try
using a more recent version.

I am not familiar with "C++ Builder", but you can check the dashboard
(go to www.vtk.org and select "Quality Dashboard") if the combination
of your system/compiler is actively being tested--if it is, it should
give you an idea whether it should work or not ;)


Regards

Obada



More information about the vtkusers mailing list