[bt-devel] Crash While Canceling Bookshelf Download

Gary Holmlund gary.holmlund at gmail.com
Wed Nov 4 22:33:00 MST 2009


Eeli,

I am hoping this make more sense to you than to me. I have not worked on 
this part of BT.

This is the crash when canceling a bookshelf install while download is 
in progress. The crash occurs in sword in the sword my_fprogress 
function. This function normally calls back to the BT function 
BtInstallMgr::statusUpdate. The BT debug output is shown below. The 
crash would be at the end of the debug output, but the progress dialog 
is closed earlier in the debug output. It seems that sword might be 
calling a function in a deleted class.

Perhaps the install thread is not yet terminated when we think it is? 
What do you think?

Gary

sword\src\mgr\curlftpt.cpp

int my_fprogress(void *clientp, double dltotal, double dlnow, double 
ultotal, double ulnow) {
    if (clientp) {
        ((StatusReporter *)clientp)->statusUpdate(dltotal, dlnow);   // 
crash at this line
    }
    return 0;
}


debug output:

"Barnes" was checked
BtSourceWidget::slotModuleSelectionChanged start
add 1 to overall count of selected modules
void BtInstallPage::setInstallEnabled(bool b) start
void BtInstallPage::slotInstall start
BtInstallModuleChooserDialog::BtInstallModuleChooserDialog start
BTModuleTreeItem::create_tree
was checked
was checked
BtSourceWidget::slotInstallAccepted
BtInstallMgr::BtInstallMgr
start threads...
BtInstallProgressDialog::startThreads end
void BtInstallPage::setInstallEnabled(bool b) start
****************************************
BtInstallThread::run, mod: "Barnes"
************************************
backend::source
BtInstallMgr::BtInstallMgr
backend::backend
BtInstallThread::removeModule start
backend::source
BtInstallMgr::BtInstallMgr
backend::backend
BtInstallThread::removeModule, module "Barnes" not found
calling install
The thread '_threadstartex' (0x8b0) has exited with code 0 (0x0).
BtInstallMgr::preStatus: 6104575 / 0 "Downloading (1 of 3): nt.czs"
BtInstallThread::slotDownloadStarted
BtInstallProgressDialog::slotDownloadStarted "Barnes"
BtInstallMgr::preStatus: 6104575 / 3120 "Downloading (2 of 3): nt.czv"
BtInstallMgr::preStatus: 6104575 / 85580 "Downloading (3 of 3): nt.czz"
*************************************
BtInstallThread::slotStopInstall "Barnes"
********************************
*********************************
BtInstallThread::slotStopInstall, installing "Barnes" was cancelled
**************************************
BtInstallThread::slotStopInstall 2
BtInstallThread::slotStopInstall 3
BtInstallThread::slotStopInstall 4
BtInstallThread::removeModule start
backend::source
BtInstallMgr::BtInstallMgr
backend::backend
BtInstallThread::removeModule, module "Barnes" not found
BtInstallThread::removeTempFiles start
Delete path: "C:/Documents and Settings/gary/Application 
Data/Sword/InstallMgr/ftp.crosswire.org/modules/comments/zcom/barnes/"
BtInstallThread::slotStopInstall will emit installStopped...

**********************************
BtInstallProgressDialog::oneItemStoppedOrCompleted "Barnes" "Cancelled"
******************************************
remove from threads maps "Crosswire" BtInstallThread(0x59dec78)
close the dialog
BtInstallProgressDialog::closeEvent                               // 
notice that the progress dialog is closed here
BTModuleTreeItem::create_tree
BTModuleTreeItem::create_tree
CDisplayWindow::setModules
BTHistory::add
CReadWindow::lookup newKey "I Chronicles 1:1"
CDisplayRendering::finishText
CDisplayTemplateMgr::fillTemplate
langMap length: 9
loop through langMap
CReadWindow::slotMoveToAnchor
CReadWindow::lookup end, key is : "I Chronicles 1:1"
CReadWindow::lookup newKey "I Chronicles 1:1"
CDisplayRendering::finishText
CDisplayTemplateMgr::fillTemplate
langMap length: 9
loop through langMap
CReadWindow::slotMoveToAnchor
CReadWindow::lookup end, key is : "I Chronicles 1:1"
CBTConfig::setupAccelSettings begin
"Displaywindow shortcuts"
CBTConfig::setupAccelSettings end
CBTConfig::setupAccelSettings begin
"Readwindow shortcuts"
CBTConfig::setupAccelSettings end
CBTConfig::setupAccelSettings begin
"Lexicon shortcuts"
CBTConfig::setupAccelSettings end
BTHistory::add
CReadWindow::lookup newKey "I Chronicles 1:1"
CDisplayRendering::finishText
CDisplayTemplateMgr::fillTemplate
langMap length: 9
loop through langMap
CReadWindow::slotMoveToAnchor
CReadWindow::lookup end, key is : "I Chronicles 1:1"
CBTConfig::setupAccelSettings begin
"Bible shortcuts"
CBTConfig::setupAccelSettings end
BtSourceArea::createModuleTree start
BtInstallPage::slotSwordSetupChanged
void BtInstallPage::initPathCombo() start
backend::targetList
BTModuleTreeItem::create_tree
BtSourceArea::createModuleTree end
First-chance exception at 0x01657170 (libsword.dll) in bibletime.exe: 
0xC0000005: Access violation reading location 0xfeeefef6.
Unhandled exception at 0x01657170 (libsword.dll) in bibletime.exe: 
0xC0000005: Access violation reading location 0xfeeefef6.




More information about the bt-devel mailing list