[vtkusers] App crashes unless compiled with debug config (Windows)
Oliver Cairncross
op.cairncross at gmail.com
Thu Sep 1 23:32:24 EDT 2016
Hi,
vtk 7, msvc 14, windows 10
I've had this problem before and thought it was something bad in my tool
chain. But I've rebuild everything from scratch and it's still a problem.
If I do something simple like
string s1 = sourceFiles->GetFileNames()->GetValue(i);
it runs fine in debug mode. When I compile in RelwithDebInfo it crashes
with a bad allocation.
When I have a look at the object the there is garbage where the string is
supposed to be. As if it hasn't been initialised. I am calling an
sourceFiles->Update() beforehand.
Interestingly if I do
cout << sourceFiles->GetFileNames()->GetValue(i);
string s1 = sourceFiles->GetFileNames()->GetValue(i);
it will print to console and then crash on the next line.
Is anyone else having this problem?
Cheers
ollie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160902/6be49f7b/attachment.html>
More information about the vtkusers
mailing list