[bt-devel] Crash in Bookshelf Manager with Xiphos module

Gary Holmlund gary.holmlund at gmail.com
Sun Jan 16 22:10:06 MST 2011


I was running Fedora 14 and was pleased to notice that an update of 
Bibletime just came through. It was from 2.7.3 to 2.8.0. I was searching 
to find something about the package person for Fedora and I ran across a 
Bibletime crash in the Fedora bugzilla system.

https://bugzilla.redhat.com/show_bug.cgi?id=665712

I was able to reproduce the bug in the latest code in both Fedora and 
Windows. Using the bookshelf manager, just change to Xiphos as the 
source. You might have to hit refresh.

The crash is on line 154 of cswordmoduleinfo.cpp
sword::ConfigEntMap config = 
backend()->getConfig()->Sections.find(name().toUtf8().constData())->second;

The Sections.find is returning an invalid iterator for a module which is 
know to be in the Sections map. The name stored in the Sections map is 
slightly different than the name to be found.
"CitireÎntr-unAn" name stored in the Sections map
"CitireÃŽntr-unAn" name returned by name().toUtf8()

I note that if I change from .toUtf8 to .toLatin1 the search finds the 
module. I am not sure that this is the right fix. I am wondering if the 
name of the module in the Xiphos repository is not valid in utf8, and 
therefore is incorrect.

I can put a test into cswordmoduleinfo.cpp so it does not crash, but I 
am wondering about the utf8 versus latin1 issue. What are your thoughts?

Gary







More information about the bt-devel mailing list