[sword-devel] osis2mod segfault

Manfred Bergmann bergmannmd at web.de
Fri Jul 17 05:52:32 MST 2009


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 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
>>
>>
>> _______________________________________________
>> 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




More information about the sword-devel mailing list