Eike Petersen
2015-Feb-24 21:13 UTC
[R] R crashes with "Error in UseMethod("depth")" when resizing ggplot windows
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 2015The 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
Duncan Murdoch
2015-Feb-24 23:23 UTC
[R] R crashes with "Error in UseMethod("depth")" when resizing ggplot windows
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