<div dir="ltr"><div>The debugger stops here:</div><div><br></div><div><br></div><div>0<span class="" style="white-space:pre">   </span>libstdc++-6!_ZNSt6localeaSERKS_<span class="" style="white-space:pre">   </span></div><div>1<span class="" style="white-space:pre">  </span>libstdc++-6!_ZNSt8ios_base7_M_initEv<span class="" style="white-space:pre">      </span></div><div>2<span class="" style="white-space:pre">  </span>libstdc++-6!_ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E<span class="" style="white-space:pre">  </span></div><div>3<span class="" style="white-space:pre">  </span>vtkXMLWriter::OpenFile()</div><div>4<span class="" style="white-space:pre">  </span>vtkXMLWriter::OpenStream()</div><div>5<span class="" style="white-space:pre">        </span>vtkXMLUnstructuredDataWriter::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*)</div><div>6<span class="" style="white-space:pre">      </span>vtkExecutive::CallAlgorithm(vtkInformation*, int, vtkInformationVector**, vtkInformationVector*)</div><div>7<span class="" style="white-space:pre">  </span>vtkDemandDrivenPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*)<span class="" style="white-space:pre">      </span></div><div>8<span class="" style="white-space:pre">  </span>vtkCompositeDataPipeline::ExecuteData(vtkInformation*, vtkInformationVector**, vtkInformationVector*)<span class="" style="white-space:pre">     </span></div><div>9<span class="" style="white-space:pre">  </span>vtkDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*)</div><div>10<span class="" style="white-space:pre">  </span>vtkStreamingDemandDrivenPipeline::ProcessRequest(vtkInformation*, vtkInformationVector**, vtkInformationVector*)</div><div>11<span class="" style="white-space:pre"> </span>vtkDemandDrivenPipeline::UpdateData(int)<span class="" style="white-space:pre">  </span></div><div>12<span class="" style="white-space:pre"> </span>vtkStreamingDemandDrivenPipeline::Update(int)<span class="" style="white-space:pre">     </span></div><div>13<span class="" style="white-space:pre"> </span>vtkAlgorithm::Update()</div><div>14<span class="" style="white-space:pre">   </span>vtkXMLWriter::Write()</div><div>15<span class="" style="white-space:pre">    </span>main<span class="" style="white-space:pre">      </span>main.cpp</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-05-21 15:26 GMT+02:00 Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Luc,<br>
<br>
Sorry, I didn't see that. I don't see anything else that is obvious. I<br>
suggest compiling in debug mode and running it through a debugger to<br>
see where it is crashing.<br>
<span class="HOEnZb"><font color="#888888"><br>
Cory<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, May 21, 2015 at 8:09 AM, Luc Valade <<a href="mailto:lucj.valade@gmail.com">lucj.valade@gmail.com</a>> wrote:<br>
> Hi Cory<br>
><br>
> I already calls writer->SetFileName("test.vtp"). I also prints<br>
> "writer->GetFileName()" into console to check, and there is no problem here.<br>
><br>
> Luc<br>
><br>
><br>
> 2015-05-21 13:48 GMT+02:00 Cory Quammen <<a href="mailto:cory.quammen@kitware.com">cory.quammen@kitware.com</a>>:<br>
>><br>
>> You haven't called writer->SetFileName() to specify where the file<br>
>> should be saved. That is necessary and may fix your crash - though<br>
>> there should be a more graceful approach to handling an empty file<br>
>> name than crashing, so that may not be it.<br>
>><br>
>> HTH,<br>
>> Cory<br>
>><br>
>> On Thu, May 21, 2015 at 3:34 AM, Luc Valade <<a href="mailto:lucj.valade@gmail.com">lucj.valade@gmail.com</a>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> ><br>
>> ><br>
>> > I have a problem with the export of vtk meshes using vtkXMLWriter class.<br>
>> > Indeed, my project builds without any problem, but during the run, the<br>
>> > call<br>
>> > of the vtkXMLWriter method Write() generates a segmentation fault.<br>
>> ><br>
>> ><br>
>> ><br>
>> > I works on Windows and uses qtcreator and qmake. I uses the version 6.2<br>
>> > of<br>
>> > vtk. I've already build tutorial vtk projects using qmake to learn how<br>
>> > to<br>
>> > well linked projects to vtk dlls, and it worked well.<br>
>> ><br>
>> ><br>
>> ><br>
>> > Here is the projet I tried to run without success (.pro and main.cpp<br>
>> > file)<br>
>> ><br>
>> ><br>
>> ><br>
>> > TEMPLATE = app<br>
>> ><br>
>> ><br>
>> ><br>
>> > CONFIG += console<br>
>> ><br>
>> > CONFIG -= app_bundle<br>
>> ><br>
>> > CONFIG -= qt<br>
>> ><br>
>> ><br>
>> ><br>
>> > SOURCES += main.cpp<br>
>> ><br>
>> ><br>
>> ><br>
>> > INCLUDEPATH += "C:\Program Files (x86)\VTK\include\vtk-6.2"<br>
>> ><br>
>> > LIBS += "-LC:\Program Files (x86)\VTK\lib"<br>
>> ><br>
>> > LIBS += -lvtkCommonDataModel-6.2.dll \<br>
>> ><br>
>> >         -lvtkCommonCore-6.2.dll \<br>
>> ><br>
>> >         -lvtkIOXML-6.2.dll<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > #include <vtkVersion.h><br>
>> ><br>
>> > #include <vtkCellArray.h><br>
>> ><br>
>> > #include <vtkPoints.h><br>
>> ><br>
>> > #include <vtkXMLPolyDataWriter.h><br>
>> ><br>
>> > #include <vtkPolyData.h><br>
>> ><br>
>> > #include <vtkSmartPointer.h><br>
>> ><br>
>> ><br>
>> ><br>
>> > int main ( int, char *[] )<br>
>> ><br>
>> > {<br>
>> ><br>
>> >   // Create 10 points.<br>
>> ><br>
>> >   vtkSmartPointer<vtkPoints> points =<br>
>> ><br>
>> >     vtkSmartPointer<vtkPoints>::New();<br>
>> ><br>
>> ><br>
>> ><br>
>> >   for ( unsigned int i = 0; i < 10; ++i )<br>
>> ><br>
>> >     {<br>
>> ><br>
>> >     points->InsertNextPoint ( i, i, i );<br>
>> ><br>
>> >     }<br>
>> ><br>
>> ><br>
>> ><br>
>> >   // Create a polydata object and add the points to it.<br>
>> ><br>
>> >   vtkSmartPointer<vtkPolyData> polydata =<br>
>> ><br>
>> >     vtkSmartPointer<vtkPolyData>::New();<br>
>> ><br>
>> >   polydata->SetPoints(points);<br>
>> ><br>
>> ><br>
>> ><br>
>> >   // Write the file<br>
>> ><br>
>> >   vtkSmartPointer<vtkXMLPolyDataWriter> writer =<br>
>> ><br>
>> >     vtkSmartPointer<vtkXMLPolyDataWriter>::New();<br>
>> ><br>
>> >   writer->SetFileName("test.vtp");<br>
>> ><br>
>> > #if VTK_MAJOR_VERSION <= 5<br>
>> ><br>
>> >   writer->SetInput(polydata);<br>
>> ><br>
>> > #else<br>
>> ><br>
>> >   writer->SetInputData(polydata);<br>
>> ><br>
>> > #endif<br>
>> ><br>
>> ><br>
>> ><br>
>> >   // Optional - set the mode. The default is binary.<br>
>> ><br>
>> >   //writer->SetDataModeToBinary();<br>
>> ><br>
>> >   //writer->SetDataModeToAscii();<br>
>> ><br>
>> ><br>
>> ><br>
>> >   writer->Write();<br>
>> ><br>
>> ><br>
>> ><br>
>> >   return EXIT_SUCCESS;<br>
>> ><br>
>> > }<br>
>> ><br>
>> ><br>
>> > Thanks in advance for any help.<br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>> ><br>
>> > Visit other Kitware open-source projects at<br>
>> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>> ><br>
>> > Please keep messages on-topic and check the VTK FAQ at:<br>
>> > <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>> ><br>
>> > Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
>> ><br>
>> > Follow this link to subscribe/unsubscribe:<br>
>> > <a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> Cory Quammen<br>
>> R&D Engineer<br>
>> Kitware, Inc.<br>
><br>
><br>
<br>
<br>
<br>
--<br>
Cory Quammen<br>
R&D Engineer<br>
Kitware, Inc.<br>
</div></div></blockquote></div><br></div></div>