RE: [R] Rcmdr X11 protocol error message

2004-09-05 Thread John Fox
Dear Michael, 

 -Original Message-
 From: Michael Bibo [mailto:[EMAIL PROTECTED] 
 Sent: Saturday, September 04, 2004 9:59 AM
 To: John Fox
 Cc: 'Peter Dalgaard'; [EMAIL PROTECTED]; 'Dirk Eddelbuettel'
 Subject: Re: [R] Rcmdr X11 protocol error message
 

 . . .

 I have another reliable observation with the new version of 
 Rcmdr, which I offer only because it might provide a clue as 
 to what's going on:
 If you generate a scatterplot for two numerical variables 
 grouped by a factor, the plot is drawn, but the dialogue box 
 remains on screen, and is unresponsive.  When the graphics 
 device is closed, you get an error
 message: 'Error: No graphics device active'.
 If you then try to generate the same scatterplot ungrouped 
 (which previously worked fine) you receive a message; 
 'Warning: display list redraw incomplete'.  This only occurs 
 the first time you try to draw the ungrouped scatterplot.
 Hope it helps.
 

This works fine for me, under both Windows and Quantian. Is it possible that
you forgot to left-click to position the legend for the scatterplot by
groups (at is indicated at the bottom of the Groups dialog box)?

I hope that this helps,
 John

 Peter,
 Any hints as to how to generate that trace of the execution 
 you mentioned?
 
 Michael
 
 [EMAIL PROTECTED]
 


__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rcmdr X11 protocol error message

2004-09-04 Thread Michael Bibo
John Fox wrote:
Dear Michael and Peter,
I've made the following changes to the current development version of the
Rcmdr package (on my web site, at
http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/index.html, but not posted
to CRAN):
(1) The default for the Rcmdr grab.focus option is now set to FALSE for
non-Windows systems.
(2) There's a new report.X11.warnings option, which is set to FALSE by
default; this suppresses these warnings so that they don't appear in Rcmdr
warning dialogs. This just papers over the problem without really solving
it.
I'm not happy with these solutions, but perhaps they'll help until we
discover the source of the problems. (I tested on my Quantian system.)
Thanks for your help.
John
 

Thanks, John.
The commitment of contributors to R and to this list never ceases to 
amaze me!  The temporary solutions will help.
As I have indicated, I am not a programmer, so I can't offer much in 
terms of the underlying Tcl/Tk issues, but I am happy to test anything 
out for you on my system (if you can explain it simply enough for me).
I have another reliable observation with the new version of Rcmdr, which 
I offer only because it might provide a clue as to what's going on:
If you generate a scatterplot for two numerical variables grouped by a 
factor, the plot is drawn, but the dialogue box remains on screen, and 
is unresponsive.  When the graphics device is closed, you get an error 
message: 'Error: No graphics device active'.
If you then try to generate the same scatterplot ungrouped (which 
previously worked fine) you receive a message; 'Warning: display list 
redraw incomplete'.  This only occurs the first time you try to draw the 
ungrouped scatterplot.
Hope it helps.

Peter,
Any hints as to how to generate that trace of the execution you mentioned?
Michael
[EMAIL PROTECTED]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Rcmdr X11 protocol error message

2004-09-01 Thread John Fox
Dear Peter and Michael,

I installed Quantian on  a spare machine that I have and observed the same
warning messages that Michael has been reporting. These (and the problem
with help files but not with viewing data sets that Peter reported) occurred
with version 0.9-11 of Rcmdr but not with an earlier version.

Since the code for the Rcmdr package was substantially reworked this summer,
that seems to me a good candidate for the source of these problems, though I
don't see why the changes should be problematic. I'm afraid that I'm
insufficiently familiar with the inner workings of X11 and Tcl/Tk to be much
help in figuring out what's wrong. Everything seems to work fine under
Windows, as far as I can tell.

It occurs to me that if the warning messages are benign, one approach would
be to suppress them. I already intercept warnings and present them in dialog
boxes; I could grep for X11 protocol error and simply ignore these. That
doesn't seem to me a good solution, however. It would be better to
understand what's happening.

I'm copying this message to Dirk since he's mentioned that he plans to put
the newer Rcmdr in Quantian. Dirk: Have you tested with Rcmdr 0.9-11?

Thank you.
 John



 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Peter Dalgaard
 Sent: Tuesday, August 31, 2004 2:37 PM
 To: Michael Bibo
 Cc: [EMAIL PROTECTED]
 Subject: Re: [R] Rcmdr X11 protocol error message
 
 Michael Bibo [EMAIL PROTECTED] writes:
 
  John Fox jfox at mcmaster.ca writes:
  
   
   Dear Michael,
   
   A question: Do you observe these problems with tcltk in 
 general or 
   just with the Rcmdr package? Is it possible for you to 
 test a Tcl/Tk 
   program outside of R?
   
  And Peter asked which version of Tcl/Tk.
  
  Apparently my system has version 8.4 installed, specifically:
  Tcl-8.4.5-3-mdk (tclsh8.4) and Tk-8.4.5-3-mdk (libtk8.4.so).  As I 
  understand it, these are installed from RPMs on the 
 installation DVD, 
  and I note that they are mandrake specific.
  
  John - I wasn't sure if I had any other Tcl/Tk applications 
 installed 
  (it's not always obvious when installing from RPM's).  I have 
  certainly not encountered these error messages with any other 
  application.  I quickly downloaded WISH Supernotepad 1.2.3.  This 
  application requires Tcl/Tk 8.4 or greater.  There are no graphics 
  window in this application, but plenty of dialogue boxes.  
 It gave no errors.  Is this an appropriate test?
  
  If this is a mandrake-configuration-specific problem, it may not be 
  worth spending too much time investigating, as R Commandr 
 still works.  
  I can always try re-installing Tcl/Tk from source when/if I 
 have time.
 
 I don't think we have evidence that it's the Tcl 
 installation, although it could be (Google suggests that 
 there have been problems with at least some versions, 
 although most references seem rather old). I can't seem to 
 reproduce the effect with SUSE's tk-8.4.6-28 either. If it is 
 a bug in Rcmdr, then we'd want to find it and you have the 
 only handle on it
 
 BTW, sometimes Tk errors allow you to see a trace of the execution.
 Would this happen to be one of those situations?
 
 -- 
O__   Peter Dalgaard Blegdamsvej 3  
   c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
  (*) \(*) -- University of Copenhagen   Denmark  Ph: 
 (+45) 35327918
 ~~ - ([EMAIL PROTECTED]) FAX: 
 (+45) 35327907
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rcmdr X11 protocol error message

2004-09-01 Thread Michael Bibo
John Fox wrote:
Dear Peter and Michael,
I installed Quantian on  a spare machine that I have and observed the same
warning messages that Michael has been reporting. These (and the problem
with help files but not with viewing data sets that Peter reported) occurred
with version 0.9-11 of Rcmdr but not with an earlier version.
Since the code for the Rcmdr package was substantially reworked this summer,
that seems to me a good candidate for the source of these problems, though I
don't see why the changes should be problematic. I'm afraid that I'm
insufficiently familiar with the inner workings of X11 and Tcl/Tk to be much
help in figuring out what's wrong. Everything seems to work fine under
Windows, as far as I can tell.
It occurs to me that if the warning messages are benign, one approach would
be to suppress them. I already intercept warnings and present them in dialog
boxes; I could grep for X11 protocol error and simply ignore these. That
doesn't seem to me a good solution, however. It would be better to
understand what's happening.
I'm copying this message to Dirk since he's mentioned that he plans to put
the newer Rcmdr in Quantian. Dirk: Have you tested with Rcmdr 0.9-11?
Thank you.
John
 

 

John, Peter and Dirk,
I'm glad I'm not the only one with a handle on it now.  I've already 
exceeded my level of knowledge and skill in both Linux and R.  But I'm 
happy to help track it down, if I can be of assistance.  As I have said 
to John, the major value of Rcmdr to me is to help 'sell' R to others in 
my organisation currently using SPSS, and for this purpose, the Windows 
version at work is working fine.  It is more of an annoyance at home, as 
it doesn't seem to stop anything working.

Peter asked:
BTW, sometimes Tk errors allow you to see a trace of the execution.
Would this happen to be one of those situations?
The short answer is I don't know (see my first line :-)).  There is no 
button on the dialogue box saying 'more details...' or anything that 
obvious.  Is there a log file somewhere on the system or some other way 
to generate such a trace?

I have been experimenting, and the following seem reliable (at least on 
my system):

Error messages don't seem to happen for the first graph generated.  The 
second graph drawn also generates an error dialogue box with the error 
message repeated about 11 times.  The third and subsequent times exactly 
the same graph is generated leads to an error message repeated about 21 
times.  (I don't know if the number of repetitions is meaningful).  Note 
that the graphs are generated and visible when the error messages appear.

Running any analysis that only writes output to the output window (such 
as fitting a regression model) generates the error messages before the 
output is written to the output window.  The output appears when the 
error dialogue box is OK'd.  I guess it's more likely to be responding 
to exiting the dialogue box than writing the output.  But this only 
happens when such error messages have been generated previously in that 
session by creating a (second) graph.

If the diagnostic panel plots for a regression model are called, the 
error messages appear, but this time the plots themselves are not 
visible in the graphics device (it is blank).  When the error messages 
are OK'd, the plots appear in the device.

When exiting Rcmdr, then, and OK'ing the Exit? dialogue box, the final 
error messages appear, but again only if they have already been 
generated by a graph call.

I don't know if this will be helpful, but I thought reliable 
observations might give some clues.

Regards,
Michael
[EMAIL PROTECTED]
__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Rcmdr X11 protocol error message

2004-09-01 Thread John Fox
Dear Michael,

I can confirm Michael's observations: no problems until after a graphics
device window is opened. Then increasing numbers of warnings each time
commands are executed from within the Rcmdr. This happens whether the
commands are executed from dialog boxes or from the (upper) script window.
The warnings continue even if the graphics window is closed. Exiting from
the Commander and restarting it (within the name R session) stops the
warnings until another graphics window is opened.

John

 -Original Message-
 From: Michael Bibo [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 01, 2004 6:21 AM
 To: John Fox
 Cc: 'Peter Dalgaard'; [EMAIL PROTECTED]; 'Dirk Eddelbuettel'
 Subject: Re: [R] Rcmdr X11 protocol error message
 
 John Fox wrote:
 
 Dear Peter and Michael,
 
 I installed Quantian on  a spare machine that I have and 
 observed the 
 same warning messages that Michael has been reporting. These 
 (and the 
 problem with help files but not with viewing data sets that Peter 
 reported) occurred with version 0.9-11 of Rcmdr but not with 
 an earlier version.
 
 Since the code for the Rcmdr package was substantially reworked this 
 summer, that seems to me a good candidate for the source of these 
 problems, though I don't see why the changes should be 
 problematic. I'm 
 afraid that I'm insufficiently familiar with the inner 
 workings of X11 
 and Tcl/Tk to be much help in figuring out what's wrong. Everything 
 seems to work fine under Windows, as far as I can tell.
 
 It occurs to me that if the warning messages are benign, one 
 approach 
 would be to suppress them. I already intercept warnings and present 
 them in dialog boxes; I could grep for X11 protocol error 
 and simply 
 ignore these. That doesn't seem to me a good solution, however. It 
 would be better to understand what's happening.
 
 I'm copying this message to Dirk since he's mentioned that 
 he plans to 
 put the newer Rcmdr in Quantian. Dirk: Have you tested with 
 Rcmdr 0.9-11?
 
 Thank you.
  John
   
 
   
 
 John, Peter and Dirk,
 
 I'm glad I'm not the only one with a handle on it now.  I've 
 already exceeded my level of knowledge and skill in both 
 Linux and R.  But I'm happy to help track it down, if I can 
 be of assistance.  As I have said to John, the major value of 
 Rcmdr to me is to help 'sell' R to others in my organisation 
 currently using SPSS, and for this purpose, the Windows 
 version at work is working fine.  It is more of an annoyance 
 at home, as it doesn't seem to stop anything working.
 
 Peter asked:
 
 BTW, sometimes Tk errors allow you to see a trace of the execution.
 Would this happen to be one of those situations?
 
 The short answer is I don't know (see my first line :-)).  
 There is no button on the dialogue box saying 'more 
 details...' or anything that obvious.  Is there a log file 
 somewhere on the system or some other way to generate such a trace?
 
 I have been experimenting, and the following seem reliable 
 (at least on my system):
 
 Error messages don't seem to happen for the first graph 
 generated.  The second graph drawn also generates an error 
 dialogue box with the error message repeated about 11 times.  
 The third and subsequent times exactly the same graph is 
 generated leads to an error message repeated about 21 times.  
 (I don't know if the number of repetitions is meaningful).  
 Note that the graphs are generated and visible when the error 
 messages appear.
 
 Running any analysis that only writes output to the output 
 window (such as fitting a regression model) generates the 
 error messages before the output is written to the output 
 window.  The output appears when the error dialogue box is 
 OK'd.  I guess it's more likely to be responding to exiting 
 the dialogue box than writing the output.  But this only 
 happens when such error messages have been generated 
 previously in that session by creating a (second) graph.
 
 If the diagnostic panel plots for a regression model are 
 called, the error messages appear, but this time the plots 
 themselves are not visible in the graphics device (it is 
 blank).  When the error messages are OK'd, the plots appear 
 in the device.
 
 When exiting Rcmdr, then, and OK'ing the Exit? dialogue 
 box, the final error messages appear, but again only if they 
 have already been generated by a graph call.
 
 I don't know if this will be helpful, but I thought reliable 
 observations might give some clues.
 
 Regards,
 
 Michael
 
 [EMAIL PROTECTED]
 
 


__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Rcmdr X11 protocol error message

2004-09-01 Thread John Fox
Dear Michael and Peter,

I've made the following changes to the current development version of the
Rcmdr package (on my web site, at
http://socserv.socsci.mcmaster.ca/jfox/Misc/Rcmdr/index.html, but not posted
to CRAN):

(1) The default for the Rcmdr grab.focus option is now set to FALSE for
non-Windows systems.

(2) There's a new report.X11.warnings option, which is set to FALSE by
default; this suppresses these warnings so that they don't appear in Rcmdr
warning dialogs. This just papers over the problem without really solving
it.

I'm not happy with these solutions, but perhaps they'll help until we
discover the source of the problems. (I tested on my Quantian system.)

Thanks for your help.
 John

 -Original Message-
 From: Michael Bibo [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, September 01, 2004 6:21 AM
 To: John Fox
 Cc: 'Peter Dalgaard'; [EMAIL PROTECTED]; 'Dirk Eddelbuettel'
 Subject: Re: [R] Rcmdr X11 protocol error message
 
 John Fox wrote:
 
 Dear Peter and Michael,
 
 I installed Quantian on  a spare machine that I have and 
 observed the 
 same warning messages that Michael has been reporting. These 
 (and the 
 problem with help files but not with viewing data sets that Peter 
 reported) occurred with version 0.9-11 of Rcmdr but not with 
 an earlier version.
 
 Since the code for the Rcmdr package was substantially reworked this 
 summer, that seems to me a good candidate for the source of these 
 problems, though I don't see why the changes should be 
 problematic. I'm 
 afraid that I'm insufficiently familiar with the inner 
 workings of X11 
 and Tcl/Tk to be much help in figuring out what's wrong. Everything 
 seems to work fine under Windows, as far as I can tell.
 
 It occurs to me that if the warning messages are benign, one 
 approach 
 would be to suppress them. I already intercept warnings and present 
 them in dialog boxes; I could grep for X11 protocol error 
 and simply 
 ignore these. That doesn't seem to me a good solution, however. It 
 would be better to understand what's happening.
 
 I'm copying this message to Dirk since he's mentioned that 
 he plans to 
 put the newer Rcmdr in Quantian. Dirk: Have you tested with 
 Rcmdr 0.9-11?
 
 Thank you.
  John
   
 
   
 
 John, Peter and Dirk,
 
 I'm glad I'm not the only one with a handle on it now.  I've 
 already exceeded my level of knowledge and skill in both 
 Linux and R.  But I'm happy to help track it down, if I can 
 be of assistance.  As I have said to John, the major value of 
 Rcmdr to me is to help 'sell' R to others in my organisation 
 currently using SPSS, and for this purpose, the Windows 
 version at work is working fine.  It is more of an annoyance 
 at home, as it doesn't seem to stop anything working.
 
 Peter asked:
 
 BTW, sometimes Tk errors allow you to see a trace of the execution.
 Would this happen to be one of those situations?
 
 The short answer is I don't know (see my first line :-)).  
 There is no button on the dialogue box saying 'more 
 details...' or anything that obvious.  Is there a log file 
 somewhere on the system or some other way to generate such a trace?
 
 I have been experimenting, and the following seem reliable 
 (at least on my system):
 
 Error messages don't seem to happen for the first graph 
 generated.  The second graph drawn also generates an error 
 dialogue box with the error message repeated about 11 times.  
 The third and subsequent times exactly the same graph is 
 generated leads to an error message repeated about 21 times.  
 (I don't know if the number of repetitions is meaningful).  
 Note that the graphs are generated and visible when the error 
 messages appear.
 
 Running any analysis that only writes output to the output 
 window (such as fitting a regression model) generates the 
 error messages before the output is written to the output 
 window.  The output appears when the error dialogue box is 
 OK'd.  I guess it's more likely to be responding to exiting 
 the dialogue box than writing the output.  But this only 
 happens when such error messages have been generated 
 previously in that session by creating a (second) graph.
 
 If the diagnostic panel plots for a regression model are 
 called, the error messages appear, but this time the plots 
 themselves are not visible in the graphics device (it is 
 blank).  When the error messages are OK'd, the plots appear 
 in the device.
 
 When exiting Rcmdr, then, and OK'ing the Exit? dialogue 
 box, the final error messages appear, but again only if they 
 have already been generated by a graph call.
 
 I don't know if this will be helpful, but I thought reliable 
 observations might give some clues.
 
 Regards,
 
 Michael
 
 [EMAIL PROTECTED]
 
 


__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rcmdr X11 protocol error message

2004-08-31 Thread Peter Dalgaard
Michael Bibo [EMAIL PROTECTED] writes:

 What's happening?
 Both Java and R are reading events from the X11 event loop ``at the same
 time''. As a result, R is reading events meant for Java and vice-versa and bad
 things happen!
 
 There are two solutions:
 
 * use the Java graphics device which uses the Java graphics facilities
 to do the rendering;
 * don't run the GUI and the X11 device at the same time. 
 
 The second solution is clearly not ideal. What we can do is to compile the
 X11 device code to be thread-safe. However, the same effect will be seen if we
 load another X11 event handler (e.g. the Tcl/Tk library). 

I don't think that is the issue. The X11 device and Tk sit on
different connections to the X device, so they shouldn't be seeing
eachother's events (the event loops can starve eachother though
since they are multiplexed). I'd rather suspect a race condition with
the Tk code itself - sending events to a window that is in the process
of being destroyed and things like that. Which Tk version are we
talking about, by the way?

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


RE: [R] Rcmdr X11 protocol error message

2004-08-31 Thread John Fox
Dear Michael,

A question: Do you observe these problems with tcltk in general or just with
the Rcmdr package? Is it possible for you to test a Tcl/Tk program outside
of R?

Regards,
 John

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of Peter Dalgaard
 Sent: Tuesday, August 31, 2004 2:32 AM
 To: Michael Bibo
 Cc: [EMAIL PROTECTED]
 Subject: Re: [R] Rcmdr X11 protocol error message
 
 Michael Bibo [EMAIL PROTECTED] writes:
 
  What's happening?
  Both Java and R are reading events from the X11 event loop ``at 
  the same time''. As a result, R is reading events meant for 
 Java and 
  vice-versa and bad things happen!
  
  There are two solutions:
  
  * use the Java graphics device which uses the Java graphics 
  facilities to do the rendering;
  * don't run the GUI and the X11 device at the same time. 
  
  The second solution is clearly not ideal. What we can do is to 
  compile the
  X11 device code to be thread-safe. However, the same effect will be 
  seen if we load another X11 event handler (e.g. the Tcl/Tk library).
 
 I don't think that is the issue. The X11 device and Tk sit on 
 different connections to the X device, so they shouldn't be 
 seeing eachother's events (the event loops can starve 
 eachother though since they are multiplexed). I'd rather 
 suspect a race condition with the Tk code itself - sending 
 events to a window that is in the process of being destroyed 
 and things like that. Which Tk version are we talking about, 
 by the way?
 
 -- 
O__   Peter Dalgaard Blegdamsvej 3  
   c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
  (*) \(*) -- University of Copenhagen   Denmark  Ph: 
 (+45) 35327918
 ~~ - ([EMAIL PROTECTED]) FAX: 
 (+45) 35327907
 
 __
 [EMAIL PROTECTED] mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide! 
 http://www.R-project.org/posting-guide.html

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rcmdr X11 protocol error message

2004-08-31 Thread Michael Bibo
John Fox jfox at mcmaster.ca writes:

 
 Dear Michael,
 
 A question: Do you observe these problems with tcltk in general or just with
 the Rcmdr package? Is it possible for you to test a Tcl/Tk program outside
 of R?
 
And Peter asked which version of Tcl/Tk.

Apparently my system has version 8.4 installed, specifically:
Tcl-8.4.5-3-mdk (tclsh8.4) and Tk-8.4.5-3-mdk (libtk8.4.so).  As I understand
it, these are installed from RPMs on the installation DVD, and I note that they
are mandrake specific.

John - I wasn't sure if I had any other Tcl/Tk applications installed (it's not
always obvious when installing from RPM's).  I have certainly not encountered
these error messages with any other application.  I quickly downloaded WISH
Supernotepad 1.2.3.  This application requires Tcl/Tk 8.4 or greater.  There
are no graphics window in this application, but plenty of dialogue boxes.  It
gave no errors.  Is this an appropriate test?

If this is a mandrake-configuration-specific problem, it may not be worth
spending too much time investigating, as R Commandr still works.  I can always
try re-installing Tcl/Tk from source when/if I have time.

Regards,

Michael

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rcmdr X11 protocol error message

2004-08-31 Thread Peter Dalgaard
Michael Bibo [EMAIL PROTECTED] writes:

 John Fox jfox at mcmaster.ca writes:
 
  
  Dear Michael,
  
  A question: Do you observe these problems with tcltk in general or just with
  the Rcmdr package? Is it possible for you to test a Tcl/Tk program outside
  of R?
  
 And Peter asked which version of Tcl/Tk.
 
 Apparently my system has version 8.4 installed, specifically:
 Tcl-8.4.5-3-mdk (tclsh8.4) and Tk-8.4.5-3-mdk (libtk8.4.so).  As I understand
 it, these are installed from RPMs on the installation DVD, and I note that they
 are mandrake specific.
 
 John - I wasn't sure if I had any other Tcl/Tk applications installed (it's not
 always obvious when installing from RPM's).  I have certainly not encountered
 these error messages with any other application.  I quickly downloaded WISH
 Supernotepad 1.2.3.  This application requires Tcl/Tk 8.4 or greater.  There
 are no graphics window in this application, but plenty of dialogue boxes.  It
 gave no errors.  Is this an appropriate test?
 
 If this is a mandrake-configuration-specific problem, it may not be worth
 spending too much time investigating, as R Commandr still works.  I can always
 try re-installing Tcl/Tk from source when/if I have time.

I don't think we have evidence that it's the Tcl installation,
although it could be (Google suggests that there have been problems
with at least some versions, although most references seem rather
old). I can't seem to reproduce the effect with SUSE's tk-8.4.6-28
either. If it is a bug in Rcmdr, then we'd want to find it and you
have the only handle on it

BTW, sometimes Tk errors allow you to see a trace of the execution.
Would this happen to be one of those situations?

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rcmdr X11 protocol error message

2004-08-30 Thread Peter Dalgaard
Michael Bibo [EMAIL PROTECTED] writes:

 I am using R 1.9.1 with R Commander GUI under Windows at work, and
 under Linux Mandrake 10 OR at home. I am having no problems running
 R Commander under windows. Under Linux, though, the opening and
 sometimes closing of windows from R Commander produces identical and
 repetitive error messages (in dialogue boxes and mirrored in the
 console):
 
 Warning: X11 protocol error: BadWindow (invalid Window parameter)  X 10-20.
 
 These error messages occur most frequently when graphics windows are
 opening, but can also occur when dialogue boxes pop up, and
 sometimes even when results are written to the output window.
 However, when the error message is OK'd, the plot, or whatever, is
 displayed as it should be. It is not entirely consistent, and will
 sometimes stop happening for parts of a session. Exactly the same
 commands run directly from the R console do not produce the same
 problem. I searched the mailing list archives, and found the
 following exact description of what I have been experiencing, from
 November 2003:

It's a bit hard to debug without actually installing Rcmdr (and all
its dependents), but this sort of message usually means either that a
window was invalid to begin with (a bit unlikely) or that it
disappeared while events were still being generated for it.

-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rcmdr X11 protocol error message

2004-08-30 Thread John Fox
Dear Peter,

On 30 Aug 2004 17:41:10 +0200
 Peter Dalgaard [EMAIL PROTECTED] wrote:
 John Fox [EMAIL PROTECTED] writes:
 
  Dear Peter and Michael,
  
  Peter: Thank you for fielding this question. Michael initially
 contacted me
  directly, and I suggested that he write to the list since I didn't
 know the
  possible source of the problem, had never seen it (either under
 Windows or
  Linux), and never had a report of it before.
  
  Michael: Does this problem occur only with certain Rcmdr dialogs or
  generally? 
  
  I'd also be curious to learn whether anyone else has experienced
 this
  problem, and whether anyone has run the Rcmdr package under
 Mandrake Linux
  without a problem.
 
 I can't seem to reproduce it on RH8 with R-1.9.x. I see a couple of
 other quirks though:
 
 If you bring up a dialog and click help, you get the help window
 OK,
 but it is not scrollable until you exit the dialog with OK or Cancel
 (by which time the point is moot either way, presumably).
 

My Linux system badly needs updating, so I can't check this directly
now. Does this problem occur with HTML help? As well, setting the Rcmdr
grab.focus option to FALSE might get things unstuck.

 The View data set feature gets stuck in a tight loop and requires
 a Ctl-C in the console to allow it to display the data and process
 any
 events.

Does this problem occur occur when  showData() (from the relimp
package) is called directly, or only when it's called from the Rcmdr?

I'm sorry to impose these questions on you -- in the longer term, I
have to update my Linux system so that I can again perform these tests
myself.

Thank you for your help,
 John
 
 -p
 
 -- 
O__   Peter Dalgaard Blegdamsvej 3  
   c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
  (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45)
 35327918
 ~~ - ([EMAIL PROTECTED]) FAX: (+45)
 35327907


John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rcmdr X11 protocol error message

2004-08-30 Thread Peter Dalgaard
John Fox [EMAIL PROTECTED] writes:

 My Linux system badly needs updating, so I can't check this directly
 now. Does this problem occur with HTML help? As well, setting the Rcmdr
 grab.focus option to FALSE might get things unstuck.

Removing the grab.focus seems to help. Wouldn't expect HTML help to be
affected. 
 
  The View data set feature gets stuck in a tight loop and requires
  a Ctl-C in the console to allow it to display the data and process
  any
  events.
 
 Does this problem occur occur when  showData() (from the relimp
 package) is called directly, or only when it's called from the Rcmdr?

Both. Even w/o Rcmdr.


-- 
   O__   Peter Dalgaard Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics 2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark  Ph: (+45) 35327918
~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] Rcmdr X11 protocol error message

2004-08-30 Thread Michael Bibo
John Fox jfox at mcmaster.ca writes:

 
 Dear Peter and Michael,
 
 Peter: Thank you for fielding this question. Michael initially contacted me
 directly, and I suggested that he write to the list since I didn't know the
 possible source of the problem, had never seen it (either under Windows or
 Linux), and never had a report of it before.
 
 Michael: Does this problem occur only with certain Rcmdr dialogs or
 generally? 
 
 I'd also be curious to learn whether anyone else has experienced this
 problem, and whether anyone has run the Rcmdr package under Mandrake Linux
 without a problem.
 
 Regards,
  John
 
Might the following offer a clue?

Extract from FAQ for SJava (http://www.omegahat.org/RSJava/FAQ.html)

Event Loops

# When I run the X11() graphics device and a Java GUI, sometimes I get errors
like the following

Xlib: unexpected async reply (sequence 0x1356)!

1: X11 protocol error: BadDrawable (invalid Pixmap or Window parameter) 
2: X11 protocol error: BadDrawable (invalid Pixmap or Window parameter) 

What's happening?
Both Java and R are reading events from the X11 event loop ``at the same
time''. As a result, R is reading events meant for Java and vice-versa and bad
things happen!

There are two solutions:

* use the Java graphics device which uses the Java graphics facilities
to do the rendering;
* don't run the GUI and the X11 device at the same time. 

The second solution is clearly not ideal. What we can do is to compile the
X11 device code to be thread-safe. However, the same effect will be seen if we
load another X11 event handler (e.g. the Tcl/Tk library). 

Michael

[EMAIL PROTECTED]

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] Rcmdr X11 protocol error message

2004-08-29 Thread Michael Bibo
I am using R 1.9.1 with R Commander GUI under Windows at work,  and under Linux 
Mandrake 10 OR at home.   I am having no problems running R Commander under windows.  
Under Linux, though, the opening and sometimes closing of windows from R Commander 
produces identical and repetitive error messages (in dialogue boxes and mirrored in 
the console): 

Warning: X11 protocol error: BadWindow (invalid Window parameter)  X 10-20.

These error messages occur most frequently when graphics windows are opening, but can 
also occur when dialogue boxes pop up, and sometimes even when results are written to 
the output window.  However, when the error message is OK'd, the plot, or whatever, 
is displayed as it should be.  It is not entirely consistent, and will sometimes stop 
happening for parts of a session.  Exactly the same commands run directly from the R 
console do not produce the same problem.  I searched the mailing list archives, and 
found the following exact description of what I have been experiencing, from November 
2003:


 Message-id: [EMAIL PROTECTED]
 
 Hi all,
 I've got this using Rcmdr package only.
 R-cmdr scatterplot.matrix(~PC1+PC2+PC3+PC4 | Species,
 reg.line=FALSE, smooth=FALSE, span=0.5, diagonal= 'density',
 by.groups=TRUE, data=iris)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 Warning: X11 protocol error: BadWindow (invalid Window parameter)
 
 What's this? The plot is shown.
 
This is exactly the error message I get, with similar 10-20 line repetition.  And the 
plots are generated anyway.  Unfortunately, I could not find any reply to this email.
 
My system is running R 1.9.1 on Linux Mandrake 10 OR (installed from source, not RPM), 
with XFree86 4.3, P4 2.4GH, 1GB Ram.  The problem occurs in several different window 
managers/desktop environments.  I'm wondering if it is something to do with the 
interaction of tcl/tk with the particular X11 config, but I've reached the limit of my 
skills in diagnosing.  If anyone can suggest anything, I would appreciate it.


Regards,

Michael Bibo

Research Officer,
Community Health Services,
West Moreton Health Service District,
Queensland Health.

[EMAIL PROTECTED] 




***
This email, including any attachments sent with it, is confi...{{dropped}}

__
[EMAIL PROTECTED] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html