[sword-devel] possibly bug of Sword 1.5.8 found?

Pham, Khoi Khoi.Pham at shawgrp.com
Tue Apr 12 13:00:03 MST 2005


I got it run and here are the results.

Paul
-----Original Message-----
From: sword-devel-bounces at crosswire.org
[mailto:sword-devel-bounces at crosswire.org] On Behalf Of Troy A.
Griffitts
Sent: Tuesday, April 12, 2005 2:24 PM
To: SWORD Developers' Collaboration Forum
Subject: Re: [sword-devel] possibly bug of Sword 1.5.8 found?

The LD module driver uses a binary search algol to lookup a key.  The 
infinite loop suggests that the module is not in alphabetical order.  My

first impression is that the bug could be caused by a few things:

	The StringMgr used to read the module alphabetized differently
than the 
string functions used to create the module

	The write method is broken, not adding in order correctly.
	The binary search algol is broken.

	Could either of you find a module (preferably one with letters
that I 
can read :) ) and exact entry it gets stuck on?  Code something like:

	mod.setKey("XYY");
	mod++;	// fails here.

would be great!  I'll try to look into the problem if we can nail down a

case like this.  Also please be sure to report what StringMgr you are 
using.  Thanks for the report!

		-Troy.



Martin Gruner wrote:
> Hi,
> 
> I noticed that opening certain lexicons does not work atm. I tried it
with 
> ZhEnglish. BibleTime loops through all lexicon entries first and
creates a 
> cache file (delete this for testing). It is an endless loop, however:
> 
> (BibleTime 1.5pre) WARNING: Entry: 1 00 MILLION
> (BibleTime 1.5pre) WARNING: Entry: 1 5TH PARTY CONGRESS
> (BibleTime 1.5pre) WARNING: Entry: 1 CHRONICLES
> (BibleTime 1.5pre) WARNING: Entry: 1 CORINTHIANS
> (BibleTime 1.5pre) WARNING: Entry: 1 JOHN
> (BibleTime 1.5pre) WARNING: Entry: 1 KINGS
> (BibleTime 1.5pre) WARNING: Entry: 1 PETER
> (BibleTime 1.5pre) WARNING: Entry: 1 SAMUEL
> (BibleTime 1.5pre) WARNING: Entry: 1 THESSALONIANS
> (BibleTime 1.5pre) WARNING: Entry: 1 TIMOTHY
> (BibleTime 1.5pre) WARNING: Entry: 1-3 A.M.
> (BibleTime 1.5pre) WARNING: Entry: 1-3 P.M.
> (BibleTime 1.5pre) WARNING: Entry: 10 OF A PECK
> (BibleTime 1.5pre) WARNING: Entry: 10 PECKS
> (BibleTime 1.5pre) WARNING: Entry: 10 PERCENT
> (BibleTime 1.5pre) WARNING: Entry: 100 MU
> (BibleTime 1.5pre) WARNING: Entry: 100-METER DASH
> (BibleTime 1.5pre) WARNING: Entry: 1000 TONS
> (BibleTime 1.5pre) WARNING: Entry: 10000
> (BibleTime 1.5pre) WARNING: Entry: 105 BILLION
> (BibleTime 1.5pre) WARNING: Entry: 10TH EARTHLY BRANCH
> (BibleTime 1.5pre) WARNING: Entry: 10TH HEAVENLY STEM
> (BibleTime 1.5pre) WARNING: Entry: 11 A.M.-1 P.M.
> (BibleTime 1.5pre) WARNING: Entry: 11 P.M.-1 A.M.
> (BibleTime 1.5pre) WARNING: Entry: 11TH EARTHLY BRANCH
> (BibleTime 1.5pre) WARNING: Entry: 12
> (BibleTime 1.5pre) WARNING: Entry: 1 00 MILLION
> 
> The corresponding code is this:
> 
> do {
>   if (isUnicode()) {
>     m_entryList->append(QString::fromUtf8(module()->KeyText()));
>   }
>   else { //for latin1 modules use fromLatin1 because of speed
>     m_entryList->append(QString(module()->KeyText()));
>   }  			
>   (*module())++;
> } while ( !module()->Error() );
> 
> So this looks like (on first sight) it might be a Sword bug.
> 
> mg
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

_______________________________________________
sword-devel mailing list: sword-devel at crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page





-----------------------------------------
*****************Internet Email Confidentiality Footer******************
Privileged/Confidential Information may be contained in this message.    If
you are not the addressee indicated in this message (or responsible   for
delivery of the message to such person), you may not copy or deliver  this
message to anyone. In such case, you should destroy this message  and
notify the sender by reply email. Please advise immediately if you  or your
employer do not consent to Internet email for messages of this  kind.
Opinions, conclusions and other information in this message that  do not
relate to the official business of The Shaw Group Inc. or its  subsidiaries
shall be understood as neither given nor endorsed by it.
________________________________________________________________________
The Shaw Group Inc.  http://www.shawgrp.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: philpot.dat
Type: application/octet-stream
Size: 651678 bytes
Desc: philpot.dat
Url : http://www.crosswire.org/pipermail/sword-devel/attachments/20050412/7b8bdc97/philpot-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: philpot.idx
Type: application/octet-stream
Size: 2196 bytes
Desc: philpot.idx
Url : http://www.crosswire.org/pipermail/sword-devel/attachments/20050412/7b8bdc97/philpot-0003.obj


More information about the sword-devel mailing list