From jeroenooms at gmail.com  Mon Dec 15 04:54:03 2014
From: jeroenooms at gmail.com (Jeroen Ooms)
Date: Sun, 14 Dec 2014 19:54:03 -0800
Subject: [Rd] Significant memory leak when using XML on Windows
In-Reply-To: <CAGmpuegAhR64N=2RGm3YrHVBz2ABOL=wBT2FdNjzvW8xAbcTUw@mail.gmail.com>
References: <CAGmpuegAhR64N=2RGm3YrHVBz2ABOL=wBT2FdNjzvW8xAbcTUw@mail.gmail.com>
Message-ID: <CABFfbXscR5BxyTj2n_Vm+yubv4065FPrbfRg3AEt7+BUmXdkfw@mail.gmail.com>

On Thu, Dec 11, 2014 at 12:13 PM, Janko Thyson <janko.thyson at gmail.com>
wrote:
>
> I'd so much appreciate if someone could have a look at this. If I can be of
> any help whatsoever, please let me know!
>

Your current code uses various functions from XML and rvest so it is not a
*minimal* reproducible example. Even if you are unfamiliar with C, you
should be able to investigate exactly which function in the XML package you
think has issues. Once you found the problematic R function, inspect the
source code or use debug() to see if you can narrow it down even further,
preferably to a particular call to C.

Moreover you should create a reproducible example that allows us (and you)
to test if this problem appears on other systems such as OSX or linux.
Development and debugging on Windows is very painful so your windows-only
example is not too helpful. Making people use windows is not a good
strategy for getting help.

If the "leak" does not appear on other systems, it is likely a problem in
the libxml2 windows library on cran. In that case we can try to link
against another build. On the other hand, if the problem does appear across
systems, and you have provided a minimal reproducible example that
pinpoints the problematic C function, we can help you review/debug the code
C to see if/where some allocated object is not properly freed.

	[[alternative HTML version deleted]]



[Rd] Significant memory leak when using XML on Windows
Jeroen Ooms