[From nobody Wed Aug 15 16:55:58 2007 From: Karl Kleinpaste <karl@kleinpaste.org> To: sword-bugs@crosswire.org Subject: sword key init bug tripped by refdoc's farsi "TPV" module Date: Wed, 15 Aug 2007 16:37:09 -0400 Message-ID: <yu0absssfey.fsf@mesquite.kleinpaste.org> MIME-Version: 1.0 Peter von Kaehne ("refdoc") has produced a Farsi Bible module, "TPV", with which I am experimenting in latest GnomeSword. Mostly, things are fine, but the module is inducing a core dump way down in Sword key initialization, only when bringing up Rev 1. Jude and Rev 2 are both fine, indeed any other chapter seems fine. Stack trace begins: Program received signal SIGSEGV, Segmentation fault. #0 0x06998fe1 in sword::VerseKey::init () from /usr/lib/libsword-1.5.9.so #1 0x0699afa2 in sword::VerseKey::VerseKey () from /usr/lib/libsword-1.5.9.so #2 0x0699b240 in sword::VerseKey::initBounds () from /usr/lib/libsword-1.5.9.so #3 0x0699b2f8 in sword::VerseKey::UpperBound () from /usr/lib/libsword-1.5.9.so #4 0x0699b779 in sword::VerseKey::Normalize () from /usr/lib/libsword-1.5.9.so #5 0x0699873b in sword::VerseKey::AutoNormalize () from /usr/lib/libsword-1.5.9.so #6 0x080d1f82 in getZeroContent (imodule=@0xb2e7560, cache_flags=0, swbuf=@0xb31d524, mod=0xa7e2e98) at display.cc:670 getZeroContent() is a function to obtain "0:0" content, that is, book (and chapter, "n:0") headers. This function operates just fine in any other module I have on hand which has such headers, e.g. KJV and DM's beta NASB. The code in getZeroContent() begins mod->setKey(imodule.getKey()); VerseKey *key = (VerseKey *)(SWKey *)*mod; int chapter = key->Chapter(); char oldAutoNorm = key->AutoNormalize(); key->AutoNormalize(0); I wonder if someone familiar with key init issues could pick up this module and trace through its use in Rev 1 to find why it has a problem there and only there. It can be found at ftp.kleinpaste.org in /pub/sword; this is a Sword-ready repository, so your module manager can pick it up the easy way, or else just go in via ftp and get the *.zip the hard way from the "zip" subdir. I have to say, seeing this module displayed on my screen makes me wish I could read Farsi. Good job, Peter. ]