| Summary: | Segmentation fault on fresh build of artikulate | ||
|---|---|---|---|
| Product: | [Applications] Artikulate | Reporter: | Avinash Sonawane <rootkea> |
| Component: | general | Assignee: | Andreas Cord-Landwehr <cordlandwehr> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | critical | ||
| Priority: | NOR | ||
| Version First Reported In: | GIT (master) | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
gdb log:
(gdb) run
Starting program: /home/rootkea/Downloads/todo/hacking/artikulate/build/bin/artikulate
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff1bac700 (LWP 2512303)]
[New Thread 0x7fffebfff700 (LWP 2512304)]
[New Thread 0x7fffeb7fe700 (LWP 2512305)]
articulate.core: Repository created from with location QUrl("file:///home/rootkea/.local/share/artikulate/courses/")
articulate.core: Loading courses from "/home/rootkea/.local/share/artikulate/courses"
articulate.core: Loading resource "/home/rootkea/.local/share/artikulate/courses/basic/gr/gr.xml"
articulate.core: Loading resource "/home/rootkea/.local/share/artikulate/courses/basic/gr/gr.xml"
articulate.core: Reloading of resources not yet supported, skippen course
articulate.core: Loading resource "/home/rootkea/.local/share/artikulate/courses/basic/ba/ba.xml"
articulate.core: Loading resource "/home/rootkea/.local/share/artikulate/courses/basic/ba/ba.xml"
articulate.core: Reloading of resources not yet supported, skippen course
articulate.core: Loading resource "/home/rootkea/.local/share/artikulate/courses/basic/fr/fr.xml"
articulate.core: Loading resource "/home/rootkea/.local/share/artikulate/courses/basic/fr/fr.xml"
articulate.core: Reloading of resources not yet supported, skippen course
[New Thread 0x7fffeaffd700 (LWP 2512306)]
log_liblearner: Database path: "/home/rootkea/.local/share/artikulate/learnerdata.db"
log_liblearner: No last active profile found, falling back to first found profile
QObject::connect(OutputBackendInterface, OutputDeviceController): invalid null parameter
Thread 1 "artikulate" received signal SIGSEGV, Segmentation fault.
OutputDeviceControllerPrivate::lazyInit (this=0x5555559021d0)
at /home/rootkea/Downloads/todo/hacking/artikulate/libsound/src/outputdevicecontroller.cpp:81
81 m_volume = m_backend->volume();
(gdb) bt
#0 OutputDeviceControllerPrivate::lazyInit() (this=0x5555559021d0)
at /home/rootkea/Downloads/todo/hacking/artikulate/libsound/src/outputdevicecontroller.cpp:81
#1 0x00007ffff7e50d29 in OutputDeviceController::self() ()
at /home/rootkea/Downloads/todo/hacking/artikulate/libsound/src/outputdevicecontroller.cpp:110
#2 0x000055555555a012 in MainWindow::MainWindow() (this=0x5555556c1100)
at /home/rootkea/Downloads/todo/hacking/artikulate/src/mainwindow.cpp:30
#3 0x0000555555559912 in main(int, char**) (argc=1, argv=0x7fffffffdfd8)
at /home/rootkea/Downloads/todo/hacking/artikulate/src/main.cpp:52
(gdb)
This crash comes from the problem that the respective OutputDevice plugin is not found. Please set the QT_PLUGIN_PATH environment variable in cases when the plugin is not installed into the Qt system location. I will add a fatal error though that explains this problem. > the respective OutputDevice plugin is not found. I'm sorry but I don't understand. cmake[0] doesn't show any plugin missing. [0] https://pastebin.com/raw/svPRfC39 You do not find anything in the CMake output, because your problem is not in the build system: When starting Artikulate, it looks in your system at the Qt default paths for plugins as well as the location that are defined with QT_PLUGIN_PATH (see https://doc.qt.io/qt-5/deployment-plugins.html). Because Artikulate does not find the (apparently correctly built plugins) it crashes on startup. Thus, all you have to do to set the path correctly in your environment. > see https://doc.qt.io/qt-5/deployment-plugins.html As per the linked page Qt searches for plugins in application's executable directory and indeed there are libartikulatesound.so and qtmultimediabackend.so along with other .so s in ./build/bin/. I'm not sure which plugin is "missing". > all you have to do to set the path correctly in your environment. $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04 LTS Release: 20.04 Codename: focal $ git clone https://invent.kde.org/education/artikulate $ mkdir artikulate/build; cd artikulate/build $ cmake .. $ make -j4 $ ./bin/artikulate ... log_liblearner: No last active profile found, falling back to first found profile QObject::connect(OutputBackendInterface, OutputDeviceController): invalid null parameter Segmentation fault (core dumped) $ Please let me know which environment variable needs to be set and could it be done by the build process itself? Interesting observation is that if I `apt install artikulate` then the ./build/bin/artikulate runs successfully without any SegFault. It's as if it wants .so s to be in /usr/lib/x86_64-linux-gnu/artikulate and /usr/lib/x86_64-linux-gnu/qt5/plugins/artikulate/ completely ignoring the identical .so s in ./build/bin/ PS - FWIW, I built gcompris and parley successfully using above exact workflow without any Qt plugin path issue. As suggested by Andreas, I solved this by setting QT_PLUGIN_PATH variable. I installed Artikulate at $PREFIX (since I didn't want to overwrite the artikulate from distro repo) and then supplied the appropriate value to QT_PLUGIN_PATH. Steps: $ mkdir build; cd build $ cmake -DCMAKE_INSTALL_PREFIX=$PREFIX .. $ make -j4; make install $ QT_PLUGIN_PATH=$PREFIX/lib/x86_64-linux-gnu/plugins $PREFIX/bin/artikulate Thanks for the help! |
Hello! I just git cloned and compiled Artikulate on Ubuntu 20.04 LTS $ bin/artikulate articulate.core: Repository created from with location QUrl("file:///home/rootkea/.local/share/artikulate/courses/") articulate.core: Loading courses from "/home/rootkea/.local/share/artikulate/courses" log_liblearner: Database path: "/home/rootkea/.local/share/artikulate/learnerdata.db" log_liblearner: No last active profile found, falling back to first found profile QObject::connect(OutputBackendInterface, OutputDeviceController): invalid null parameter Segmentation fault (core dumped) $