I’ve been away from my PC for a couple of weeks so haven’t been using Avogadro itself during that time. I tried compiling today with the various commits that have been made over the Christmas/New Year period and only get a segfault when launching now.
The nightly AppImage does the same, while the 1.98.1 AppImage works fine, so it doesn’t seem to be distro/dependency related.
I’ve attached the terminal output. @ghutchis The main thing I notice being different is all the checks for Python, which I assume is part of your recent work on the interpreter/environment selection interface. I’m not quite sure why /opt is being checked for Python so often, and I also notice that when Python is not found at /opt/hostedtoolcache/Python/3.11.7/x64/bin/python3 the fallback is to try python in the system Path, whereas on many Linux distros including mine the Python executable is python3. Don’t know if that’s relevant.
I tried deleting the config file and removing the plugins folder but both to no avail.
Any ideas?
I’m also still unclear if there’s a way to launch Avogadro in verbose or debug mode to get any more info.
Obviously that’s bad. Can you get a backtrace in gdb?
If a path to Python isn’t set, it will fall back to the path used during compile (e.g., /opt/hostedtoolcache on the GitHub builds). Your point about python3 is a good one.
If the program is crashing you can run with gdb [path-to-avogadro2] and then run at the first prompt. When it crashes, you can type bt to get a backtrace.
This works best in a Debug compile, but the default RelWithDebInfo should still be useful.
gdb.txt (6.8 KB)
Above is the output when running via gdb.
After typing bt, the following is printed:
#0 0x00007ffff7027aff in () at /lib64/libQt5Widgets.so.5
#1 0x00007ffff702c8dd in QHeaderView::setSectionResizeMode(int, QHeaderView::ResizeMode) ()
at /lib64/libQt5Widgets.so.5
#2 0x000000000041e3d4 in Avogadro::MainWindow::setupInterface() (this=0x7fffffffd140)
at /home/abc/avo/openchemistry/avogadroapp/avogadro/mainwindow.cpp:459
#3 0x000000000041d297 in Avogadro::MainWindow::MainWindow(QStringList const&, bool)
(this=0x7fffffffd140, fileNames=..., disableSettings=false)
at /home/abc/avo/openchemistry/avogadroapp/avogadro/mainwindow.cpp:301
#4 0x000000000041a634 in main(int, char**) (argc=1, argv=0x7fffffffd808)
at /home/abc/avo/openchemistry/avogadroapp/avogadro/avogadro.cpp:245
Note that I didn’t even make a new build, I just rebuilt my existing, previously working Qt5 version after pulling from avogadrolibs/master and avogadroapp/master.
Can you remind me how to compile in debug mode? Sorry, I’ve forgotten how, and if memory serves, it was through setting an Avogadro-specific environment variable.