[Rdkit-devel] testMolSupplier issue (SDMolSupplier patch)
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Riccardo V. <ric...@gm...> - 2011-08-14 07:55:01
|
Hi Greg,
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).
Regards,
Riccardo
|