similar to: getGraphicsEvent() and setTimeLimit() bug and compatibility patch.

Displaying 20 results from an estimated 400 matches similar to: "getGraphicsEvent() and setTimeLimit() bug and compatibility patch."

2016 Sep 21
1
Handlers in setGraphicsEventHandlers() can recursively call getGraphicsEvent(). Intended behavior?
doKeybd() gets called in CHelpKeyIn() and NHelpKeyIn() in library/grDevices/src/devWindows.c, where the call is encapsulated in an 'if (dd->gettingEvent)' block. So the only times this code ever calls doKeybd() is when gettingEvent is in fact set. Further, it's called in two locations in X11_eventHelper(), in modules/X11/devX11.c, where the state of gettingEvent seems to be moot
2016 Sep 21
0
Handlers in setGraphicsEventHandlers() can recursively call getGraphicsEvent(). Intended behavior?
Hi Is the correct patch to remove the setting of the gettingEvent flag or would it be better to flip the TRUE/FALSE setting (set to TRUE before handling then reset to FALSE after handling) ? Also, for this patch and for the other two you sent, one difficulty will be with testing the patches. I have no testing code for this, so would need at least a test or two from you (ideally someone
2016 Sep 17
2
Handlers in setGraphicsEventHandlers() can recursively call getGraphicsEvent(). Intended behavior?
Hey all. As in general it's a bad idea to allow an event handler to generate an event, and as comments in the code seem to suggest this isn't the intention either, I was wondering about recursion in getGraphicsEvent(). In main/gevents.c, both doMouseEvent() and doKeybd() have the following line; dd->gettingEvent = FALSE; /* avoid recursive calls */ And they reset it to TRUE
2016 Sep 16
1
getGraphicsEvent() questions, minor feature/tweak request, and patch(es).
Hey all, new R user and first timer here. I've been using getGraphicsEvent() on an X11-Xlib device in a kind of interactive loop, and would like to be able to stop it from printing newlines in the console when I don't actually want to print a prompt. Even an empty "" value still causes a newline right now. To not break any code that depends on this behavior, I figured getting
2011 Dec 16
2
Event handling in R
Dear R-helpers, I've just started playing with getGraphicsEvent() in R, and was wondering if there is a simple way to stop this function waiting for input after a pre-defined time, instead of relying either on a non-NULL value from one of the event handlers or for a user-interrupt for it to halt (as per the R manual). The only way that I've thought of to make this work is using
2012 Jan 13
0
WISHLIST: Be able to timeout readline()/stdin via setTimeLimit in all consoles
Hi. WISHLIST: Regardless on console, I'd like to be able to timeout a call to readline()/file("stdin", blocking=TRUE) via setTimeLimit. OBSERVATION: On Windows Rterm as well as plain R on Linux, setTimeLimit() does not momentarily interrupt from stdin, but only after hitting RETURN. A few examples: timeout00 <- function() { setTimeLimit(elapsed=5); Sys.sleep(10); }
2016 Oct 26
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On 10/25/2016 9:44 PM, Henrik Bengtsson wrote: > setTimeLimit(elapsed=1) causes a timeout error whenever a call takes > more than one second. For instance, this is how it works on Windows > (R 3.3.1): > >> setTimeLimit(elapsed=1) >> Sys.sleep(10); message("done") > Error in Sys.sleep(10) : reached elapsed time limit > > Also, the error propagates
2016 Oct 26
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Spencer also had tools and rsconnect loaded (via a namespace) but it doesn't seem to make a difference for me if I load them. It also doesn't seem to matter for me whether it is CRAN R, locally built R, Terminal, R.app. However, RStudio differs > setTimeLimit(elapsed=1) Error: reached elapsed time limit > setTimeLimit(elapsed=1) Error: reached elapsed time limit >
2016 Oct 31
0
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Thank you for looking into this Luke. On Thu, Oct 27, 2016 at 9:26 AM, <luke-tierney at uiowa.edu> wrote: > On unix, unless event polling is enabled Sys.sleep just waits in a > select() call (with a SIGINT handler in place) so the elapsed time > isn't checked until after the select call is complete. Rstudio uses > event polling, and in particular sets R_wait_usec to 10000,
2016 Oct 31
1
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On Mon, 31 Oct 2016, Henrik Bengtsson wrote: > Thank you for looking into this Luke. > > On Thu, Oct 27, 2016 at 9:26 AM, <luke-tierney at uiowa.edu> wrote: >> On unix, unless event polling is enabled Sys.sleep just waits in a >> select() call (with a SIGINT handler in place) so the elapsed time >> isn't checked until after the select call is complete.
2013 May 16
1
setTimeLimit sometimes fails to terminate idle call in R
I would like to use setTimeLimit to abort operations that are stuck waiting (idle) after n seconds. Below a toy example in which Sys.sleep is a placeholder call that is idle: testlimit <- function(){ setTimeLimit(elapsed=3, transient=TRUE); Sys.sleep(10); } system.time(testlimit()); However this is giving inconsistent results. On windows and in r-studio server (linux) the call is
2016 Oct 26
5
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
setTimeLimit(elapsed=1) causes a timeout error whenever a call takes more than one second. For instance, this is how it works on Windows (R 3.3.1): > setTimeLimit(elapsed=1) > Sys.sleep(10); message("done") Error in Sys.sleep(10) : reached elapsed time limit Also, the error propagates immediately and causes an interrupt after ~1 second; > system.time({ Sys.sleep(10);
2016 Oct 27
2
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
On unix, unless event polling is enabled Sys.sleep just waits in a select() call (with a SIGINT handler in place) so the elapsed time isn't checked until after the select call is complete. Rstudio uses event polling, and in particular sets R_wait_usec to 10000, which means event and interrupt checks happen during a Sys.seep call. The R GUI on macOS doesn't seem to do this (but my lldb
2016 Oct 26
3
BUG?: On Linux setTimeLimit() fails to propagate timeout error when it occurs (works on Windows)
Thank you for the feedback and confirmations. Interesting to see that it's also reproducible on macOS expect for Spencer; that might indicate a difference in builds. BTW, my original post suggested that timeout error was for sure detected while running Sys.sleep(10). However, it could of course also be that it is only detected after it finishes. For troubleshooting, the
2016 Jun 07
0
getGraphicsEvent on X11 and event queuing
... I just realized that setGraphicsEventHandlers or getGraphicsEvent could have an 'onIdle' callback, to be called somewhere in the polling loop of gevents.c:163 - I think this would solve my problem #2 in a minimally disruptive way. On Mon, Jun 06, 2016 at 06:38:45PM -0700, frederik at ofb.net wrote: > Hi R-Devel, > > I've been working on an oscilloscope project using an
2016 Jul 25
0
getGraphicsEvent() alternative for cairo graphics device?
Dear Daniel Greenidge, To enable getGraphicsEvent on Cairo, you have two patches to choose from: https://bugs.r-project.org/bugzilla/show_bug.cgi?id=14364 https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16951 The second one is by me, and the first one is from five years ago by Hugo Mildenberger. Both patches are very simple, they move some lines enabling getGrahpicsEvent outside of a
2008 Apr 13
1
getGraphicsEvent plotting two graph
Hi the list, I need to use getGraphicsEvent to plot two graph. On the following toy example: - the function b is ploting two graph depending on a parameter - the function a is calling b according to some user answers. It is suppose to call b until the user press Return, but it does not. b <- function(x){ dev.off(2);dev.off(3) windows();windows(3,3,xpos=0) dev.set(2);plot(1:x)
2016 Nov 14
0
getGraphicsEvent() alternative for cairo graphics device?
Hi Paul, Thank you, for some reason I didn't seem to get an email notification for your bugzilla comment! I will try to send you something shortly. Frederick On Mon, Nov 14, 2016 at 08:55:20AM +1300, Paul Murrell wrote: > Hi > > The current status is that I am keen for people to contribute some testing > code (see https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16951) >
2016 Dec 08
0
getGraphicsEvent() alternative for cairo graphics device?
Hi Paul, Thanks for your efforts. Do you have an idea when my patch(es) might be committed? Is there anything I can do to help move this along? Thanks, Frederick On Mon, Nov 14, 2016 at 08:55:20AM +1300, Paul Murrell wrote: > Hi > > The current status is that I am keen for people to contribute some testing > code (see https://bugs.r-project.org/bugzilla/show_bug.cgi?id=16951) >
2016 Nov 14
0
getGraphicsEvent() alternative for cairo graphics device?
Hi Paul, OK I tried not to make the examples too fancy. Please let me know what you think. They should probably be amended to support the Windows platform, but I think that task would be much easier for someone with access to Windows... By the way I'm Cc'ing Mark O'Connell who shared with me some great getGraphicsEvent examples - well, I found them useful, perhaps if these are going