[rkward-devel] dev.off () bug

Prasenjit Kapat kapatp at gmail.com
Thu Jun 24 17:32:51 UTC 2010


(this mail didn't go through earlier...trying to resend.. removing the
screenshots for now....)

On Wed, Jun 23, 2010 at 3:39 AM, Thomas Friedrichsmeier
<thomas.friedrichsmeier at ruhr-uni-bochum.de> wrote:
> On Tuesday 22 June 2010, Prasenjit Kapat wrote:
>> When you find some time, here is some more information:
>> this bug seems to be related to KDE 4.4.x series; see below.

After some more goofing around, I think this may have something to do
with the dual monitor setup. I am running the Lenovo T410 with an
nvidia card and an external monitor connected in twinview using the
binary nvidia driver.

It doesn't matter, if KDE's composition is enabled/disabled. If I
disconnect the external monitor and restart X with a modified
xorg.conf (removing twiinview stuff) then I don't see this bug -
although I haven't spent much time this way.

Also, as I had mentioned earlier, this happens when there are no
existing devices before any plotting cmd is called. A duplicated
device does not have this bug. For example:

Plot Beta probabilities. Check "Preview". Then duplicate the device
(device 2 to 3). Set the original one active (dev.set(2)). Now,
uncheck "Preview." - device 2 closes nicely. Call dev.off () once
more, device 3 closes nicely as well.

Is there some issue (or incompatible interaction with the dual-head
setup) in .rk.do.call ("statOpenX11", ...) when dev.cur () == 1?

It seems this bug was seen (on OSX) in 2007 (you may have seen this thread):
http://tolstoy.newcastle.edu.au/R/e2/devel/07/05/3138.html

Does Paul Murrell's reply help?

>> > Ok, then here's an idea for a hack around the bug: Directly before the
>> > "real" dev.off() add
>> >   .rk.lock.device <- TRUE
>> > and
>> >   .rk.lock.device <- FALSE
>> > directly after. In rk.screen.device add
>> >   if (exists (.rk.lock.device) && .rk.lock.device) return
>> > at the start.
>>
>> Well, this didn't help :( Issue persists.
>
> Ok, turn those "<-" into "<<-", obviously. I would not be surprised, if this
> has undesirable side-effects, but it should really have *some* effect on the
> issue.

It just baffles me, in spite of this hard return rule, two additional
devices are still created!! The issue is deep inside somewhere else.

> If it still does not, try
>   debug (rk.screen.device)
> and inspect what's going on in there after calling dev.off(). (Although the
> real mystery is why rk.screen.device() is getting called at all during
> dev.off().

debug (rk.screen.device) behaves badly. The plot is displayed in a
separate _native_ X11 window and rkward's device window is kept
detached from it (see the two screenshots)! Anyway, that may be
another issue!

Doing debug (dev.off) shows: (A) the current device (2) is closed and
(B) two new devices (3,4) are opened when .Internal (dev.off
(.......)) gets called.

Regards,
-- 
Prasenjit




More information about the Rkward-devel mailing list