From rich.fitzjohn at gmail.com  Thu Apr 28 23:08:38 2005
From: rich.fitzjohn at gmail.com (rich.fitzjohn@gmail.com)
Date: Thu Apr 28 23:08:46 2005
Subject: [Rd] Rgui crash when >1 figure plotted to single wmf file (PR#7821)
Message-ID: <20050428210838.6A2BAA1E2@slim.kubism.ku.dk>

Hi,

R for Windows crashes where more than one plot is plotted to a windows
metafile where an integer format is not included in the character
string (i.e. when attempting to write more than one plot to the same
file).

win.metafile("tmp.wmf")
plot(1:10)
plot(1:10)

The following dialogues then come up:

Unable to create metafile

Program Error: Rgui.exe has generated errors and will be closed by
Windows.  You will need to restart the program.  An error log is being
created.

And R closes.  (This happens with both Rgui and Rterm).

As well as this current box, this crash also occurs on my Windows 98
box (R 2.1.0), and R 2.0.0 on Windows 2000.

This problem does not seem to happen for other graphics file devices
(png, bmp, jpeg).

R also does not crash when writing a metafile to the clipboard (where
filename is ""):
> win.metafile()
> plot(1:10)
> plot(1:10)
Error in plot.new() : A clipboard metafile can store only one figure.

The DrWatson error log contains a stack trace from the crash; not sure
if this is any use:
FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
0022E638 1015FD10 0000037F 400F037F 037F0F7F 00000001 ntdll!DbgBreakPoint 
0022E658 0229247D 00000000 00000049 00000049 00000233 !gsetcliprect 
0022E6C8 1006E9E2 F9F2700C 4057A5EC 2C53EC28 40819342 !PDF 
0022E768 10070315 F9F2700C 4057A5EC 2C53EC28 40819342 !GECircle 
0022E958 100920A6 F9F2700C 4057A5EC 2C53EC28 40819342 !GESymbol 
0022EA38 100BF1B8 F9F2700C 4057A5EC 2C53EC28 40819342 !Rf_GSymbol 
0022EBA8 100A4AA1 0253FBAC 017E542C 02419DAC 02419D3C !do_plot_xy 
0022EBE8 10080C5A 0253FB74 017D7324 0253FB90 02419D3C !do_internal 
0022ECE8 100826D5 0253FB74 02419D3C 0022ED18 10073411 !Rf_eval 
0022ED18 10080C5A 0253FB3C 017D6074 0253FB58 02419D3C !do_begin 
0022EE18 100838AB 0253FB3C 02419D3C 024F7F68 02419D3C !Rf_eval 
0022EF08 100809F0 024F7F68 02540520 0241CF9C 0242FA0C !Rf_applyClosure 
0022F008 100826D5 024F7F68 0242FA0C 0022F038 10073411 !Rf_eval 
0022F038 10080C5A 024F6E40 017D6074 024F6E24 0242FA0C !do_begin 
0022F138 100838AB 024F6E40 0242FA0C 0242F478 0242FA0C !Rf_eval 
0022F228 100A4FC1 0242F478 024F44C0 0243069C 02430798 !Rf_applyClosure 
0022F278 100A5605 0243069C 02430798 0242F424 023D25B8 !do_internal 
0022F4C8 100A5A7A 0260D6F8 017FA400 02665880 017CB3A0 !Rf_usemethod 
0022F508 10080C5A 02665880 017E6880 02665848 02430798 !do_usemethod 
0022F608 10080C5A 02665880 02430798 026644F0 02430798 !Rf_eval 
0022F708 100826D5 0266450C 02430798 0022F738 10073411 !Rf_eval 
0022F738 10080C5A 02664544 017D6074 02664528 02430798 !do_begin 
0022F838 100838AB 02664544 02430798 02430648 02430798 !Rf_eval 
0022F928 100809F0 02430648 026639D8 0243069C 017E89FC !Rf_applyClosure 
0022FA28 10099246 02430648 017E89FC 0022FA70 00000001 !Rf_eval 
0022FA58 10099377 017E89FC 00000000 00000000 0022FA70 !Rf_ReplIteration 
0022FEA8 100995F7 00000000 00404010 0022FED8 0040135A !Rf_ReplIteration 
0022FEB8 0040135A 00000000 004723F0 00000000 00472400 !run_Rmainloop 
0022FED8 004012C5 00000001 004723F0 00000001 7C5C1F44 !<nosymbols> 
0022FEF8 0040151A 00400000 00000000 00232439 00000001 !<nosymbols> 
0022FF78 004011E7 00000001 004723F0 00472C78 00404000 !<nosymbols> 
0022FFB0 00401258 00000002 00000009 0022FFF0 7C59893D !<nosymbols> 
0022FFC0 7C59893D 00000000 00000000 7FFDF000 80000003 !<nosymbols> 
0022FFF0 00000000 00401240 00000000 000000C8 00000100
kernel32!ProcessIdToSessionId

Thanks,
Rich

--please do not edit the information below--

Version:
 platform = i386-pc-mingw32
 arch = i386
 os = mingw32
 system = i386, mingw32
 status = 
 major = 2
 minor = 1.0
 year = 2005
 month = 04
 day = 18
 language = R

Windows 2000 Professional (build 2195) Service Pack 4.0

Search Path:
 .GlobalEnv, package:methods, package:stats, package:graphics,
package:grDevices, package:utils, package:datasets, Autoloads,
package:base

-- 
Rich FitzJohn
rich.fitzjohn <at> gmail.com   |    http://homepages.paradise.net.nz/richa183
                      You are in a maze of twisty little functions, all alike


[Rd] Rgui crash when >1 figure plotted to single wmf file (PR#7821)
rich.fitzjohn@gmail.com