Just ran osis2mod from SWORD version 1.5.11 to create a module which ran fine so it can't be the XML source. And even if the problem would be in the XML source osis2mod shouldn't crash with segmentation fault. It is hard for me to track down this problem and I guess someone with more knowledge of the SWORD engine has to help here. I suspect that somewhere either in osis2mod or in the engine is a problem.

I've also compiled versions of 1.6.0 and 1.5.11 on Ubuntu 9.04 and ran osis2mod which produced the same result. 1.5.11 worked, 1.6.0 not but here it stopped at book Hosea already where with the latest SVN head crashed at Joel.

btw: why are only the old binaries of SWORD 1.5.9 available as package on Ubuntu?


Cheers,
Manfred


Am 17.07.2009 um 13:52 schrieb Manfred Bergmann:

Are you actually able to reproduce?


Manfred


Am 05.07.2009 um 22:30 schrieb Manfred Bergmann:

Sure, you should have the OSIS XML in you mail.


Thanks,
Manfred


Am 05.07.2009 um 21:01 schrieb Troy A. Griffitts:

Manfred,

Is there a snippet of the input file that always causes the crash that you could send so I could try to debug?

Thanks for looking into this.

        -Troy.



Manfred Bergmann wrote:
I've tried to debug it so here comes some more information.
The function stacktrace is like this:
main()
processOSIS()
handleToken()
sword::ListKey::increment()
sword::SWKey::operator++
sword::VerseKey::increment()
sword::VerseKey::Index()
[snip...]
around 130000 of those recursive calls in:
----
initBounds();
if (i > upperBound) {
=>    i = Index(upperBound);
 error = KEYERR_OUTOFBOUNDS;
----
looks like upperBound doesn't get initialized correctly so that another call to Index() happens.
[snap...]
sword::VerseKey::initBounds()
sword::SWKey::setLocale()
sword::stdstr()
in stdstr() a EXC_BAD_ACCESS signal is raised here:
delete [] *ipstr;
I believe this problem is because the stack is full due to the depth of the recursion. The question is why is this recursion happening and why is upperBound not initialized correctly. The program runs fine until book Joel. Those are the last lines console lines with debug flag 1|256:
-----------
DEBUG(WRITE): Joel.3.2:Joel.3.2: Sogar über die Sklaven und Sklavinnen werde ich dann meinen Geist ausgießen. DEBUG(WRITE): Joel.3.3:Joel.3.3: Am Himmel und auf der Erde werde ich wunderbare Zeichen wirken: Blut, Feuer und Rauchwolken.
DEBUG(STACK): Joel.3.5: push (4) note
DEBUG(STACK): Joel.3.5: pop(4) note
DEBUG(WRITE): Joel.3.4:Joel.3.4: Die Sonne wird sich in Finsternis verwandeln und der Mond in Blut, bevor der große und furchtbare Tag Jahwes kommt. DEBUG(WRITE): Joel.3.5:Joel.3.5: Dann wird jeder, der den Namen Jahwes anruft, gerettet werden <note n="1" osisID="Joel.3.5!1" osisRef="Joel.3.5">Die Verse 1-5 werden von Petrus während seiner Pfingstpredigt zitiert (). Vers 5 wird außerdem von Pauluszitiert.</note>, denn auf dem Berg Zion und in Jerusalem wird es Rettung geben, wie Jahwe angekündigt hat. Bewahrt wird jeder, den Jahwe beruft. <chapter eID="gen23315" osisID="Joel.3"/>
-----------
Any ideas?
Manfred
Am 04.07.2009 um 19:52 schrieb Manfred Bergmann:
Hi.

While creating an update of a module I encountered a segmentation fault of osis2mod build of the latest svn HEAD.
What do I need to do to help fix it?

That's the backtrace of gdb:
(gdb) bt
#0  0x946bb42c in szone_free ()
#1  0x946bb38d in free ()
#2  0x00206a0d in sword::stdstr ()
#3  0x001f9c4f in sword::SWKey::setLocale ()
#4  0x001ffd04 in sword::VerseKey::initBounds ()
#5  0x00203f25 in sword::VerseKey::Index ()

sword::VerseKey::Index() is repeated until you press CTRL-C.
The seg fault might be because of a recursion problem which makes the stack full?


Manfred

_______________________________________________
sword-devel mailing list: sword-devel@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@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@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@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@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@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to