|
From: Ethan M. <merritt@u.washington.edu> - 2005-06-24 19:02:58
|
On Friday 24 June 2005 01:42 pm, Timoth=C3=A9e Lecomte wrote: > Ethan Merritt wrote: >=20 > > > >I would think the proper fix is to re-initialize the longjump at the > >start of each thread creation. Then if you get an error it will jump > >to a per-thread error handler and exit the thread cleanly. > > =20 > > > I have just tried it. The remaining problem is that setjmp/longjmp were=20 > designed for C, not C++. I see. So your new driver is C++ only? That is already a potential problem since the rest of the gnuplot is distinctly not C++ code. I fear it will limit the number of platforms on which your new driver will actually compile and link into gnuplot successfully. We'll find out, I guess. > So if I initialize the =20 > longjump when creating my terminal thread, it doesn't delete the old=20 > window but open a new one when longjmp is used ! However, it does not=20 > segfault... So the solution may be to check if another window is opened=20 > and destroy it before to continue. That doesn't seem very efficient. Can't you do the same thing as the x11 driver? When you send a new plot command the driver looks to see if there is an existing window and if so uses it. If there is no existing window then it opens a new one. See the difference? You check for an old window, but instead of destoying it you just use it explicitly for the new plot also. =2D-=20 Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |