Description of problem: Clementine updated today to 1.3.1-28/ New release core dumps on startup. Re-installed previous version (1.3.1-27) and it runs fine. Version-Release number of selected component (if applicable): clementine-1.3.1-27.fc28.x86_64.rpm How reproducible: Always Steps to Reproduce: 1. run clementine Actual results: Core dumps after outputting: 13:59:35.678 WARN unknown libpng warning: iCCP: known incorrect sRGB profile 13:59:35.701 WARN unknown QxtGlobalShortcut failed to register: "Space" 13:59:35.797 WARN unknown QPainter::begin: Paint device returned engine == 0, type: 2 terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid Expected results: Functional clementine. Additional info: For the record, 1.3.1-27 outputs the suff below at startup: 13:57:33.815 WARN unknown libpng warning: iCCP: known incorrect sRGB profile 13:57:33.838 WARN unknown QxtGlobalShortcut failed to register: "Space" 13:57:33.932 WARN unknown QPainter::begin: Paint device returned engine == 0, type: 2 13:57:34.099 WARN unknown Object::connect: No such signal QtSingleApplication::messageReceived(QByteArray) 13:57:34.099 WARN unknown Object::connect: (sender name: 'clementine') 13:57:34.099 WARN unknown Object::connect: (receiver name: 'MainWindow') 13:57:34.176 ERROR unknown JSonScanner::yylex - error while reading from io device 13:57:34.176 ERROR unknown json_parser - syntax error found, forcing abort, Line 1 Column 1 13:57:40.770 WARN unknown QxtGlobalShortcut failed to unregister: "Space"
Hard to tell from the output where the issue is. It could be one of the dependencies that -28 was built with. I just updated the system and got the official -28 build and it works fine here. I cannot do much without reproducing, a core dump file, or at least a gdb backtrace. Can you run clementine inside gdb and provide a backtrace? Also you can try wiping the config and cache directories rm -rf ~/.config/Clementine rm -rf ~/.cache/Clementine (or alternatively rename them temporarily)
With or without the config and ccache directories the code seems to crash in the same place, inside ReloadSettings. Here's gdb's stacktrace. #0 0x00007fffefe18eab in raise () at /lib64/libc.so.6 #1 0x00007fffefe035b9 in abort () at /lib64/libc.so.6 #2 0x00007ffff07d9a9b in __gnu_cxx::__verbose_terminate_handler() [clone .cold.1] () at /lib64/libstdc++.so.6 #3 0x00007ffff07dfefc in __cxxabiv1::__terminate(void (*)()) () at /lib64/libstdc++.so.6 #4 0x00007ffff07dff57 in () at /lib64/libstdc++.so.6 #5 0x00007ffff07e01b8 in () at /lib64/libstdc++.so.6 #6 0x00007ffff07db9a7 in std::__throw_logic_error(char const*) [clone .cold.0] () at /lib64/libstdc++.so.6 #7 0x00005555559d0acc in MainWindow::ReloadSettings() () #8 0x00005555559d606c in MainWindow::MainWindow(Application*, SystemTrayIcon*, OSD*, QWidget*) () #9 0x0000555555857214 in main () After installing clementine-debuginfo it becomes (partial backtrace) #9 0x00005555559d0acc in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char const*>(char const*, char const*) (__end=0xffffffffffffffff <error: Cannot access memory at address 0xffffffffffffffff>, __beg=0x0, this=0x7fffffffd700) at /usr/include/c++/8/bits/basic_string.h:255 #10 0x00005555559d0acc in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) (__a=..., __s=<optimized out>, this=0x7fffffffd700) at /usr/include/c++/8/bits/basic_string.h:516 #11 0x00005555559d0acc in MainWindow::ReloadSettings() (this=0x7fffffffdb30) at /usr/src/debug/clementine-1.3.1-28.fc28.x86_64/src/ui/mainwindow.cpp:1029 #12 0x00005555559d606c in MainWindow::MainWindow(Application*, SystemTrayIcon*, OSD*, QWidget*) (this=0x7fffffffdb30, app=<optimized out>, tray_icon=<optimized out>, osd=<optimized out>, parent=<optimized out>) at /usr/src/debug/clementine-1.3.1-28.fc28.x86_64/src/ui/mainwindow.cpp:964 #13 0x0000555555857214 in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/clementine-1.3.1-28.fc28.x86_64/src/main.cpp:473 #14 0x00007fffefe0511b in __libc_start_main () at /lib64/libc.so.6 #15 0x000055555585f04a in _start () at /usr/include/QtCore/qstring.h:880
Seems that ReloadSettings doesn't account for the case where the XDG_CURRENT_DESKTOP doesn't exist. Rebuilding with that check
This package doesn't build on my system. Package dependency requirement 'libmygpo-qt >= 1.0.9' could not be satisfied. Package 'libmygpo-qt' has version '1.0.8', required version is '>= 1.0.9' Can't find 1.0.9 for Fedora. Would have to build from source. CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: PROTOBUF_STATIC_LIBRARY linked by target "clementine-spotifyblob" in directory /home/henrique/rpmbuild/BUILD/Clementine-1.3.1/ext/clementine-spotifyblob
After installing libproto-lite and cheating to bypass the error above, cmake complains about a bunch of missing 3rdparty directories (libprojectm, qtsingleapplication and qxt). Guessing the source package is not to be used by us mere mortals.
Creating those as empty directories seems to satisfy cmake.
To fix the core dump, this line of clementine-disable-systray-gnome.patch: + if (std::string(xdg_desktop).find(std::string("GNOME")) != std::string::npos) should probably be (or equivalent): + if (xdg_desktop == (const char*) 0 || std::string(xdg_desktop).find(std::string("GNOME")) != std::string::npos) To fix the PROTOBUF_STATIC_LIBRARY, maybe add to clementine.spec? BuildRequires: protobuf-static With those two changes clementine builds from spec but the process fails to build the binary and source rpms. However, the clementine.exe left in BUILDROOT/usr/bin works without core dumping. These are the rpm build errors: Installed (but unpackaged) file(s) found: /path/to/rpmbuild/BUILD/Clementine-1.3.1/x86_64-redhat-linux-gnu/spotify/version16-64bit/blob /usr/bin/clementine-spotifyblob /usr/lib/debug/usr/bin/clementine-spotifyblob-1.3.1-28.fc28.x86_64.debug Adding: %{_bindir}/clementine-spotifyblob to the %files section of clementine.spec gets rid of the last two, but as of now I'm left with: RPM build errors: Installed (but unpackaged) file(s) found: /path/to/rpmbuild/BUILD/Clementine-1.3.1/x86_64-redhat-linux-gnu/spotify/version16-64bit/blob Closer but still not yet all cleaned up
The backtrace is quite useful. Can you tell me what Desktop Environment are you using, and what is the value of your environment variable XDG_CURRENT_DESKTOP?
As I said in comment #3 my environment doesn't have a XDG_CURRENT_DESKTOP variable, so it doesn't have a value, or should I say, it is undefined. std::getenv returns a null pointer which should be checked by the code. I don't use what is commonly called a Desktop Environment. I do have a window manager, but no DE. It would be nice if you also fixed the spec file.
Sorry I didn't refresh the webpage to read the rest of the messages. I just saw the backtrace. So your system doesn't conform to standards. That explains it (never thought about such a use case) Can you try this scratch build from koji? https://koji.fedoraproject.org/koji/taskinfo?taskID=30300378 The SPEC file is fine. It is what is being used in the koji right now. Not sure what is wrong with your build system. Are you trying plain rpmbuild? If so, your build might be subject to nonstandard changes in your system. You can follow the standard packaging guidelines (e.g. use mock) to have a "non-contaminated" build, but this is a different topic.
Scratch build starts fine, seems to work. Yes, tried with rpmbuild, never had a problem with it and I've built tens of packages by now. Installed mock and mock build seems to work (though now I have over 3GB extra stuff on my system). Guess I'll switch to it, thanks. Standard or not, the code was not checking for a potential null pointer return, which is a bug. I've been using xdm/fvwm since 1993 or so, even before there was a GNOME or KDE or anything one could all a DE. Pretty "standard" stuff.
You're correct. It's a bug. I'll push the update later today.
I had a F26 libspotify in my system. Probably came with an old clementine, as dnf erasing it also erases clementine. Probably installing a new clementine in the past didn't get rid of it. After dnf erasing it, building clementine with rpmbuild works fine, no need for mock (though I'll use it in the future). Also, in comment #7 I suggested to check if(xdg_desktop == (const char*) 0 || ... but your patch has if(xdg_desktop && ... This has the effect of, if systray is enabled in preferences, for the code to try and use the systray on a system that doesn't have XDG_CURRENT_DESKTOP, and thus, most likely, a systray. Code works either way.
Right. The patch is to workaround a Gnome bug that crashes Clementine when the systray is enabled. See RHBZ#1517748
clementine-1.3.1-29.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-72f5029a6e
clementine-1.3.1-29.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-b732406744
clementine-1.3.1-29.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-bda015f1a7
Updates filed. Thank you for the bug report and the help provided. Much appreciated.
clementine-1.3.1-29.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-bda015f1a7
clementine-1.3.1-29.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-b732406744
clementine-1.3.1-29.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-72f5029a6e
clementine-1.3.1-30.20181020gitfb00835.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e8e0b14959
clementine-1.3.1-30.20181020gitfb00835.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e8e0b14959
clementine-1.3.1-30.20181020gitfb00835.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.
clementine-1.3.1-29.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.
clementine-1.3.1-29.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.