[sword-devel] SwordReader - problem with Rev 22

David Trotz dtrotzjr at crosswire.org
Fri Dec 28 00:12:08 MST 2007

I found the error. The problem is with the way the state information for 
the current book is being stored. There is a variable in SwordIndex 
called bible, (I assume this was created for convenience.)  but this 
same information exists in the VerseKey variable named 'position'. I 
need to go through the code and remove the dependency on this lone 
'book' variable because it is not always changed (thus not up to date) 
when the verse is set, such as when I read in the last position from 
options.conf and set the position in the SimpleNavigator constructor.

What was happening was the book was erroneously set to book 1 
(SwordIndex constructor default value) but the VerseKey was set 
correctly to "Rev" and when it was asked how many verses are in chapter 
22 of Revelation, the question really being asked was how many verses in 
chapter 22 of Genesis, and that value was 30 something, and there are 
only 20 something verses in chapter 22 so it would increment to the next 
verse, setting up the perfect storm for an infinite loop. ;-)

Its going to take me a couple of days to get this fixed correctly. I 
have an initial fix on my machine now but it was more a hack to be sure 
this was the case.

Thanks again for pointing that out.

In Christ,
David Trotz

Barry Drake wrote:
> Hi David ..........
> David Trotz wrote:
>> Did it happen during the startup of the program? If so do you have 
>> the options.conf?
> Oh yes ....  I won't make that mistake again!!!  I've attached it and 
> it's what you'd expect it to be.
> God bless,
> Barry
> -- From Barry Drake (The Revd) minister of the Netherfield United 
> Reformed church, Nottingham see http://www.jesusinnetherfield.org.uk 
> for our church homepages).
> Replies - b.drake at ntlworld.com
> ------------------------------------------------------------------------
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/sword-devel/attachments/20071227/ff1bf4e9/attachment.html 

More information about the sword-devel mailing list