Re: [Rd] checkRd freezes while parsing erroneous preprocessor macros

From: Duncan Murdoch <murdoch.duncan_at_gmail.com>
Date: Fri, 13 Jan 2012 08:45:34 -0500

On 13/01/2012 8:06 AM, Hans-Jörg Bibiko wrote:
> Dear developers,
>
> I came across with a bug while parsing Rd files.
>
> Given is the following minimal Rd file:
>
> ----
> \name{foo}
> \title{foo}
> \description{
> #ifdef windows
> win
> #endifd
> #ifdef unix
> unix
> #endif
> }
> ----
>
> By accident I have a typo at line 6, instead of having #endif I typed #endifd.
>
> If I run checkRd(), parse_Rd(), Rd2HTML(), or others including the command line "R CMD Rconv" R will freeze and the only chance I have is to kill R.
>
> As far as I can tell for checkRd() the problem is the internal function prepare_Rd() which runs for ever.
>
> Is there a way to avoid having that freezing behaviour?

The obvious way is not to have the typo in your file, but I'll look into what's causing it so you're allowed to have errors.

Duncan Murdoch

> I'm on a Mac running Snow Leopard:
>
> R version 2.14.0 (2011-10-31)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] en_GB.UTF-8/en_US.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
>
> attached base packages:
> [1] tools stats graphics grDevices utils datasets methods base
>
>
> Many thanks in advance,
> --Hans
> ______________________________________________
> R-devel_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 13 Jan 2012 - 13:50:02 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 13 Jan 2012 - 22:50:09 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive