bibletime / bibletime

:book: BibleTime is a powerful cross platform Bible study tool.
https://bibletime.info/
GNU General Public License v2.0
326 stars 68 forks source link

[BUG] Bibletime crashes when opening a lexicon #420

Open jd-s opened 1 year ago

jd-s commented 1 year ago

Bug description

Bibletime starts up, when opening a self-build lexicon module, it takes forever to load and then breaks. See debug output below:

LOADING MODULE LIBRARY COMPLETE.
(BibleTime 3.0.3) Debug: Read all entries of lexicon "LzB"
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc

However, the module works perfectly with Xiphos. So no idea what went wrong here.

Steps to reproduce Steps to reproduce the behavior:

  1. Go to 'Lexika und Wörterbücher'
  2. Click on module
  3. Wait for ca. 15 minutes
  4. See error

Expected behavior It should load the module, similar to Xiphos

System information:

Additional context Add any other context about the problem here, e.g. including output of bibletime --debug and/or backtraces in case of crashes.

see above

gholmlund commented 1 year ago

Where is the 'Lexika und Wörterbücher' available?

gholmlund commented 1 year ago

This defect is not reproducible.

titandino commented 4 months ago

I know this is closed, but I am getting a very similar error when trying to set it up for local development as well. I think this may not be reproducible due to it not being related to the lexicons. I have run into the same issue yet I am not even sure what the cause is. The startup just hangs for a long time until finally throwing the bad_alloc. Doesn't seem to print any debug step that it's crashing on either.

LOOKING UP LOCALE DIRECTORY...
Checking for provided SWConfig("sword.conf")...
Checking working directory for sword.conf...
Checking working directory for mods.conf...
Checking working directory for mods.d...
Checking working directory ../library/ for mods.d...
Checking $SWORD_PATH...
Parsing /etc/sword.conf...
Checking for /etc/sword.conf...
found.
DataPath in /etc/sword.conf is set to /usr/share/sword/.
Checking for mods.conf in DataPath...
Checking for mods.d in DataPath...
found.
LOOKING UP LOCALE DIRECTORY COMPLETE.
LocaleMgr::loadConfigDir loading /usr/share/sword/locales.d
LOOKING UP LOCALE DIRECTORY...
Checking for provided SWConfig("sword.conf")...
Checking working directory for sword.conf...
Checking working directory for mods.conf...
Checking working directory for mods.d...
Checking working directory ../library/ for mods.d...
Checking $SWORD_PATH...
Parsing /etc/sword.conf...
Checking for /etc/sword.conf...
found.
DataPath in /etc/sword.conf is set to /usr/share/sword/.
Checking for mods.conf in DataPath...
Checking for mods.d in DataPath...
found.
LOOKING UP LOCALE DIRECTORY COMPLETE.
LocaleMgr::loadConfigDir loading /usr/share/sword/locales.d
LOOKING UP MODULE CONFIGURATION...
Checking for provided SWConfig("sword.conf")...
Checking working directory for sword.conf...
Checking working directory for mods.conf...
Checking working directory for mods.d...
Checking working directory ../library/ for mods.d...
Checking $SWORD_PATH...
Parsing /etc/sword.conf...
Checking for /etc/sword.conf...
found.
DataPath in /etc/sword.conf is set to /usr/share/sword/.
Checking for mods.conf in DataPath...
Checking for mods.d in DataPath...
found.
LOOKING UP MODULE CONFIGURATION COMPLETE.
LOADING MODULE CONFIGURATIONS...
LOADING MODULE CONFIGURATIONS COMPLETE.
LOADING MODULE LIBRARY...
libsword: SWMgr::createAllModules
libsword: SWMgr::createAllModules
LOADING MODULE LIBRARY COMPLETE.
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

My properly installed release version seems to work just fine, though. I'll try and do a fresh development test in a VM tomorrow and see if it could be related to some of the modules I have or something. If I can find the offending module (if that's what it is), I'll be sure to note it down here.

titandino commented 4 months ago

Update: Tried on fresh arch linux VM using latest and the same issue persists for me. Doesn't seem to be related to any of my modules or dictionaries or anything.

jaakristioja commented 1 month ago

Can you please provide a backtrace with gdb, e.g paste output of the following command?

gdb -quiet -batch -ex run -ex backtrace -ex 'thread apply all bt full' -ex kill -ex quit /usr/bin/bibletime