Menu

#839 Crash in Plasma 5 with activated "Menubar style: Title bar button"

stable
closed-fixed
nobody
crash (2)
5
2018-02-06
2017-09-13
No

Last stable version of smplayer, so 17.9.0 crashes in (up-to-date) Plasma 5 with turned on "Menubar style: Title bar button". Helps only swtiching this to "In Application".

I think this is regression, because in one of previous stable version smplayer didn't crash. I use this option since several weeks and of course smplayer, but much longer.

I don't remember that I changed something in my Plasma settings since day when it worked till day it crashed. Only I updated operating system.

I built smplayer from source and after run I got following result (last two lines):

Debug: BaseGui::populateMainMenu
Segmentation fault (core dumped)

Examining coredump I found this line in top of backtrace:

#0  0x00007f290a71b650 in ?? () from /usr/lib/qt/plugins/platformthemes/KDEPlasmaPlatformTheme.so

Full output and backtrace from gdb please find in attachment.

My system is up-to-date Antergos (Linux distribution based on Arch).
Before test I removed configuration. I mean directory: ~/.config/smplayer

1 Attachments

Discussion

1 2 > >> (Page 1 of 2)
  • Michał Dybczak

    Michał Dybczak - 2017-09-17

    I have exactly the same problem on Manjaro KDE, also using global menus. Turning global menus off allows smplayer to launch but I won't change the whole desktop setting just for one program so at the moment my video playbakc is seriously crippled (vlc work but with serius issues, that is why I was using smplayer).

    I updated whole system today and got the same issue. I downgraded smplayer and... the same problem, which means, something has changed in Plasma's global menus which trigers that bug.

    This doesn't have to mean that Plasma has a bug, although it can. There is a chanbce that there is something in smplayer that is not suited to the latest Plasma changes and borks out.

    EDIT: I was able to find temporal workaround, I blocked global menus from smplayer by runnig it with variable:

    KDE_NO_GLOBAL_MENU=1 smplayer %U

     

    Last edit: Michał Dybczak 2017-09-17
  • Ricardo Villalba

    Does it make any difference if you change the style or theme of smplayer in preferences -> interface?

     
  • Piotr Mierzwinski

    I changed Style into "Breeze" (before was Fussion) and smpayer still crashes.

     
  • Michał Dybczak

    Michał Dybczak - 2017-09-17

    I tested all styles and GUI, it doesn't change anything. SMplayer crashes when launched with global menus.

     

    Last edit: Michał Dybczak 2017-09-17
  • Ricardo Villalba

    Since the crash happens in KDEPlasmaPlatformTheme.so, maybe it's a bug in that library.
    Anyway if you could compile SMPlayer with debug info and send a backtrace of the crash I could get more info to know if the problem is really in SMPlayer.

     
  • Piotr Mierzwinski

    @Ricardo
    Maybe you are right and this is bug in KDEPlasmaPlatformTheme library.
    Anyway I compiled smplayer with debug symbols and attached what I got after crash. I think to receive more detailed info is required sompla Pasma package with debug symbols. Unfortunatelly in my system I don't have such package :(.
    BTW. I didn't observe such behaviour (crash) in couple different Qt5/Plasma 5 applications. In example in case of Clementine.

     
  • Michał Dybczak

    Michał Dybczak - 2017-09-23

    I'm on Manjaro, so also Arch based system. I remeber Kwin developer complaining on lack of some KDE debug package in Arch, so debug informations become useless. I thought it's fixed by now, but now I'm not sure.

    As to other apps, I didn't notice anything unusall, they all work. Only SMplayer was affected by the recent system update. Theory of bug being in library seems to resonable, since downgrading SMplayer doesn't help. However, it still might be some change (not a bug) that SMplayer must catch on.

     
  • Piotr Mierzwinski

    OK. If debug package not exists then need to generate it, so I prepared KDEPlasmaPlatformTheme library with debug symbols. Thereupon I built on my system package plasma-integration in the latest (stable) version and installed it (debug and normal)

    After run of smplayer I found out that crash happens in SystemTrayMenu::~SystemTrayMenu()
    Destructor looks like this:
    SystemTrayMenu::~SystemTrayMenu()
    {
    if (m_menu) {
    m_menu->deleteLater();
    }
    }

    I made test with removed ~/.config/smplayer directory and I used smplayer version from repository. Building system generated two packages normal and debug, but I'm not sure why gdb wasn't able to load debug symbols (details in attachments).
    Installed smplayer packages:
    $ pacman -Q | grep smplayer
    smplayer-svn 17.9.0.r8645-1
    smplayer-svn-debug 17.9.0.r8645-1

    I attached result of running which includes backtrace from gdb.

    Second thing is that after last system updates smplayer crashes on exit not when trying to run.

     
  • Ricardo Villalba

    If possible try to compile SMPlayer with debug symbols. Edit src/smplayer.pro, comment the line "CONFIG += release" and uncomment "CONFIG += debug", and recompile.

     
  • Piotr Mierzwinski

    OK. Done. I made test in the same terms.
    This time debug symbols from smplayer loaded :), but there is no any referers to KDEPlasmaPlatformTheme library (plugin) or I didn't notice.

    Output from console and gdb in attached file.
    Installed packages:
    $ pacman -Q | grep smplayer
    smplayer-svn 17.9.0.r8698M-1
    smplayer-svn-debug 17.9.0.r8698M-1
    $ pacman -Q | grep plasma-integration
    plasma-integration 5.10.5-1
    plasma-integration-debug 5.10.5-1

     
  • Ricardo Villalba

    Does the crash happen when you close SMPlayer? Does it work well before that?

     
  • Piotr Mierzwinski

    Yes. Starts, works well only crashes when I close it.
    When I reported didn't want to start only crashes. Couple days ago, after some system updates it starts correctly. I tested it on Antergos and KaOS with the same result. Both distribution have similar versions of Plasma and Qt5.

     
  • Ricardo Villalba

    Until I can find a proper solution, smplayer 17.11 sets KDE_NO_GLOBAL_MENU=1 to prevent the crash.

     
  • Michał Dybczak

    Michał Dybczak - 2017-11-05

    If fix is not quick to find, this seems to be a reasonable course of action. At least smplayer will work automatically for people. However, probably we will see some growth of topic like "smplayer doesn't have kde global menus" etc.

     

    Last edit: Michał Dybczak 2017-11-05
  • Piotr Mierzwinski

    Recently I observe that smplayer (17.10) crashes even when I start it.
    smplayer running under Plasma 5.11.2 and Qt-5.9.2
    Again in the same point (smplayer installed with debug symbols):

    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x00007fd64354f630 in ?? () from /usr/lib/qt/plugins/platformthemes/KDEPlasmaPlatformTheme.so
    

    I'm going to rebuild plasma-integration and check what will happen.

     
  • Piotr Mierzwinski

    Sorry for minor mistake. I previous post I meant version 17.09
    OK.
    I rebuilt plasma-integration-5.11.2 with debug symbols.
    I rebuilt smplayer 17.10 with debug symbols
    The crash happend after I closed smaplyer.

    And seems that plasma-integration crashes in the same place. I mean in destructor of SystemTrayMenu, here:
    SystemTrayMenu::~SystemTrayMenu()
    {
    if (m_menu) {
    m_menu->deleteLater();
    }
    } // row: 43

    Details (including gdb backtrace) please find in attached file.

     
  • Ricardo Villalba

    I installed Manjaro KDE in a virtual machine. After several hours of investigation I think I found where the problem happens. The crash happens when the favorite, recent files, tv or radio submenus are added to the systray menu.

    If I don't add those submenus to the "open" menu in the main window, then I can add the submenus to the systray. So it seems when the KDE global menu is activated, a submenu in that menu can't be added to the systray menu. The menu can't be in those two places at the same time.

    I think this is probably a bug in the KDE libraries. And I think I can't fix it in smplayer (the only way would be not to add those submenus to the system tray, which I think it's not a satisfactory solution).

    I post a patch which doesn't add those submenus to the systray.

     

    Last edit: Ricardo Villalba 2017-11-06
  • Piotr Mierzwinski

    I appreciate the effort you put in the investigation.
    I don't have checked option "Show icon in system tray", so why smaplayer crashed? I suppose you prepare this menu before.
    BTW. I'm not sure why this option is placed in "Options" menu, instead of "Preferenced -> Interface". In first time I was looking it there, because I expected that this option is located in "Interface".

    On the other hand Clementine having icon in systray (in my configuration) works well. What is difference here?

    Starting yesterday I use version smplayer 17.11.0, which doesn't crash, only because of set "KDE_NO_GLOBAL_MENU=1".

     
    • Ricardo Villalba

      It crashes when the menu for the system tray is created. This menu is created even if the option is never used, like every menu in the application.

       
  • Michał Dybczak

    Michał Dybczak - 2017-11-08

    If KDE libs may be the probable cause, can someone file a bug? I would gladly do that (and I did that in the past when I knew more) if I understood what you are talking about.

     
    • Ricardo Villalba

      I think I can report the bug, but I'm still investigating the problem to be sure if it is really a bug in KDE.

       
  • Michał Dybczak

    Michał Dybczak - 2017-11-09

    Even if it tunrs out not to be a KDE bug, it's worth a try. Maybe you will get to bottom of it.

    It's possible KDE changed something deliberatelly and you only need to adjust to it.

    Also, why only SMPlayer is touched with the issue? No other app seems to have similar problem. So either SMPlayer does something unique that does uncover some lib bug, or the bug is in SMPlayer.

     
    • Ricardo Villalba

      I've just written a small sample code to try to reproduce the problem outside smplayer, creating a main window with some submenus that are also shown in the system tray. Surprisingly there's no crash, although the submenus in the system tray are not display correctly. So it's possible that other applications are actually affected by this bug but less severely, without crashes.

      Why does smplayer crash and not this sample app? It's what I'm trying to figure out right now.

      BTW, I think this is definitely a bug in KDE but it's also possible that the developers are already aware of it and even had fixed it, since linux distros usually include old versions of everything.

       

      Last edit: Ricardo Villalba 2017-11-09
  • Michał Dybczak

    Michał Dybczak - 2017-11-10

    Thanks, I really appreciate you working on it. From some weird reason vlc doesn't work well on my main computer, other players cannot show correctly UTF-8, polish subtitles so the only player (and a good one) that can do everything and also is (or was) nicely intergrated with Plasma is SMPlayer. So literally, I have no options. SMPlayer is the only solution for me.

    As to the assumption that the fix may already exist, that's possible. Lxqt c1 session fix needed at least 1-2 months till it arrived to arch so indeed there is a delay from developer to official repos. However, we cannot just wait and hope for it. This lxqt bug took several months of tests and discussions to fix it and then from having it to repos another month or two. Octopi bug with yaourt is still not available, although problem showed a half year ago. Electron CPU and global menu bug took a year to be fixed and also, it was about 2 months delay from seeing it fixed on github and landing on official package in repos. Luckily, latte problem with latest Qt package was solved in a week or so, so not all cases are so complicated.

    My point is, it takes lot of time even with active work. Waiting without clue if that's already handled is not a good strategy IMO. I would galdly help out if I could, but I'm just very average and not overly technical Linux user. Being on Manjaro, fixes come rather soon, but still, some serious issue need more time.

     
  • Ricardo Villalba

    I think the crash is fixed in svn r8791. Still the system tray icon doesn't work correctly, but well, at least there's no crash.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

MongoDB Logo MongoDB