Opened 14 years ago
Closed 13 years ago
#28410 closed defect (fixed)
qt4-mac crashes in QStyleSheetStyle
Reported by: | mkae (Marko Käning) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.2 |
Keywords: | Cc: | sharky@…, nerdling (Jeremy Lavergne) | |
Port: | qt4-mac, kmymoney4 |
Description
When I start kmymoney4, then go to Preferences/Plugin, select the info button of one of the plugins (e.g. libofx) and then click the authors button in the upcoming about dialog the application crashes:
kmymoney(23091)/kdecore (KLibrary) kde4Factory: The library "/opt/macports-test/lib/kde4/kmm_ofximport.so" does not offer a qt_plugin_instance function. Plugin paths: ("/opt/macports-test/share/qt4/plugins", "") Trying to load Attica plugin: "/opt/macports-test/share/qt4/plugins/attica_kde.so" Trying to load Attica plugin: "/attica_kde.so" Using Attica without KDE support KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = kmymoney path = /opt/macports-test/Applications/KDE4/kmymoney.app/Contents/MacOS pid = 23091 KCrash: Arguments: /opt/macports-test/Applications/KDE4/kmymoney.app/Contents/MacOS/kmymoney --nocrashhandler KCrash: Attempting to start from kdeinit sock_file=/Users/marko/Library/Preferences/KDE/socket-markos-imac/kdeinit4__tmp_launch-l0B4K5_org.x_0 Warning: connect() failed: : No such file or directory KCrash: Attempting to start directly Unable to start Dr. Konqi KCrash failed to exec(), errno = 2
Attica doesn't contain any .so if you check for it:
[ MP-devel ] :kmymoney marko$ port contents attica Port attica contains: . . . /opt/macports-test/lib/libattica.0.2.0.dylib /opt/macports-test/lib/libattica.0.dylib /opt/macports-test/lib/libattica.dylib . . .
What can be done to avoid this? Is this a KDE issue, or is it caused by the way how kmymoney4 itself handles the plugins?
Attachments (1)
Change History (44)
comment:1 Changed 14 years ago by mkae (Marko Käning)
comment:2 Changed 14 years ago by michaelld (Michael Dickens)
So are you saying that you expect libattica* to be in ${prefix}/share/qt4/plugins ? is there anything in that directory now besides other directories? It's simple to change the install location of attica, but we should place it in a subdirectory of 'plugins' if at all possible. I just need to understand what the issue actually is beyond that kmymoney4 does not work with attica -- is it just that attica isn't installed correctly, or something more?
comment:4 Changed 14 years ago by mkae (Marko Käning)
Well, I don't know, Michael, where they should be installed to tell you the truth. It could still be that kmymoney4 is misconfigured and searches for the lib at the wrong location. Just tried to crosscheck with another kmymoney4 installation on a linux virtual machine, but there I don't have any plugins installed... So, it's hard to check against a linux KDE.
I hope someone else has more experience with this...
Should I contact the KMyMoney4 developers?
comment:5 Changed 14 years ago by michaelld (Michael Dickens)
OK. Why don't you contact the kMyMoney4 developers, and I'll look further into Attica's build scripts to see if maybe something is going wrong. My initial / quick review the other day shows that ${prefix}/lib is the default install location of libattica, and that it's not a plugin -- but I was going pretty quickly & might have missed something.
comment:6 Changed 14 years ago by mkae (Marko Käning)
Did contact them. Let's see what it brings. Could be I have to post to KDE's mailing list instead...
comment:7 Changed 14 years ago by mkae (Marko Käning)
It turns out that kdebase4-runtime is a necessary dep:
[ MP-devel ] :~ marko$ port contents kdebase4-runtime | grep attica /opt/macports-test/lib/attica_kde.so /opt/macports-test/lib/kde4/kcm_attica.so /opt/macports-test/share/kde4/services/kcm_attica.desktop
since that's where we find the attica_kde.so!!!
But still KMM crashes, because it searches in the wrong location. I'm wondering where the plugin paths get actually set...
Plugin paths: ("/opt/macports-test/share/qt4/plugins", "")
comment:8 Changed 14 years ago by mkae (Marko Käning)
Hi, this is what I heard from a KMM developer:
Hi, This is definitely a configuration problem. The attica dependency in the about dialog was added in KDE 4.6 AFAIK to display extra developer data. If that causes a crash it means that something was not installed appropriately or it's a bug in kdelibs. Regards, Cristian
which is consistent with my other findings from above.
So, I guess the kdebase4-runtime installation needs to be mended a little.
comment:9 Changed 14 years ago by mkae (Marko Käning)
Port: | kdebase4-runtime added; attica removed |
---|
kdebase4-runtime dep fixed in r76233, but kdebase4-runtime itself still needs fixing concerning the plugin path.
comment:10 Changed 14 years ago by michaelld (Michael Dickens)
Looks like "we" need to change the file "kdebase-runtime-4.6.0/attica/kdeplugin/CMakeLists.txt" from:
install(TARGETS attica_kde EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})
to some other install location. I'm doing 'configure' right now to see what QT variables end up in the CMakeCache.txt file to see if there's one set for QT_PLUGINS (or the like).
comment:11 Changed 14 years ago by michaelld (Michael Dickens)
Looks like we can use "QT_PLUGINS_DIR", which will need to be inserted into the variable "INSTALL_TARGETS_DEFAULT_ARGS" somehow. Haha; found something funny. In the file "${prefix}/share/apps/cmake/modules/FindKDE4Internal.cmake", when discussing this variable (starting line 151):
# The variable INSTALL_TARGETS_DEFAULT_ARGS can be used when installing libraries # or executables into the default locations. [snip] # The variable MUST NOT be used for installing plugins.
So, I'd suggest changing the above quoted line to something like:
install(TARGETS attica_kde EXPORT kdelibsLibraryTargets LIBRARY DESTINATION "${QT_PLUGINS_DIR}")
and then give that a try.
comment:12 Changed 14 years ago by michaelld (Michael Dickens)
I'm trying out the above line right now, to see where it ends up installing ... more later.
comment:13 Changed 14 years ago by michaelld (Michael Dickens)
The line works, but I'd add a subdirectory, maybe:
install(TARGETS attica_kde EXPORT kdelibsLibraryTargets LIBRARY DESTINATION "${QT_PLUGINS_DIR}/kde4")
to make it clear that it's a plugin for KDE4. Maybe there's a better subdirectory name?
comment:14 Changed 14 years ago by michaelld (Michael Dickens)
I'm attaching a patchfile that will install the plugin into "${QT_PLUGINS_DIR}/kde4". MK, can you give it a whirl when you get a chance?
Changed 14 years ago by michaelld (Michael Dickens)
Attachment: | patch-attica_kdeplugins_CMakeLists.txt.diff added |
---|
Patchfile for kdebase4-runtime to change install location of attica kde/qt plugin
comment:15 Changed 14 years ago by mkae (Marko Käning)
When I omit your subdirectory KDE says "Using Attica with KDE support", which is different to before, but KMM still crashes:
kmymoney(96088)/kio (Scheduler) KIO::SchedulerPrivate::jobFinished: KIO::TransferJob(0x11a7f7480) KIO::Slave(0x11a641d90) Plugin paths: ("/opt/macports-test/share/qt4/plugins", "/Users/marko/Library/Preferences/KDE/lib/", "/opt/macports-test/lib/") Trying to load Attica plugin: "/opt/macports-test/share/qt4/plugins/attica_kde.so" Using Attica with KDE support Plugin paths: ("/opt/macports-test/share/qt4/plugins", "/Users/marko/Library/Preferences/KDE/lib/", "/opt/macports-test/lib/") Trying to load Attica plugin: "/opt/macports-test/share/qt4/plugins/attica_kde.so" Using Attica with KDE support kmymoney(96088)/kdecore (kdelibs) getBundle: getBundle( "/opt/macports-test/lib/kde4/libexec/update-mime-database" , false ) called kmymoney(96088)/kdecore (kdelibs) getBundle: getBundle( "/opt/macports-test/bin/update-mime-database" , false ) called kmymoney(96088)/kdecore (kdelibs) KStandardDirs::findExe: findExe(): returning "/opt/macports-test/bin/update-mime-database" KCrash: crashing... crashRecursionCounter = 2 KCrash: Application Name = kmymoney path = /opt/macports-test/Applications/KDE4/kmymoney.app/Contents/MacOS pid = 96088 KCrash: Arguments: /opt/macports-test/Applications/KDE4/kmymoney.app/Contents/MacOS/kmymoney --nocrashhandler KCrash: Attempting to start /opt/macports-test/lib/kde4/libexec/drkonqi.app/Contents/MacOS/drkonqi from kdeinit sock_file=/Users/marko/Library/Preferences/KDE/socket-markos-imac/kdeinit4__tmp_launch-48DOTy_org.x_0 Warning: connect() failed: : No such file or directory KCrash: Attempting to start /opt/macports-test/lib/kde4/libexec/drkonqi.app/Contents/MacOS/drkonqi directly Unable to start Dr. Konqi
so, it looks like it is not an attica issue after all!
Is perhaps /opt/macports-test/bin/update-mime-database the culprit here? Guess I have to run KMM through gdb...
comment:16 Changed 14 years ago by mkae (Marko Käning)
Here is what I get:
kmymoney(96285)/kdecore (kdelibs) getBundle: getBundle( "/opt/macports-test/bin/update-mime-database" , false ) called kmymoney(96285)/kdecore (kdelibs) KStandardDirs::findExe: findExe(): returning "/opt/macports-test/bin/update-mime-database" Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008 0x000000010499ba80 in containerWidget () (gdb) bt f #0 0x000000010499ba80 in containerWidget () No symbol table info available. #1 0x00000001049b180d in QStyleSheetStyle::drawPrimitive () No symbol table info available. #2 0x0000000101d93ef3 in KDEPrivate::KAboutApplicationPersonListDelegate::paint () No symbol table info available. #3 0x0000000104baf6c8 in QListView::paintEvent () No symbol table info available. #4 0x000000010471252a in QWidget::event () No symbol table info available. #5 0x0000000104a6fe1c in QFrame::event () No symbol table info available. #6 0x0000000104afb367 in QAbstractScrollArea::viewportEvent () No symbol table info available. #7 0x0000000104b8c65b in QAbstractItemView::viewportEvent () No symbol table info available. #8 0x0000000104afd840 in QAbstractScrollAreaFilter::eventFilter () No symbol table info available. #9 0x00000001043b9de7 in QCoreApplicationPrivate::sendThroughObjectEventFilters () No symbol table info available. #10 0x00000001046baf4e in QApplicationPrivate::notify_helper () No symbol table info available. #11 0x00000001046c214d in QApplication::notify () No symbol table info available. #12 0x0000000101e28610 in KApplication::notify () No symbol table info available. #13 0x00000001042de0dc in QCoreApplication::notifyInternal () No symbol table info available. #14 0x00000001046bbb9c in qt_sendSpontaneousEvent () No symbol table info available. #15 0x00000001046656dd in -[QCocoaView drawRect:] () No symbol table info available. #16 0x00007fff8889bc49 in -[NSView _drawRect:clip:] () No symbol table info available. #17 0x00007fff8889a8bc in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () No symbol table info available. #18 0x00007fff8889ac26 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () No symbol table info available. #19 0x00007fff8889ac26 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () No symbol table info available. #20 0x00007fff8889ac26 in -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] () No symbol table info available. #21 0x00007fff88898f8e in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] () No symbol table info available. #22 0x00007fff88899e5a in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] () No symbol table info available. #23 0x00007fff88899e5a in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] () No symbol table info available. #24 0x00007fff88899e5a in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] () No symbol table info available. #25 0x00007fff88899e5a in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] () No symbol table info available. #26 0x00007fff88899e5a in -[NSView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] () No symbol table info available. #27 0x00007fff88898ab0 in -[NSThemeFrame _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:] () No symbol table info available. #28 0x00007fff88895362 in -[NSView _displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:] () No symbol table info available. #29 0x00007fff8880eb9a in -[NSView displayIfNeeded] () No symbol table info available. #30 0x00000001046609c7 in -[QCocoaPanel displayIfNeeded] () No symbol table info available. #31 0x00007fff88809a46 in _handleWindowNeedsDisplay () No symbol table info available. #32 0x00007fff825b6b37 in __CFRunLoopDoObservers () No symbol table info available. #33 0x00007fff82592464 in __CFRunLoopRun () No symbol table info available. #34 0x00007fff82591dbf in CFRunLoopRunSpecific () No symbol table info available. #35 0x00007fff8370c93a in RunCurrentEventLoopInMode () No symbol table info available. #36 0x00007fff8370c69d in ReceiveNextEventCommon () No symbol table info available. #37 0x00007fff8370c5f8 in BlockUntilNextEventMatchingListInMode () No symbol table info available. #38 0x00007fff887dee64 in _DPSNextEvent () No symbol table info available. #39 0x00007fff887de7a9 in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] () No symbol table info available. #40 0x00007fff887a448b in -[NSApplication run] () No symbol table info available. #41 0x0000000104677065 in QEventDispatcherMac::processEvents () No symbol table info available. #42 0x00000001043b94a4 in QEventLoop::processEvents () No symbol table info available. #43 0x00000001043b97c4 in QEventLoop::exec () No symbol table info available. #44 0x00000001043badcc in QCoreApplication::exec () No symbol table info available. #45 0x000000010000e8c1 in main (argc=1, argv=0x7fff5fbff570) at /opt/macports-test/var/macports/build/_Users_marko_WC_MacPorts_ports_kde_kmymoney4-devel/work/kmymoney/kmymoney/main.cpp:260 importfile = { static null = {<No data fields>}, static shared_null = { ref = { _q_value = 49717 }, alloc = 0, size = 0, data = 0x10451d37a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0} }, static shared_empty = { ref = { _q_value = 233 }, alloc = 0, size = 0, data = 0x10451d39a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0} }, d = 0x10451d360, static codecForCStrings = 0x0 } url = { <QUrl> = { d = 0x105eb7710 }, members of KUrl: d = 0x0 } feature = { static null = {<No data fields>}, static shared_null = { ref = { _q_value = 49717 }, alloc = 0, size = 0, data = 0x10451d37a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0} }, static shared_empty = { ref = { _q_value = 233 }, alloc = 0, size = 0, data = 0x10451d39a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0} }, d = 0x10451d360, static codecForCStrings = 0x0 } aboutData = { d = 0x105d12110 } options = { d = 0x105d13a20 } a = (KApplication *) 0x105d172a0 splash = (KStartupLogo *) 0x105e0fed0 language = { static null = {<No data fields>}, static shared_null = { ref = { _q_value = 49717 }, alloc = 0, size = 0, data = 0x10451d37a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0} }, static shared_empty = { ref = { _q_value = 233 }, alloc = 0, size = 0, data = 0x10451d39a, clean = 0, simpletext = 0, righttoleft = 0, asciiCache = 0, capacity = 0, reserved = 0, array = {0} }, d = 0x10451d380, static codecForCStrings = 0x0 } rc = <value temporarily unavailable, due to optimizations> (gdb)
which looks more like a KDE issue... Should this be communicated to the KDE developers? What do you think Michael?
comment:17 Changed 14 years ago by mkae (Marko Käning)
I posted concerning this to KDE-Develop mailing list.
The conclusion was that "There's likely a bug in the mac implementation of QStyleSheetStyle - ".
Looks like one would have to contact QT!
comment:18 Changed 14 years ago by mkae (Marko Käning)
Port: | qt4-mac added; kdebase4-runtime removed |
---|---|
Summary: | attica crashes kmymoney4 → qt4-mac crashes in QStyleSheetStyle |
comment:19 Changed 14 years ago by nerdling (Jeremy Lavergne)
Cc: | snc@… added; michaelld@… removed |
---|---|
Owner: | changed from snc@… to Michael Dickens <michaelld@…> |
comment:20 Changed 14 years ago by michaelld (Michael Dickens)
Did the update to Qt 4.7.2 fix this issue?
comment:22 Changed 14 years ago by michaelld (Michael Dickens)
Have you checked out Qt's bug tracker / forums? Seems like this is an upstream problem, and, most probably, -way- beyond the scope of my knowledge.
comment:23 Changed 14 years ago by mkae (Marko Käning)
No, I haven't yet, due to lack of time, and I have to admit: lack of expertise, as well.
Unfortunately I haven't yet managed to set up my qt4-mac in such a way that I can get line numbers from within qt4-mac, which would be needed if I post upstream to the QT folks. :-/
Up to now I can do this with some nasty xcode workarounds for kmymoney4-devel itself, but not yet for qt4-mac. For some reason I am also having problems with gdb, which never wants to correctly find the object and corresponding source code.
comment:24 Changed 14 years ago by michaelld (Michael Dickens)
IIRC (from testing a long while ago): To get qt4-mac to play nice with Apple's gdb, you'll need to add "-no-dwarf2" to the list of configure.args (e.g., on line 231 of the current Portfile). You'll also need to specify "port -k install qt4-mac +debug" when building. This combination will result in somewhat longer compile time, but the end-result libraries should contain everything they need for gdb. Again, IIRC, and YMMV. Also IIRC, I didn't move to using "-no-dwarf2" because (1) the longer compile time & larger end-result libraries & executable & apps; and (2) Qt warns that using it will crash 10.4 with <= 2 GB of DRAM (or, some such limitation).
comment:25 Changed 14 years ago by mkae (Marko Käning)
Thanks so much for the hint, Michael!!!'''
I know about "port -k install qt4-mac +debug", but the -no-dwarf2 is obviously what I was missing, obviously.
That's great!
Since it takes ages to rebuild qt4-mac I'll have to postpone this issue for a while though.
comment:26 Changed 14 years ago by michaelld (Michael Dickens)
You're welcome; good luck; and, postponing works just fine for me :}
comment:27 Changed 14 years ago by mkae (Marko Käning)
Especially since it's nothing critical. Just an annoyance. :-)
comment:28 Changed 14 years ago by mkae (Marko Käning)
See this ticket for a short description concerning my gdb issues: #16102
comment:29 Changed 13 years ago by mkae (Marko Käning)
This seems to be a KDE issue concerning addAuthors(), see also http://developer.qt.nokia.com/forums/viewthread/6725/
comment:30 Changed 13 years ago by mkae (Marko Käning)
comment:31 Changed 13 years ago by mkae (Marko Käning)
Most annoying with respect to QT is that I am simply unable to get a QT application to run when I use the debug version of the QT libs. See e.g. http://developer.qt.nokia.com/forums/viewthread/6748/ X-(
comment:32 Changed 13 years ago by mkae (Marko Käning)
The cause of this - tested so far only under Linux - is a QT bug which had been fixed in QT 4.7.4. (See https://bugreports.qt.nokia.com/browse/QTBUG-19872 )
Michael, there is by now already QT 4.8.0-tp available. Did you consider upgrading qt4-mac? In that case I could check whether the bug seen on MacOSX is identical with the one on Linux. (Should be though.)
comment:33 Changed 13 years ago by michaelld (Michael Dickens)
I'm working on updating qt4-mac-devel to 4.8.0-beta1, since it's newer than 4.8.0-tp ("technology preview"?). I'm glad they've fixed this bug, but why not just release 4.7.4? Hmppph.
comment:34 Changed 13 years ago by mkae (Marko Käning)
Yeah, I also wondered why they didn't release the 4.7.4...
comment:35 Changed 13 years ago by michaelld (Michael Dickens)
I just upgraded qt4-mac to 4.7.4. Is this ticket still applicable?
comment:36 Changed 13 years ago by mkae (Marko Käning)
Hey, Michael, great to see that they eventually came out with the 4.7.4 and we didn't have to wait for the 4.8.0 release.
I'll test whether this ticket is still applicable and let you know.
Thanks, Marko
comment:37 Changed 13 years ago by mkae (Marko Käning)
I have to admit that I am now able to click from About to Authors tab in the About dialog... but still, when I leave the dialog with the Close button it crashes:
KCrash: Application 'tutorial2' crashing... KCrash: Attempting to start /opt/macports-test/lib/kde4/libexec/drkonqi.app/Contents/MacOS/drkonqi from kdeinit sock_file=/Users/marko/Library/Preferences/KDE/socket-markos-imac/kdeinit4__tmp_launch-v9KjfL_org.x_0 Warning: connect() failed: : No such file or directory KCrash: Attempting to start /opt/macports-test/lib/kde4/libexec/drkonqi.app/Contents/MacOS/drkonqi directly Unable to start Dr. Konqi
So, I am afraid 4.7.4 still doesn't fix this issue completely. :-(
comment:38 Changed 13 years ago by mkae (Marko Käning)
The bug has been reopened at https://bugreports.qt.nokia.com/browse/QTBUG-19872 by now.
comment:39 Changed 13 years ago by mkae (Marko Käning)
Thanks to Jack's hint on https://bugs.kde.org/show_bug.cgi?id=276066#c35 it could be verified that QT 4.7.4 still doesn't contain the necessary bug fix.
So, we'll have to wait a little longer with the resolution of this one.
comment:40 Changed 13 years ago by michaelld (Michael Dickens)
Owner: | changed from Michael Dickens <michaelld@…> to michaelld@… |
---|
mk - Do you know if this is still an issue?
comment:41 Changed 13 years ago by mkae (Marko Käning)
Hi Michael, yes, as written 2 posts up, with the current 4.7.4 it still is. Greets, Marko
comment:42 Changed 13 years ago by mkae (Marko Käning)
Hi Michael, I applied the patch included in ticket #31517 and built phonon successfully without QT7 support.
Then I installed kdelibs4, oxygen-icons, kde4-runtime on top of it and built and ran my test program from https://bitbucket.org/mkae/kde-tests/src/657783eb89c8/AboutBoxCrash SUCCESSFULLY, eventually!!!
This means that Qt 4.8.0 solves this issue.
Now only #30425 is the show stopper, but this issue here can be marked as resolved.
comment:43 Changed 13 years ago by mkae (Marko Käning)
Resolution: | → fixed |
---|---|
Status: | new → closed |
Happens also in the normal About dialog when clicking on "Authors" or "Thanks To" buttons.