Avogadro version: 1.99, updated the local repo (was 1.98) and compiled today
Operating system and version: Ubuntu 22.04.03
CPU: AMD Ryzen 5 3600
Expected Behavior
Opening any output file via the command line (tried orca output and xyz of benzene) should open Avogadro with the molecule loaded.
Actual Behavior
Avogadro begins its startup, but eventually segfaults (see terminal output below)
Opening Avogadro without a command-line argument and then loading the file via the menu works.
Mitigations tried
Fresh checkout and recompile. Issue remains.
Steps to Reproduce
Terminal output
mewes@kopfknoten:~/CALC/Hosts/BH/SPs$ avogadro2 uks_mono.xyz
Using locale: “C”
Extension plugins dynamically found… 42
OBProcess::executeObabel: Running “obabel” “-L formats read”
OBProcess::executeObabel: Running “obabel” “-L formats write”
OBProcess::executeObabel: Running “obabel” “-L forcefields”
OBProcess::executeObabel: Running “obabel” “-L charges”
OBProcess::executeObabel: Running “obabel” “-V”
“obabel” found: “obabel: Open Babel 3.1.1 – Feb 7 2022 – 06:51:49”
“Checking for energy scripts in path /home/mewes/.local/share/OpenChemistry/Avogadro/energy”
“Checking for energy scripts in path /usr/local/share/OpenChemistry/Avogadro/energy”
“Checking for energy scripts in path /usr/share/OpenChemistry/Avogadro/energy”
“Checking for energy scripts in path /var/lib/snapd/desktop/OpenChemistry/Avogadro/energy”
“Checking for energy scripts in path /home/mewes/SOFTWARE/openchemistry_build/avogadroapp/bin/…/lib/avogadro2/scripts/energy”
registering obmm plugins
“Checking for commands scripts in path /home/mewes/.local/share/OpenChemistry/Avogadro/commands”
“Checking for commands scripts in path /usr/local/share/OpenChemistry/Avogadro/commands”
“Checking for commands scripts in path /usr/share/OpenChemistry/Avogadro/commands”
“Checking for commands scripts in path /var/lib/snapd/desktop/OpenChemistry/Avogadro/commands”
“Checking for commands scripts in path /home/mewes/SOFTWARE/openchemistry_build/avogadroapp/bin/…/lib/avogadro2/scripts/commands”
“Checking for inputGenerators scripts in path /home/mewes/.local/share/OpenChemistry/Avogadro/inputGenerators”
“Checking for inputGenerators scripts in path /usr/local/share/OpenChemistry/Avogadro/inputGenerators”
“Checking for inputGenerators scripts in path /usr/share/OpenChemistry/Avogadro/inputGenerators”
“Checking for inputGenerators scripts in path /var/lib/snapd/desktop/OpenChemistry/Avogadro/inputGenerators”
“Checking for inputGenerators scripts in path /home/mewes/SOFTWARE/openchemistry_build/avogadroapp/bin/…/lib/avogadro2/scripts/inputGenerators”
“Checking for charges scripts in path /home/mewes/.local/share/OpenChemistry/Avogadro/charges”
“Checking for charges scripts in path /usr/local/share/OpenChemistry/Avogadro/charges”
“Checking for charges scripts in path /usr/share/OpenChemistry/Avogadro/charges”
“Checking for charges scripts in path /var/lib/snapd/desktop/OpenChemistry/Avogadro/charges”
“Checking for charges scripts in path /home/mewes/SOFTWARE/openchemistry_build/avogadroapp/bin/…/lib/avogadro2/scripts/charges”
“Checking for formatScripts scripts in path /home/mewes/.local/share/OpenChemistry/Avogadro/formatScripts”
“Checking for formatScripts scripts in path /usr/local/share/OpenChemistry/Avogadro/formatScripts”
“Checking for formatScripts scripts in path /usr/share/OpenChemistry/Avogadro/formatScripts”
“Checking for formatScripts scripts in path /var/lib/snapd/desktop/OpenChemistry/Avogadro/formatScripts”
“Checking for formatScripts scripts in path /home/mewes/SOFTWARE/openchemistry_build/avogadroapp/bin/…/lib/avogadro2/scripts/formatScripts”
Segmentation fault (core dumped)
Sorry to bring this up again. But I just checked out the most recent version and recompiled (after @ghutchis suggested the fantastic xTB implemention of @matterhorn103 to me in a Bluesky thread), but I get the same error still.
When I start avogadro2 and then open ANY file, all is fine. However, when I call avogadro2 with ANY file in the terminal (avogadro2 test.xyz, as simple as H2O) it segfaults as described above.
I would love to use the new version, but manually navigating to and opening files is too impractical.
I can’t really reproduce this on my Linux system (though it’s openSUSE not Ubuntu).
The Flatpak fails to open files passed on the command line but I reckon that’s because Avogadro doesn’t have access to the file due to the sandboxing; there’s no segfault.
The AppImage and a local build seem to work fine, meanwhile.
Would you mind trying the 1.100 AppImage and seeing if that also shows the error on your system?
By the way, we are now building against Qt6 on Linux. It’d be useful to know which Qt version you are building against, and if you are building against 5 it might be worth trying against 6 instead.
Spare yourself the effort! Turns out this was an issue of my compile setup (which I did not expect since it was working perfectly when executed without a file). Seemingly it had issues finding Qt when called with a file. However, I have now recompiled this with the help of my favorite AI and it works (almost entirely)* now.
*The new bug is that once I start moving molecule around, all the lights go off (everything in the display becomes super dark). I will try to fix and write another bug report if this keeps happening.