[vtkusers] runtime error message in Windows

Steve Chall stevec at renci.org
Wed Jul 22 14:42:34 EDT 2009


I've been using VTK in Linux with some success for a couple of years.  I
have a new project that requires building VTK-based applications in Windows.
I downloaded and installed Cmake 2.6 patch 4 and used it to build a debug
version of VTK 5.4.2 from source on my Win XP laptop; my compiler is
Microsoft Visual C++ 2008.  When I build and run the tutorial step 1 app,
cone.exe, Visual Studio returns me this message:

"Run-Time Check Failure #0 - The value of ESP was not properly saved across
a function call.  This is usually a result of calling a function declared
with one calling convention with a function pointer declared with a
different calling convention."

The breakpoint is at

cone->SetRadius( 1.0 );

in cone.cxx.

The corresponding assembly language instruction is

00401066  mov         esi,esp

The variable "cone" itself appears to have been successfully created: it has
a reasonable looking address and normal default values for its member
variables. ESI has the value 00D9FF48 and ESP is 00D9FF40.

It appears I've made some basic configuration error, but it's not clear to
me what I've done wrong (it's been years since I've done any development
with VC++ and that was an earlier version).  Thanks for any insights or
suggestions you may be able to provide.

-Steve Chall





More information about the vtkusers mailing list