|
From: Mojca M. <moj...@gm...> - 2012-01-07 16:09:53
|
2012/1/7 Jérôme Lodewyck :
> 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.
Just to make it clear: if I just close the window, there is no error
at all, but the application keeps running. But if I explicitly ask it
to quit (which it allows me to do without a problem), I get the
following:
> Quit application 34327 false
Qt terminal communication error: select() error 9 Bad file descriptor
gnuplot>
and if I try to plot something again, it just takes forever and
doesn't do anything at all. If I exit AquaTerm or X11, there are no
such problems and next plot open AquaTerm or X11 again. Oh, wait, I
checked again. If I exit X11 I get:
> XIO: fatal IO error 35 (Resource temporarily unavailable) on X
server "/tmp/launch-QIgba0/org.x:0"
after 544 requests (532 known processed) with 0 events remaining.
but next plot command reopens it and continues as if nothing happened.
> 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.
When I exit the application actually, not just close the window.
> I have added the value of
> quitOnLastWindowClosed to this message to check whether this property is
> broken or overridden. Could you try again ?
See above. The ps now says:
mojca 34327 0,0 0,4 2540360 22876 s024 S+ 4:30pm
0:02.07 gnuplot_qt
mojca 34326 0,0 0,4 2531780 21640 s024 S+ 4:30pm
0:00.44 ./inst/bin/gnuplot
> 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") ?
One window bears the name gnuplot (the non responsive one) and the
other one gnuplot_qt (the responsive one with the plot and proper
icon).
After I exit the gnuplot_qt window the ps shows me:
mojca 34326 0,0 0,4 2531780 21728 s024 S+ 4:30pm
0:11.01 ./inst/bin/gnuplot
mojca 34327 0,0 0,0 0 0 s024 Z+ 4:30pm
0:00.00 (gnuplot_qt)
Thank you very much for fixing QTVER.
Oh, I just realized. I can comment out
QApplication* application = new QApplication(argc, (char**)( NULL));
in qt_term.cpp and then I don't get the second unresponsive window.
But then I get warnings
QFont: Must construct a QApplication before a QFont
for every plot command. Apart from that, most things seem to work just
fine (mouse clipping works, resizing works apart from zillions of
warning about QFont).
And for a change, now I can use Shift+scrolling, Alt+Scrolling, ...
for zoom in/out, slide left/right, ... (maybe I didn't get the order
right, but that's not important) which didn't work yesterday. All I
was able to get to work yesterday way scrolling up and down.
One semi-nasty problem is that when loading a demo and when I get a
request to hit enter, I need to manually switch back to window with
terminal (with mouse or apple-tab) to be able to enter something into
terminal. X11 works optimally. I always see the graphic on top (if
plotting window was hidden, it gets displayed on top), but keyboard
focus stays in terminal.
Another funny experience: I switched from qt to x11. I then tried to
manipulate focus on window with qt plot, but of course nothing worked.
Then I switched back to qt and terminal started rolling (trying to
obey all the previous scrolling commands that I tried to use while
they didn't work).
Apart from that ... it looks a lot better now after commenting out
that line (still many glitches, but a good start).
Mojca
|