[sword-devel] RC - odd bug, diatheke, lookup, probably engine rather than utilities.
Troy A. Griffitts
scribe at crosswire.org
Thu Nov 2 19:40:20 MST 2017
OK, I can't blame Peter anymore since Greg also found the '2's. :)
So, I hunted this one down. Odd problem...
We 'fixed' a bug which was incorrectly checking for file open errors.
We were already sending the error code to logError when there was an error.
Well, we now detect file open errors occasionally. Sometimes we don't
care and sometimes we do. I've done '2' things to fix the problem.
1) changed the output to something more informative: "Failed to open
file %s. errno: %d"
2) changed the log level to debug.
If you're interested in the details (and Peter might want to be here).
When creating a SWModule against a remote repository, we only have the
.conf file, not the actual module, so we won't find the actual data
files. This is fine and expected. This is why Greg was getting the '2'
output using installmgr. He was working with remote repositories.
Why Peter was getting the error on examples/cmdline/lookup is beyond
me. That probably means that he has a module installed which actually
can't find one of its data files.
I've added a small but convenient mechanism to set SWORD's log level
from the environment: either by setting the env variable SWORD_LOGLEVEL
or in a [SWORD] section in your sword.conf (usually at /etc/sword.conf)
with parameter LogLevel, e.g.:
[SWORD]
LogLevel=DEBUG
So, Peter, if you'd like to see which files SWORD can't find, you can try:
SWORD_LOGLEVEL=DEBUG ./lookup KJV Gen.1.1
In the future, we might tell SWMgr that it is operating in 'remote' mode
and not to even look for data files, and additionally, delaying part of
the construction of the SWModule instances (i.e., not looking for data
files until actual data access time) would also speed things up and
prevent much of this, and then maybe we could put this back to logError
and might find always tell Peter he has missing data files :)
But, for today, this is better than the 1.7.x branch which had a flat
out bug in the way it was testing for errors, and now that the bug is
fixed, 'errors' are going to logDebug for now. And now you can more
easily set SWORD's log level.
Troy
On 11/02/2017 07:26 AM, Greg Hellings wrote:
> Correction, it's the "installmgr -ri CrossWire KJV" command that
> generates a wall of "2" output.
>
> --Greg
>
> On Thu, Nov 2, 2017 at 9:19 AM, Greg Hellings <greg.hellings at gmail.com
> <mailto:greg.hellings at gmail.com>> wrote:
>
> I should not that this is in SVN HEAD in my case, not the RC.
>
> --Greg
>
> On Thu, Nov 2, 2017 at 9:19 AM, Greg Hellings
> <greg.hellings at gmail.com <mailto:greg.hellings at gmail.com>> wrote:
>
>
>
> On Thu, Nov 2, 2017 at 7:15 AM, Peter Von Kaehne
> <refdoc at gmx.net <mailto:refdoc at gmx.net>> wrote:
>
> I noticed this first on svn head in my normal source
> directory where I also work - so I suspected that it was
> my fault from something I did not remember I had done at
> some point somewhere. So I downloaded your RC tar ball and
> compiled that in a separate location + run it in place
> (see the paths on my terminal output snippets. It had the
> same result. So, I think I have nothing left I could do to
> avoid contamination by any odd tests I might have added or
> introduced. I had that output both with existing modules
> and with testing with modules I do not actually have - so
> I will get just the two "2"s and then nothing after that
> on the diatheke.
>
>
> While I'm configuring up Jenkins, I've noticed the 2 being
> output 144 times from a call to "installmgr -init" before the
> app itself gives its normal output in my test scripts.
>
> --Greg
>
>
> Peter
>
> > Gesendet: Donnerstag, 02. November 2017 um 00:44 Uhr
> > Von: "Troy A. Griffitts" <scribe at crosswire.org
> <mailto:scribe at crosswire.org>>
> > An: sword-devel at crosswire.org
> <mailto:sword-devel at crosswire.org>
> > Betreff: Re: [sword-devel] RC - odd bug, diatheke,
> lookup, probably engine rather than utilities.
> >
> > Peter, I am not getting the '2' output you are getting.
> Are you sure
> > you are not compiling against any change you've made and
> installed on
> > your own box? Or that your shell isn't doing something
> strange?
> >
> > Is anyone else seeing this problem?
> >
> > Troy
> >
> >
> > On 11/01/2017 04:35 PM, Peter von Kaehne wrote:
> > > Diatheke spits out two '2' with a linefeed each. Prior
> to every single
> > > query I have thrown at it. Example below:
> > >
> > >
> > > peter at thinkpad-x250:~/Source/sword-1.8/sword-
> > > 1.7.904/utilities/diatheke$ ./diatheke -b KJV -k Gen.1.1
> > > 2
> > > 2
> > > Genesis 1:1: <w savlm="strong:H07225">In the
> beginning</w> <w
> > > savlm="strong:H0430">God</w> <w savlm="strong:H0853
> > > strong:H01254">created</w> <w
> savlm="strong:H08064">the heaven</w> <w
> > > savlm="strong:H0853">and</w> <w
> savlm="strong:H0776">the earth</w>.
> > > (KJV)
> > >
> > > "lookup" in ./examples has the same odd behaviour
> > >
> > >
> peter at thinkpad-x250:~/Source/sword-1.8/sword-1.7.904/examples/cmdline$
> > > ./lookup KJV "Gen.1.1"
> > > 2
> > > 2
> > > ==Raw=Entry===============
> > > Genesis 1:1:
> > > <w lemma="strong:H07225">In the beginning</w> <w
> > > lemma="strong:H0430">God</w> <w lemma="strong:H0853
> strong:H01254"
> > > morph="strongMorph:TH8804">created</w> <w
> lemma="strong:H08064">the
> > > heaven</w> <w lemma="strong:H0853">and</w> <w
> lemma="strong:H0776">the
> > > earth</w>.
> > > ==Render=Entry============
> > > .divineName { font-variant: small-caps; }
> > > .wordsOfJesus { color: red; }
> > > .transChange { font-style: italic;}
> > > .transChange.transChange-supplied {
> font-style:
> > > italic;}
> > > .transChange.transChange-added {
> font-style: italic;}
> > >
> .transChange.transChange-tenseChange::before { content:
> > > '*';}
> > > .transChange:lang(zh) { font-style:
> normal; text-
> > > decoration : dotted underline;}
> > > .overline { text-decoration:
> overline; }
> > >
> > >
> > > _______________________________________________
> > > sword-devel mailing list: sword-devel at crosswire.org
> <mailto:sword-devel at crosswire.org>
> > > http://www.crosswire.org/mailman/listinfo/sword-devel
> <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
> <mailto:sword-devel at crosswire.org>
> > http://www.crosswire.org/mailman/listinfo/sword-devel
> <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
> <mailto:sword-devel at crosswire.org>
> http://www.crosswire.org/mailman/listinfo/sword-devel
> <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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20171102/757c837f/attachment-0001.html>
More information about the sword-devel
mailing list