Re: [Rdkit-devel] testMolSupplier issue (SDMolSupplier patch)
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Greg L. <gre...@gm...> - 2011-08-15 05:41:04
|
Riccardo,
On Sun, Aug 14, 2011 at 9:54 AM, Riccardo Vianello
<ric...@gm...> wrote:
>
> on Fedora 15 (gcc 4.6.0) testMolSupplier seems to hang forever inside
> testGetItemText(), this way blocking tests execution.
>
> I tracked the problem to line 1422
>
> try {
> molB=sdsup.getItemText(16); // <- here
> ok = false;
> } catch (FileParseException &) {
>
> Inside sdsup.getItemText(16), a call to SDMolSupplier::moveTo() never
> stops trying to read lines from the stream, and I think this is
> related to some changes in the behavior of the streams in gcc 4.6.0
> and the initial call to seekg() performed on a stream that was put
> into a not-good state (eof) by the earlier test case (mol1 =
> sdsup[15]; testMolSupplier.cpp:1414). I made a few tests and it seems
> that clearing the stream prior to calling seekg() produces the
> expected behaviour (mainly for clarity, I'm attaching a small patch).
Thanks for the patch. I made similar changes to SmilesMolSupplier and
TDTMolSupplier and checked them in this morning.
-greg
|