Bug 278157 - KMM crashes if I click on a tab in help/aboutKMM or settings/KMM/Plugins
Summary: KMM crashes if I click on a tab in help/aboutKMM or settings/KMM/Plugins
Status: RESOLVED DUPLICATE of bug 276066
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 296626 297216 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-07-20 17:38 UTC by Jack
Modified: 2012-11-29 16:21 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
backtrace (5.64 KB, text/plain)
2011-07-20 19:53 UTC, Jack
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack 2011-07-20 17:38:01 UTC
Version:           SVN trunk (using KDE 4.6.4) 
OS:                Linux

If I click one of the tabs on either the Help/About Kmymoney or the Settings/Configure KMyMoney (Plugins) window, KMM crashes.  The Help/About KDE window does NOT crash on clicking any of the tabs.  This is every time, and I have not yet tried any other config/help windows with tabs.  

Reproducible: Always

Steps to Reproduce:
as above

Actual Results:  
crash

Expected Results:  
display the appropriate information

I am currently recompiling with debug info to get a useful backtrace.
Comment 1 Cristian Oneț 2011-07-20 19:21:02 UTC
I can't reproduce any of this, waiting for the stacktrace...
Comment 2 Jack 2011-07-20 19:53:58 UTC
Created attachment 62035 [details]
backtrace

This is from compiling as "debug."  Let me know if I need to do "debugfull."  This is from clicking on Help/About Kmymoney, and then clicking the Authors tab.
Comment 3 Marko Käning 2011-07-20 21:08:08 UTC
I am seeing the same on Mac OSX since quite a while already.
Comment 4 Jack 2011-07-20 21:55:08 UTC
I should have specified before that I do NOT see this behavior with 4.5.3 under Gentoo, but only with compiled from svn on my ArchLinux box.
Comment 5 Cristian Oneț 2011-07-21 05:23:09 UTC
Does the Help/About works for you for any other KDE application you compiled from source? I'm asking because I remember Marko's problem also and I recall that the is no KMyMoney code in the stack trace. It was rather something to do with the new features added in the About dialogs of KDE applications.
Comment 6 Marko Käning 2011-07-21 06:08:00 UTC
Hi Jack,

please read the thread http://lists.kde.org/?l=kde-devel&m=130849015817260&w=2 and references therein concerning my discussion with the responsible KDE developer, Teo Mrnjavac, on KDE-DEVELOP.

Here is actually the bug which I filed on bko. I guess you should add your information to that ticket: https://bugs.kde.org/show_bug.cgi?id=276066

He asked me back then for a more debug information.

Since then I am trying to figure out how to get an online-debuggable KDE/QT4 application built on MacOSX. Up to now unfortunately without success. :-(

SO, I think, Teo would be really grateful, if you could - now that the problem also occurs on Linux - supply him with full debug information.

Greets,
Marko
Comment 7 Marko Käning 2011-07-21 06:10:40 UTC
This bug should be marked a duplicate of 276066 !
Comment 8 Thomas Baumgart 2011-07-21 07:22:33 UTC

*** This bug has been marked as a duplicate of bug 276066 ***
Comment 9 Thomas Baumgart 2011-07-21 07:23:14 UTC
Hi Marko Käning,

on Thursday 21 July 2011 08:10:40 you wrote:

> https://bugs.kde.org/show_bug.cgi?id=278157
> 
> 
> 
> 
> 
> --- Comment #7 from Marko Käning <mk-lists email de>  2011-07-21 06:10:40
> --- This bug should be marked a duplicate of 276066 !


Done. Danke für Deinen Einsatz an dieser Stelle.
Comment 10 allan 2011-07-21 12:26:04 UTC
SVN commit 1242530 by allananderson:

BUG:278157

Add missing i18n to  tabWidget_Main->setTabText() calls.

 M  +4 -4      csvimporterdlg.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1242530
Comment 11 allan 2011-07-21 12:42:56 UTC
(In reply to comment #10)
> SVN commit 1242530 by allananderson:
> 
> BUG:278157
> 
> Add missing i18n to  tabWidget_Main->setTabText() calls.
> 
>  M  +4 -4      csvimporterdlg.cpp  
> 
> 
> WebSVN link: http://websvn.kde.org/?view=rev&revision=1242530

Please ignore this response.  I must have had two bug pages open and updated the wrong one. :-(

*** This bug has been marked as a duplicate of bug 276066 ***
Comment 12 Jack 2011-07-21 13:51:15 UTC
In response to Comment #5 - I don't have any other self-compiled KDE programs, so I don't know.  I'll see if I can find one to try, but I'll follow up in the thread and other bug Marko provided.  I do note, however, that I seem to get the same crash in Settings/Configure KMyMoney/plugins, but these might be generated by the same code as help/about.
Comment 13 Marko Käning 2011-07-21 17:34:11 UTC
Yep, Jack, you are right, it's the same code in those dialogs!
Comment 14 Jack 2011-07-30 23:15:58 UTC
It is looking more like this is not exactly the same as bug 276066.  Marko does not see the crash with svn compiled with KDE 4.3.5 OpenSuse 11.3 (virtual) but I do see the crash with svn compiled with KDE 4.6.3 Gentoo and KDE 4.7.0 Archlinux, but not with KMM 4.5.3 under either.  I also do not see it with svn compiled with KDE 4.5.5 Kubuntu (virtual).  I also do not see the crash with Marko's test program.

For those who do not see this crash - what is the highest version of KDE being used.  I am now wondering if there is some interaction between something changed in KMM after 4.5.3 with something in KDE that changed after 4.5.5.
Comment 15 Marko Käning 2011-07-31 02:12:15 UTC
A verified on OpenSUSE 12.1rc3 this is not a duplicate of the MacOSX bug 2706066.

That is why this bug should be reopened!
Comment 16 Teo Mrnjavac 2011-07-31 09:24:51 UTC
I have reason to suspect this might NOT be a duplicate of 276066, since it yields a different backtrace and it only seems to happen in a recent build of KMyMoney.
I would appreciate if KMyMoney developers could take another look.
Comment 17 Marko Käning 2011-07-31 10:44:42 UTC
I want to point out that svn revision r1219919 (probably close to KMM version 4.5.3) also crashes on KDE 4.6.5 when entering the Authors tab. (I tested this since Jack observed that KMM 4.5.3 did run fine on his systems.)
Comment 18 Jack 2011-07-31 19:14:46 UTC
I'm trying to do something like a svn bisect to find the commit that introduced the problem, but I now realize that it was introduced not after 4.5.3, but after 4.5 was tagged.  However, it does seem that it was a commit to trunk that was not backported to 4.5, so that may help find it.

What I'm doing is "svn up -r ARG", where I'm getting ARG from an "svn log" going back about a month at a time.  If there's a flaw in this approach, or a better way, please let me know.
Comment 19 Marko Käning 2011-07-31 19:16:06 UTC
This is consistent with my findings.

Your approach sounds good.

Go ahead!
Comment 20 Jack 2011-08-01 20:23:37 UTC
This has been tracked down to revision 1203403, specifically a call to qApp->setStyleSheet(....).  The specific call "qApp->setStyleSheet(QString())" does not cause the crash.

In the current revision of trunk, in kmymoney/kmymoney.cpp on line 6438, commenting out the call to qApp->setStyleSheet in the "else" clause of the "if" in "void KMyMoneyApp::Private::setCustomColors()" prevents/avoids the crash.

Given that the crash does not happen under KDE 4.5.5, but does under KDE 4.6.3 and 4.7.0, does that give any hints where to look next?
Comment 21 Marko Käning 2011-08-01 20:47:16 UTC
Nice catch!

Could this be a QT thing?

Well, probably it would make sense to figure out what the string parameter created in said qApp->setStyleSheet("...") line actually contains. Perhaps KMyMoneyGlobalSettings:: member function calls mess up for some reason?
Comment 22 Marko Käning 2011-08-01 20:55:06 UTC
Please check out comment #5 of my MacPorts ticket #28410 concerning my OSX-specific crash at http://trac.macports.org/timeline?from=2011-03-15T21%3A23%3A06%2B0200&precision=second

What a coincidence since the tickets is titled "qt4-mac crashes in QStyleSheetStyle" !

     QStyleSheetStyle() is surely connected to setStyleSheet()

All speculation, of course! :-)
Comment 23 Marko Käning 2011-08-01 20:58:13 UTC
Sorry, the link I copied into my previous comment #22 is wrong, this one is the one I meant http://trac.macports.org/ticket/28410#comment:17 and it is not #5 but #17. :-/
Comment 24 Marko Käning 2011-08-01 21:00:24 UTC
I see now that it would be hard to spot which comment the #17 in my MacPorts ticket would be.

Here it is:

> The conclusion was that "There's likely a bug in the mac implementation of QStyleSheetStyle - ".
Comment 25 Cristian Oneț 2011-08-02 07:17:12 UTC
(In reply to comment #20)
> This has been tracked down to revision 1203403, specifically a call to
> qApp->setStyleSheet(....).  The specific call "qApp->setStyleSheet(QString())"
> does not cause the crash.
> 
> In the current revision of trunk, in kmymoney/kmymoney.cpp on line 6438,
> commenting out the call to qApp->setStyleSheet in the "else" clause of the "if"
> in "void KMyMoneyApp::Private::setCustomColors()" prevents/avoids the crash.
> 
> Given that the crash does not happen under KDE 4.5.5, but does under KDE 4.6.3
> and 4.7.0, does that give any hints where to look next?

This means that the crash can be reproduced by disabling the 'Use system colors' option and going to the Help/About menu. I will try it later today and try to come up with a fix.
We already had a custom colors regarded crash in BUG 270493 but there the problem was in kmymoney code.
My guess is that for this one we'll need a workaround :) and I really hate those.
Comment 26 Jack 2011-08-02 15:13:33 UTC
(In reply to comment #25)
I had been wondering why so few people saw the crash.

However, I still wonder why a call to qApp->setStyleSheet("QTreeView, QTableView#register, QTableView#m_register, QTableView#splittable, QListView { background-color: #ffffff;alternate-background-color: #c3c3c3;background-clip: content;}") would cause a crash when hitting the author tab of the about dialog.

Should this need to be reported to a Qt list?
Comment 27 Marko Käning 2011-08-02 15:17:12 UTC
Well, I guess, we should try to feed this into my little test app and see whether it still crashes.

Then we've got a test case which we can then post on QTdev.

I'm registered there, so that would be fast.

I'll try to insert the above string into my little app, test it in my OpenSUSE virtual machines. If I see the crash I'll post to QTdev.

What do you think, Jack?
Comment 28 Cristian Oneț 2011-08-02 17:07:10 UTC
Closing this since the duplicate clearly explains why this is an upstream bug in Qt.

*** This bug has been marked as a duplicate of bug 276066 ***
Comment 29 Marko Käning 2012-02-04 09:43:14 UTC
Has been resolved in Qt 4.8.0!
Comment 30 Cristian Oneț 2012-11-29 16:21:23 UTC
*** Bug 297216 has been marked as a duplicate of this bug. ***
Comment 31 Cristian Oneț 2012-11-29 16:21:30 UTC
*** Bug 296626 has been marked as a duplicate of this bug. ***