[R] cairo_pdf crashing R on Windows

2014-09-12 Thread Kevin Wright
I'm having trouble with cairo_pdf crashing R on Windows.

How can I debug this?  This is a exited abnormally type crash, so I can't
drop into the browser and look at the call stack.

Kevin


-- 
Kevin Wright

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] cairo_pdf crashing R on Windows

2014-09-12 Thread Henrik Bengtsson
First try a newer version of R, e.g. most recent patched and/or devel
version.  If that doesn't help, record sessionInfo() before calling
cairo_pdf() and before the crash. Try to find a minimal example and a
minimal figure for which you can reproduce this on your setup.  If it
only occurs occasional still try to identify an example where it
happens if you call it, say 100 times.  When you've done that share
you experience here for others to try to reproduce it.

/Henrik
(not using cairo_pdf() on a regular basis so haven't had any problems)

On Fri, Sep 12, 2014 at 11:12 AM, Kevin Wright kw.s...@gmail.com wrote:
 I'm having trouble with cairo_pdf crashing R on Windows.

 How can I debug this?  This is a exited abnormally type crash, so I can't
 drop into the browser and look at the call stack.

 Kevin


 --
 Kevin Wright

 [[alternative HTML version deleted]]

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] cairo_pdf crashing R on Windows

2014-09-12 Thread Duncan Murdoch

On 12/09/2014 2:12 PM, Kevin Wright wrote:

I'm having trouble with cairo_pdf crashing R on Windows.

How can I debug this?  This is a exited abnormally type crash, so I can't
drop into the browser and look at the call stack.


This is getting into R-devel territory, but if Henrik's suggestions 
aren't enough, here are some more:


1.  Make the crash reproducible, and the trigger code as simple as 
possible.  If you can succeed in this and submit a bug report on 
bugs.r-project.org and someone in R Core can use your code to trigger a 
crash, that alone will be very helpful.


2.  Run under a debugger.  gdb is available for Windows, although it's 
not the easiest debugger in the world to use.  It's a lot easier if you 
can do a build of R with debugging information (not the default in 
Windows).  You do this by setting the environment variable DEBUG to T, 
and rebuilding R.  If you're lucky, gdb will identify which source line 
triggered the crash, and that might be enough (if you examine the source 
code carefully) to find the cause.


You might want to trigger the bug on a different platform; generally the 
debugging tools that work with R work better on Unix-alikes than on Windows.


3.  At this point you're rebuilding R, so if gdb wasn't enough to tell 
you what's going on, start sticking Rprintf() calls into the R source to 
see if you can find where things start to go wrong.  It's slow work, 
because you'll do a lot of rebuilds until you track down the bug.


I hope that helps.  Remember, even completing step 1 will be very 
helpful for others.  Actually tracking down and fixing the bug would be 
wonderful.


Duncan Murdoch

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.