[sword-devel] Notes on the search progress bug

Troy A. Griffitts sword-devel@crosswire.org
Fri, 27 Oct 2000 18:55:15 -0700

This is good information.  I have placed a few new things in
 o A check to only call custom percentage function if the percentage
value is different than last.
 o An error check if the value is smaller than last.

I was wondering if you could make it break and send me the output (only
the first few instances) that you receive.  Thanks!!!  I appreciate you
digging for this.


PS.  Ideally if you could produce it with examples/cmdline/search, that
would be best for me.  Otherwise, I believe it might be a thread issue.

> I tracked the bug down to this::
>         -It does only occur with non-indexed bibles using case-_sensitive_ search
> and multiple words (the function SWModule::search is called). Mabe exact
> match will also lead the te bug, but I don't know.
>         -Mainly you use "percent = 100 * vkcheck->NewIndex() / highIndex"
>         The values of highIndex should be everytime higher than vkcheck->NewIndex,
> right?
>         But if you check highIndex and vkcheck->NewIndex() in the seaech loop that
> vkcheck->NewIndex() will be much higher than highIndex, this is leadiung to
> the error.
> I can't find a solution for this, do you find one?
> Does NewIndex() return a wrong value? It looks like it returns only the
> idex of the Old Testament.
> --Joachim