[bt-devel] Bt Windows Crash

Gary Holmlund gary.holmlund at gmail.com
Mon Aug 2 21:25:07 MST 2010


I am getting a crash on Windows when BibleTime starts up. I happens with 
release or debug code. It is in the file: cbtconfig.cpp

DisplayOptions getDisplayOptionDefaults() {
     DisplayOptions options;
     options.lineBreaks   = get(lineBreaks);
     options.verseNumbers = get(verseNumbers);
     return options;   // CRASH
}

DisplayOptions is a struct of two int's. This should not crash.

This is called from CDisplayWindow::init() like this:

     m_displayOptions = CBTConfig::getDisplayOptionDefaults();

If I replace this line with:

   m_displayOptions.lineBreak = 0;
   m_displayOptions.verseNumbers = 0;

Now it does not crash. Instead of this change, if I do this:

DisplayOptions getDisplayOptionDefaults() {
     DisplayOptions options;
     options.lineBreaks   = 0;
     options.verseNumbers = 1;
     return options;   // CRASH
}

It still crashes. This seems like a compiler bug to me. I have tried 
turning off compiler optimization on both cdisplaywindows.cpp and 
ctbconfig.cpp. It still crashes. If any developers have thoughts about a 
fix for this, please speak up.

It is possible this is the problem that several people have reported in 
bug #3018349 - "BibleTime on Windows won't start at all". I have built a 
Windows version with the following change.

//    m_displayOptions = CBTConfig::getDisplayOptionDefaults();
   m_displayOptions.lineBreak = 0;
   m_displayOptions.verseNumbers = 0;

Please try this if you were having problems on Windows.
http://sourcearchives.com/downloads

Gary Holmlund





More information about the bt-devel mailing list