Summary: | Amarok crashes on start | ||
---|---|---|---|
Product: | [Unmaintained] plasma4 | Reporter: | Hrvoje Senjan <hrvoje.senjan> |
Component: | general | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | asd667, aseigo, emilsedgh, gabrielortiz_26, gilboad, matje747, oldrocker99, ptesarik, rihokalbus, tomas.killian |
Priority: | NOR | Keywords: | drkonqi |
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdelibs/59e88c777b92935cc95f28e52f84fe97563dec9d | Version Fixed In: | 4.11.1 |
Sentry Crash Report: | |||
Attachments: |
Amarok workaround
New crash information added by DrKonqi New crash information added by DrKonqi proposed fix New crash information added by DrKonqi |
Description
Hrvoje Senjan
2013-06-07 10:52:10 UTC
I can confirm the crash. Rebuilding kdelibs from fe61ba48d5bb86222684919fd27f339d0e7a1013~ makes amarok work again for me. (Thanks for the hint). Created attachment 80413 [details]
Amarok workaround
I can open a review request/commit if this makes sense (for me it does, as the cause of the crash is that Amarok-Mockup theme doesn't exists anywhere)
But i don't know why it was used anyway/is there a (good) reason to keep it...
Git commit e899704b3db4af2ff228eb0d4dbbec05fb9a2448 by Mark Kretschmann, on behalf of Hrvoje Senjan. Committed on 10/06/2013 at 09:26. Pushed by markey into branch 'master'. Remove usage of (fake) Amarok-Mockup theme This is due to https://bugs.kde.org/show_bug.cgi?id=320855 Amarok-Mockup is unused, as far i can see, and also makes Amarok crash with kdelibs master/4.11 If it is still needed, or there is a better solution, i'll discard the review... >From 6b85a2899a30db5acebee92182a67778499a8d9e Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan <hrvoje.senjan@gmail.com> Date: Sun, 9 Jun 2013 19:55:58 +0200 Subject: [PATCH 1/1] Kill Amarok-Mockup FIXED-IN: 2.8 REVIEW: 110917 M +2 -0 ChangeLog M +0 -5 src/context/ContextView.cpp http://commits.kde.org/amarok/e899704b3db4af2ff228eb0d4dbbec05fb9a2448 *** Bug 321144 has been marked as a duplicate of this bug. *** Created attachment 80535 [details]
New crash information added by DrKonqi
amarok (2.7-git) on KDE Platform 4.10.80 using Qt 4.8.4
- What I was doing when the application crashed:
Just tried starting Amarok. It did not open up and crashed after a moment.
-- Backtrace (Reduced):
#6 KStandardDirs::saveLocation (this=0x17f0780, type=type@entry=0x0, suffix=..., create=create@entry=false) at /home/emilsedgh/kde/sc/kdelibs/kdecore/kernel/kstandarddirs.cpp:1499
#7 0x00007f2f43ded8fb in KStandardDirs::locateLocal (type=type@entry=0x0, filename=..., createDir=createDir@entry=false, cData=...) at /home/emilsedgh/kde/sc/kdelibs/kdecore/kernel/kstandarddirs.cpp:2117
#8 0x00007f2f43d40a9a in KConfigPrivate::changeFileName (this=this@entry=0x2579f60, name=..., type=type@entry=0x0) at /home/emilsedgh/kde/sc/kdelibs/kdecore/config/kconfig.cpp:541
#9 0x00007f2f43d58964 in KDesktopFilePrivate::KDesktopFilePrivate (this=0x2579f60, resourceType=0x0, fileName=...) at /home/emilsedgh/kde/sc/kdelibs/kdecore/config/kdesktopfile.cpp:50
#10 0x00007f2f43d59fcc in KDesktopFile::KDesktopFile (this=0x7fff4a032910, resourceType=0x0, fileName=...) at /home/emilsedgh/kde/sc/kdelibs/kdecore/config/kdesktopfile.cpp:54
(In reply to comment #5) > Created attachment 80535 [details] > New crash information added by DrKonqi > > amarok (2.7-git) on KDE Platform 4.10.80 using Qt 4.8.4 > > - What I was doing when the application crashed: > Just tried starting Amarok. It did not open up and crashed after a moment. Which exact git checkout do you use? Im on 876b34850 which does not include Mark's fix. I think its safe to mark the bug as fixed. Im having a hard time pulling the master due to weak internet connection. I will reopen if I manage to get the master and see the problem persists. Are you sure this was an amarok issue? I've upgraded to the kde 4.11 beta packages from openSUSE 12.3, and get a crash in KStandardDirs::saveLocation, KStandardDirs::locateLocal as well. Affected are plasma, kmix, krunner. Maybe it's a broken installation, but I still wonder wheter this fix for Amarok is really necessary. Created attachment 81139 [details]
New crash information added by DrKonqi
kwin (4.10.90) on KDE Platform 4.10.90 using Qt 4.8.5
- What I was doing when the application crashed:
I was logging in. Similar crashes are seen with kwin, kmix and other KDE applications.
- Additional Information:
I have analyzed the crashed application in gdb, and I believe this code in Plasma::ThemePrivate::useCache() is the real culprit:
230 if (isRegularTheme) {
231 const QString path = KStandardDirs::locate("data", "desktoptheme/" + themeName + "/metadata.desktop");
232 const KPluginInfo pluginInfo(path);
Note that "path" is a relative path and KPluginInfo::KPluginInfo is called with only one argument. However, KPluginInfo constructor is declared as:
* @param filename The filename of the .desktop file.
* @param resource If filename is relative, you need to specify a resource type
* (e.g. "service", "apps"... KStandardDirs). Otherwise,
* resource isn't used.
*/
explicit KPluginInfo( const QString & filename, const char* resource = 0 );
So, if you call it without the "resource" argument, the default value is used, which is NULL. This is invalid for a relative path, and indeed causes the crash further down the stack in KStandardDirs::saveLocation():
1499 if (dirs.isEmpty() && (
1500 (strcmp(type, "socket") == 0) ||
1501 (strcmp(type, "tmp") == 0) ||
1502 (strcmp(type, "cache") == 0) ))
Unsurprisingly, calling strcmp(NULL, something) will cause a SIGSEGV.
-- Backtrace (Reduced):
#6 KStandardDirs::saveLocation (this=0x1e88d10, type=type@entry=0x0, suffix=..., create=create@entry=false) at /usr/src/debug/kdelibs-4.10.90/kdecore/kernel/kstandarddirs.cpp:1499
#7 0x00007f954e5391b3 in KStandardDirs::locateLocal (type=0x0, filename=..., createDir=<optimized out>, cData=...) at /usr/src/debug/kdelibs-4.10.90/kdecore/kernel/kstandarddirs.cpp:2117
#8 0x00007f954e48d124 in KConfigPrivate::changeFileName (this=0x25321f0, name=..., type=0x0) at /usr/src/debug/kdelibs-4.10.90/kdecore/config/kconfig.cpp:547
#9 0x00007f954e4a5b56 in KDesktopFilePrivate::KDesktopFilePrivate (this=0x25321f0, resourceType=0x0, fileName=...) at /usr/src/debug/kdelibs-4.10.90/kdecore/config/kdesktopfile.cpp:52
#10 0x00007f954e4a72fe in KDesktopFile::KDesktopFile (this=0x7fff0f600650, resourceType=0x0, fileName=...) at /usr/src/debug/kdelibs-4.10.90/kdecore/config/kdesktopfile.cpp:56
Created attachment 81142 [details]
proposed fix
This patch fixed the crashes for me. However, I'm not sure if "data" is the correct resource type here, so it should definitely be reviewed by someone who has a clue.
FWIW the Amarok workaround patch seems to work just fine. Fedora 19, x86_64, KDE 4.10.97. *** Bug 322446 has been marked as a duplicate of this bug. *** *** Bug 323485 has been marked as a duplicate of this bug. *** (In reply to comment #9) > Created attachment 81139 [details] > New crash information added by DrKonqi > > kwin (4.10.90) on KDE Platform 4.10.90 using Qt 4.8.5 > > - What I was doing when the application crashed: > > I was logging in. Similar crashes are seen with kwin, kmix and other KDE > applications. > > - Additional Information: > > I have analyzed the crashed application in gdb, and I believe this code in > Plasma::ThemePrivate::useCache() is the real culprit: > > 230 if (isRegularTheme) { > 231 const QString path = KStandardDirs::locate("data", > "desktoptheme/" + themeName + "/metadata.desktop"); > 232 const KPluginInfo pluginInfo(path); > > Note that "path" is a relative path and KPluginInfo::KPluginInfo is called > with only one argument. However, KPluginInfo constructor is declared as: No, the path is not relative; it is empty. KStandradDirs::locate returns a full path .. unless it can't find what is being looked for. So indeed, path needs to be checked for !isEmpty() Git commit 59e88c777b92935cc95f28e52f84fe97563dec9d by Aaron Seigo. Committed on 14/08/2013 at 10:52. Pushed by aseigo into branch 'KDE/4.11'. when the request theme does not exist, delete all old caches for it and don't crash M +14 -7 plasma/theme.cpp http://commits.kde.org/kdelibs/59e88c777b92935cc95f28e52f84fe97563dec9d Created attachment 81750 [details]
New crash information added by DrKonqi
amarok (2.7.1) on KDE Platform 4.11.00 using Qt 4.8.3
- What I was doing when the application crashed:
Amarok crashed when raised from taskbar.
-- Backtrace (Reduced):
#6 KStandardDirs::saveLocation (this=0x14f6f20, type=type@entry=0x0, suffix=..., create=create@entry=false) at ../../kdecore/kernel/kstandarddirs.cpp:1511
#7 0x00007f36d775ccfb in KStandardDirs::locateLocal (type=0x0, filename=..., createDir=<optimized out>, cData=...) at ../../kdecore/kernel/kstandarddirs.cpp:2131
#8 0x00007f36d76aea3a in KConfigPrivate::changeFileName (this=0x33d3e40, name=..., type=<optimized out>) at ../../kdecore/config/kconfig.cpp:547
#9 0x00007f36d76c6dd3 in KDesktopFilePrivate::KDesktopFilePrivate (this=0x33d3e40, resourceType=0x0, fileName=...) at ../../kdecore/config/kdesktopfile.cpp:60
#10 0x00007f36d76c6e2c in KDesktopFile::KDesktopFile (this=0x7fffbba6bfd0, resourceType=0x0, fileName=...) at ../../kdecore/config/kdesktopfile.cpp:64
*** Bug 323611 has been marked as a duplicate of this bug. *** *** Bug 323714 has been marked as a duplicate of this bug. *** *** Bug 323780 has been marked as a duplicate of this bug. *** I can confirm that Aaron's commit 59e88c777b92935cc95f28e52f84fe97563dec9d fixes the crash for me. *** Bug 324327 has been marked as a duplicate of this bug. *** |