[sword-devel] Problems with the Hitchcocks and Smith lexicons
Joachim Ansorg
sword-devel@crosswire.org
Tue, 11 Dec 2001 10:35:02 +0100
Hi!
I'm doing some bug-fixing in BibleTime. We have the bug that opening the
Hitchcocks and the Smith lexicons will lead to an infinite loop. Other
lexicons like ISBE or Eastons open just fine.
we execute te following (in bibletime/backend/cswordbiblemoduleinfo.cpp):
module()->KeyText(" "); //set first key
[...]
do {
//append key to our list
m_entryList->append(QString::fromUtf8(module()->KeyText()));
(*module())++;
//debug to console
qDebug("entry is now %s", module()->KeyText());
} while (!module()->Error());
The Hitchcocks module outputs this using the code above:
[...]
(BibleTime 1.1pre) Debug: entry is now J
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAAKOBAH
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAALA
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAALAM
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAANAI
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAASAU
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAASIEL
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAAZAH O
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAAZANIAH
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now J
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAAKOBAH
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAALA
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAALAM
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAANAI
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAASAU
(BibleTime 1.1pre) Debug: ++module now!
(BibleTime 1.1pre) Debug: entry is now JAASIEL
and so on
As you can see the teh loop runs until it reaches "JAAZANIAH" and starts then
AGAIN with "J" and repeats this until I kill BibleTime!
The Smith lexcion has the same problem.
I think this is a bug in Sword. Is this true?
Can somebody have a look at it? Troy? Chris? I'm not familair with the
classes and the index files of lexicons.
I'd be really glad to get some help with this!
Joachim