Bug 331268

Summary: KDE panel crashes when click cancel or close button in touchpad settings.
Product: [Plasma] plasmashell Reporter: GSC <xgdgsc>
Component: TouchpadAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: crash    
Priority: NOR    
Version First Reported In: 5.17.5   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: crash
Hide KMessageWidgets in destructor
crash2
crash3

Description GSC 2014-02-18 06:52:10 UTC
I' m using kcm-touchpad-git from AUR.
100% Reproducable:
1. enable touchpad in KDE system tray settings.
2. right click on the touchpad icon in tray to open "Touchpad Settings" dialog
3. click cancel or close button, KDE panel will crash.
Comment 1 Alexander Mezin 2014-02-18 07:03:58 UTC
I can't reproduce it.

Could you attach stack trace (from Dr.Konqi) here?
It will be easier to debug if you add "options=('!strip')" to the pkgbuild.
Comment 2 GSC 2014-02-18 07:41:09 UTC
Created attachment 85210 [details]
crash

I just recompiled the 0.9 version (kcm-touchpad in aur) with "options=('!strip')" , but the crash report seems same.

Are you also using arch, with the latest KDE?
Comment 3 GSC 2014-02-18 07:55:31 UTC
I just tried with a new user. Doesn' t crash if I don' t change any setting after opening it for the first time. But after I change some setting (ticking two-finger scroll). Now it crashes everytime I open it and then click OK/Cancel/Close button.
Comment 4 Alexander Mezin 2014-02-18 10:58:46 UTC
(In reply to comment #2)
> I just recompiled the 0.9 version (kcm-touchpad in aur) with
> "options=('!strip')" , but the crash report seems same.
That's because crash happens in some other code.

> Are you also using arch, with the latest KDE?
Yes. Also I have debian sid, no problems there too.

It looks like the problem is caused by some other applet.
Do you have plasma-nm? Does it behave the same way?
Comment 5 Alexander Mezin 2014-02-18 11:15:29 UTC
You could also try adding "-DCMAKE_BUILD_TYPE=DebugFull" to cmake command line in the pkgbuild (without removing !strip). Maybe debug build will show something more.
Comment 6 GSC 2014-02-19 01:18:44 UTC
Tried with -DCMAKE_BUILD_TYPE=DebugFull with same result.  I always get "Active setting don' t match saved settings. You currently see saved settings." warning on top when I open the touchpad settings. Is that related?
Comment 7 GSC 2014-02-19 01:20:01 UTC
And plasma-nm doesn' t behave the same way.
Comment 8 Alexander Mezin 2014-02-19 02:23:01 UTC
Created attachment 85224 [details]
Hide KMessageWidgets in destructor

Try this patch
Comment 9 Alexander Mezin 2014-02-19 02:24:01 UTC
(In reply to comment #6)
> Tried with -DCMAKE_BUILD_TYPE=DebugFull with same result.  I always get
> "Active setting don' t match saved settings. You currently see saved
> settings." warning on top when I open the touchpad settings. Is that related?
Maybe. I had crashes caused by KMessageWidget before.
Also, if you see the message every time, then it's another bug.
Comment 10 GSC 2014-02-19 03:55:08 UTC
Created attachment 85225 [details]
crash2

Seems same with the patch. Maybe the bug isn' t in your code.
Comment 11 Alexander Mezin 2014-02-19 11:17:44 UTC
Did you try "kcmshell4 kcm_touchpad"? Does it crash too?

Also could you create separate bug report for "Active setting don' t match saved settings..."?
Comment 12 Alexander Mezin 2014-02-19 11:49:24 UTC
Please test master branch on github (it seems that AUR pkgbuild uses it). I think I found (and fixed) source of the problem.
Comment 13 GSC 2014-02-20 02:06:19 UTC
Created attachment 85240 [details]
crash3

I still get similar crash with latest git master.

It doesn' t crash in systemsettings and kcmshell4 kcm_touchpad. I will create the other bug report later.
Comment 14 Alexander Mezin 2014-02-26 20:15:41 UTC
Git commit 0aa8e26aad1c052f61664784f8ce35b14c4e1ab5 by Alexander Mezin.
Committed on 26/02/2014 at 19:58.
Pushed by alexandermezin into branch 'master'.

Workarounds for bug in KMessageWidget

KMessageWidget->animatedShow() causes crash if called in constructor
or load()

M  +13   -15   src/kcm/touchpadconfig.cpp
M  +0    -1    src/kcm/touchpadconfig.h

http://commits.kde.org/kcm-touchpad/0aa8e26aad1c052f61664784f8ce35b14c4e1ab5