From: Jérôme L. <lod...@us...> - 2012-01-07 13:59:12
|
Hi, here is an update patch. It implement the idea mentioned in previous mails of an auxiliary program started by exec after the fork. On my Linux system, with this patch, the Qt terminal works as well as before. Le Vendredi 6 Janvier 2012 15:14:47 vous avez écrit : > It has its flaws, but I can finally see it plot a graph. > > So, here's a list of problems: > > 1.) Your headers don't compile That should be fixed in the new patch > 2.) When I plot something, two windows pop up in "dashboard" (or > however the space is called). The first one doesn't respond to > anything and I can only force-quit it (resulting in "Qt terminal > communication error: select() error Killed: 9"), but the second one > works fine. If I quit the second one (it allows me to do that > gracefully), I get > > > Quit application 23586 > > Quit application 23605 > Qt terminal communication error: select() error > > and gnuplot is still alive, except that at the next "plot <something>" > it enters some infinit loop without doing anything. Only killing the > first window also kills gnuplot itself. > > Is there a way to help you debug the problem? In the constructor, QtGnuplotApplication sets setQuitOnLastWindowClosed(false); which forbids the program to quit when you close the terminal window. This way, the program is still listening to events from gnuplot, and can open new windows when a new plot is requested. The application only quits when gnuplot exits. Apparently, this process is broken on OS X since the destructor of the QtGnuplotApplication (which prints the "Quit application 23605" mesage) is called when you close the terminal window. I have added the value of quitOnLastWindowClosed to this message to check whether this property is broken or overridden. Could you try again ? As for the additional window, I have no clue... Is there a way in OS X to find out the pid of a window, to check whether it is open by gunplot or gnuplot_qt ? Could you send the output of "ps auxwww" (or rather the lines that contain "gnuplot") ? > 3.) Print! WOW! I was really happy about that. However: > > Jan 6 15:11:53 smurfette.local gnuplot_qt[23619] <Error>: > > kCGErrorIllegalArgument: _CGSFindSharedWindow: WID -1 > Jan 6 15:11:53 smurfette.local gnuplot_qt[23619] <Error>: > kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch > errors as they are logged. > Jan 6 15:11:53 smurfette.local gnuplot_qt[23619] <Error>: > kCGErrorIllegalArgument: > CGSSetWindowShadowAndRimParametersWithStretch: Invalid window > 0xffffffff Is the "print" window displayed or not ? > (Export to PDF create A4 instead of what's on screen, but that's not > related to your patch.) Yes, I have scratched my head about this one, but did not find any solution. Jérôme |