From bibiko at eva.mpg.de  Fri Jan 13 14:06:46 2012
From: bibiko at eva.mpg.de (=?iso-8859-1?Q?Hans-J=F6rg_Bibiko?=)
Date: Fri, 13 Jan 2012 14:06:46 +0100
Subject: [Rd] checkRd freezes while parsing erroneous preprocessor macros
Message-ID: <77DF0CE8-2DC6-4DB2-AEB0-7C68D6EC9DEF@eva.mpg.de>

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?

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


[Rd] checkRd freezes while parsing erroneous preprocessor macros
=?iso-8859-1?Q?Hans-J=F6rg_Bibiko?=