Thank you very much.<br><br>Now I see the problem. I should have read the documentations more carefully.<br><br><br>Limin<br><br><br><div class="gmail_quote">2009/6/9 Francois Bertel <span dir="ltr"><<a href="mailto:francois.bertel@kitware.com">francois.bertel@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Cone.cxx has just a vtkRenderWindow but no vtkRenderWindowInteractor.<br>
It is the job of the vtkRenderWindowInteractor to listen to events<br>
like WM_DELETE_WINDOW and to react accordingly.<br>
<br>
In the case of Cone.cxx, the window is closed by the user (and the<br>
associated system resources that go with it too), but the event is not<br>
taken into account by the program. The rendering is then perform on<br>
system resources that don't exist anymore, hence the error.<br>
<br>
Solution: use a vtkRenderWindowInteractor.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On Tue, Jun 9, 2009 at 9:29 AM, Limin Fu<<a href="mailto:phoolimin@gmail.com">phoolimin@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I am new to VTK. I realized this problem when I ran an example of the VTK<br>
> toolkit from my program. It happens when a render window is closed by the<br>
> user, when there is still a rendering process going on. The error message is<br>
> like this:<br>
><br>
> XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0"<br>
> after 3037 requests (3035 known processed) with 8 events remaining.<br>
><br>
> It can be reproduced by increase the number of the looping in the<br>
> Tutorial/Step1/Cxx/Cone.cxx, and close the rendering window before the loop<br>
> is finished.<br>
><br>
> I tried VTK5.0.4 from my linux distribution, and VTK5.4.2 downloaded from<br>
> the website, both have this problem. How should I avoid this problem?<br>
><br>
> Thanks a lot!<br>
><br>
> Limin<br>
><br>
</div></div>> _______________________________________________<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>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
François Bertel, PhD | Kitware Inc. Suite 204<br>
1 (518) 371 3971 x113 | 28 Corporate Drive<br>
| Clifton Park NY 12065, USA<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 <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: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>