[bt-devel] Crash in Sword lib on Windows

Gary Holmlund gary.holmlund at gmail.com
Fri Oct 23 21:25:30 MST 2009


After trying many times I finally got a crash in debug mode while 
installing modules. I had just finished installing the 6th module after 
starting with no modules installed.

Call stack:
  libsword.dll!sword::FileMgr::sysOpen(sword::FileDesc * 
file=0x069a7340)  Line 203 + 0x19 bytes    C++       // crash in this 
function
  libsword.dll!sword::FileDesc::getFd()  Line 126 + 0xf bytes    C++
  libsword.dll!sword::SWConfig::Load()  Line 57 + 0x8 bytes    C++
  libsword.dll!sword::SWConfig::SWConfig(const char * 
ifilename=0x069d40a8)  Line 37    C++
  libsword.dll!sword::SWMgr::loadConfigDir(const char * 
ipath=0x025c8bb8)  Line 679 + 0x14 bytes    C++
  libsword.dll!sword::SWMgr::augmentModules(const char * 
ipath=0x06d7a5b8, bool multiMod=true)  Line 712 + 0x19 bytes    C++
  libsword.dll!sword::SWMgr::Load()  Line 806 + 0x23 bytes    C++
  
bibletime.exe!CSwordBackend::initModules(CSwordBackend::SetupChangedReason 
reason=AddedModules)  Line 135 + 0x11 bytes    C++
  
bibletime.exe!CSwordBackend::reloadModules(CSwordBackend::SetupChangedReason 
reason=AddedModules)  Line 521    C++
  bibletime.exe!BtInstallProgressDialog::closeEvent(QCloseEvent * 
event=0x013d4950)  Line 241    C++

First lines of function:
int FileMgr::sysOpen(FileDesc *file) {
    FileDesc **loop;
    int openCount = 1;       
   
    for (loop = &files; *loop; loop = &((*loop)->next)) {

        if ((*loop)->fd > 0) {
            if (++openCount > maxFiles) {

values:
  loop = 0xfeeefefe   ( bad pointer value)
  openCount = 5
  maxFiles = 35

I also started at the beginning of the &fles loop and followed the next 
pointer. I followed it 75 times and did not find the end (null pointer) 
or a bad pointer value, but it must be wrong because "loop" gets set to 
a bad value. I could not follow it further because I ran into th edge of 
my screeen while expanding the next pointers.

Since this list contains previously seen, but now closed files and many 
of the file names are files in the InstallMgr cache of available 
downloads, the number of 75 or more files seems reasonable.

I could not determine the cause of the bad "loop" pointer.

Gary







More information about the bt-devel mailing list