[vtkusers] Problem executing VTK in release mode with Visual Studio 2013
Andras Lasso
lasso at queensu.ca
Tue Jul 5 09:55:51 EDT 2016
In debug mode all variables are initialized to NULL but in release mode uninitialized variables have random contents. This is the most common cause why a software that runs fine in debug mode crashes in release mode.
Make sure you initialize all variables, especially simple pointers to objects and char arrays.
Andras
From: Olivier Ameline<mailto:olivameline at gmail.com>
Sent: Tuesday, July 5, 2016 11:12 AM
To: vtkusers at vtk.org<mailto:vtkusers at vtk.org>
Subject: [vtkusers] Problem executing VTK in release mode with Visual Studio 2013
Hello everyone,
I'm trying to execute the VTK-Qt example "SimpleView" (available here
<https://gitlab.kitware.com/vtk/vtk/tree/8f27431046ddbfe6665790b334f1a78d56c961fe/Examples/GUI/Qt/SimpleView>
) in Windows 10 with Visual Studio 2013, but it does not work in release
mode.
I have compiled VTK 6.2.0 with Qt 5.4.2 using Visual Studio 2013 (in a
folder C:/VTK-build-MSVC2013-x64).
Then, I have added the following line in the CMakeLists (just after
project(SimpleView)) :
set(VTK_DIR "C:/VTK-build-MSVC2013-x64")
I have compiled in debug and release mode successfully, and the executables
are created.
I have also added the VTK debug/release .dll in the folders where the
executables are.
The execution works well in debug mode, but not in release mode : the
program starts and exit immediately.
I receive no error message.
More generally, I never could execute any program VTK compiled with Visual
Studio in release mode.
What am I doing wrong ?
Thanks for help.
Olivier
--
View this message in context: http://vtk.1045678.n5.nabble.com/Problem-executing-VTK-in-release-mode-with-Visual-Studio-2013-tp5739093.html
Sent from the VTK - Users mailing list archive at Nabble.com.
_______________________________________________
Powered by www.kitware.com<http://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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160705/3c4b6a35/attachment.html>
More information about the vtkusers
mailing list