[R] R crashes with "Error in UseMethod("depth")" when resizing ggplot windows

348 views
Skip to first unread message

Eike Petersen

unread,
Feb 24, 2015, 4:16:22 PM2/24/15
to r-h...@r-project.org
Hello everyone,

Quite frequently I encounter crashes when resizing ggplot windows. The
error message is always as follows:

> Error in UseMethod("depth") :
> no applicable method for 'depth' applied to an object of class "NULL"
>
> Process R exited abnormally with code 255 at Tue Feb 24 21:51:18 2015

The error seems to occur rather unpredictably when I do several
resizings, e.g. moving a plot window from one monitor to another using
Windows+Arrow Key several times. It only seems to happen when plotting
rather large data frames.

I was about to file this as a ggplot2 issue, but then I realized that I
can't reproduce it using RStudio - normally, I use emacs/ESS (on Windows
7). So maybe this is a bug related to the "plot engine"...? The problem
is that I can't even do a traceback(), since R is crashed.

How should I proceed? Are there any other options to retrieve valuable
debug information?

Kind regards,
Eike

______________________________________________
R-h...@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Duncan Murdoch

unread,
Feb 24, 2015, 6:26:13 PM2/24/15
to Eike Petersen, r-h...@r-project.org
On 24/02/2015 4:13 PM, Eike Petersen wrote:
> Hello everyone,
>
> Quite frequently I encounter crashes when resizing ggplot windows. The
> error message is always as follows:
>
>> Error in UseMethod("depth") :
>> no applicable method for 'depth' applied to an object of class "NULL"
>>
>> Process R exited abnormally with code 255 at Tue Feb 24 21:51:18 2015
>
> The error seems to occur rather unpredictably when I do several
> resizings, e.g. moving a plot window from one monitor to another using
> Windows+Arrow Key several times. It only seems to happen when plotting
> rather large data frames.
>
> I was about to file this as a ggplot2 issue, but then I realized that I
> can't reproduce it using RStudio - normally, I use emacs/ESS (on Windows
> 7). So maybe this is a bug related to the "plot engine"...? The problem
> is that I can't even do a traceback(), since R is crashed.
>
> How should I proceed? Are there any other options to retrieve valuable
> debug information?

It's not easy, but you can run R under a debugger, and it will show you
the location of the crash. As far as I know only gdb supports debugging
R on Windows (there's a copy in the Rtools collection), but perhaps that
will change now that Microsoft has purchased Revolution Analytics.

Duncan Murdoch
Reply all
Reply to author
Forward
0 new messages