Bug 232757 - kmymoney crash on going to Planning:Calendar
Summary: kmymoney crash on going to Planning:Calendar
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-30 22:03 UTC by Alexander Trubitsyn
Modified: 2011-08-22 16:11 UTC (History)
4 users (show)

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


Attachments
New crash information added by DrKonqi (5.39 KB, text/plain)
2010-08-30 14:00 UTC, victormg
Details
New crash information added by DrKonqi (11.95 KB, text/plain)
2010-09-30 19:10 UTC, IVK
Details
New crash information added by DrKonqi (14.41 KB, text/plain)
2010-12-26 20:18 UTC, abyss.andrey
Details
New crash information added by DrKonqi (13.22 KB, text/plain)
2011-08-22 15:34 UTC, Belomir
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Trubitsyn 2010-03-30 22:03:33 UTC
Application that crashed: kmymoney
Version of the application: 3.96.1
KDE Version: 4.3.5 (KDE 4.3.5) "release 0"
Qt Version: 4.5.3
Operating System: Linux 2.6.34-rc2-4-desktop x86_64
Distribution: "openSUSE 11.2 (x86_64)"

What I was doing when the application crashed:
Make some transaction on several account, then goto Planning and point to the tab "Calendar" by mouse. At this time KMyMoney Crashes.
This is reproducing situation. I try 3 times and program crashes every time at the same point.

 -- Backtrace:
Application: KMyMoney (kmymoney), signal: Segmentation fault
[KCrash Handler]
#5  0x00007fa012537453 in QString::append (this=0x7fffd9c9ede0, str=...) at tools/qstring.cpp:1305
#6  0x0000000000746b9c in operator+= (s=<value optimized out>, this=<value optimized out>) at /usr/include/QtCore/qstring.h:269
#7  kMyMoneyScheduledDateTbl::addDayPostfix (s=<value optimized out>, this=<value optimized out>) at /usr/src/kmymoney-3.96.1/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:326
#8  0x00000000007489e6 in kMyMoneyScheduledDateTbl::drawCellContents (this=0x10b1620, painter=<value optimized out>, theDate=...)
    at /usr/src/kmymoney-3.96.1/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:138
#9  0x000000000077d265 in kMyMoneyDateTbl::paintCell (this=0x10b1620, painter=<value optimized out>, row=1, col=<value optimized out>)
    at /usr/src/kmymoney-3.96.1/kmymoney/widgets/kmymoneydatetbl.cpp:238
#10 0x00007fa015a9d498 in Q3GridView::drawContents(QPainter*, int, int, int, int) () from /usr/lib64/libQt3Support.so.4
#11 0x00007fa015aafa95 in Q3ScrollView::drawContentsOffset(QPainter*, int, int, int, int, int, int) () from /usr/lib64/libQt3Support.so.4
#12 0x00007fa015ab0579 in Q3ScrollView::viewportPaintEvent(QPaintEvent*) () from /usr/lib64/libQt3Support.so.4
#13 0x00007fa015ab1918 in Q3ScrollView::eventFilter(QObject*, QEvent*) () from /usr/lib64/libQt3Support.so.4
#14 0x00007fa0125d9127 in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=<value optimized out>, receiver=0x10b0390, event=0x7fffd9c9f780) at kernel/qcoreapplication.cpp:726
#15 0x00007fa011aa527c in QApplicationPrivate::notify_helper (this=0xc78640, receiver=0x10b0390, e=0x7fffd9c9f780) at kernel/qapplication.cpp:4061
#16 0x00007fa011aac57e in QApplication::notify (this=0xc78540, receiver=0x10b0390, e=0x7fffd9c9f780) at kernel/qapplication.cpp:4030
#17 0x00007fa0149cb016 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#18 0x00007fa0125d9ddc in QCoreApplication::notifyInternal (this=0xc78540, receiver=0x10b0390, event=0x7fffd9c9f780) at kernel/qcoreapplication.cpp:610
#19 0x00007fa011afae93 in sendSpontaneousEvent (event=<value optimized out>, receiver=<value optimized out>) at ../../src/corelib/kernel/qcoreapplication.h:216
#20 QWidgetPrivate::drawWidget (event=<value optimized out>, receiver=<value optimized out>) at kernel/qwidget.cpp:5084
#21 0x00007fa011c6b9fe in QWidgetBackingStore::sync (this=0xd2c510) at painting/qbackingstore.cpp:1264
#22 0x00007fa011aed300 in QWidgetPrivate::syncBackingStore (this=0xd75460) at kernel/qwidget.cpp:1603
#23 0x00007fa011af38e8 in QWidget::event (this=0xd80be0, event=0x1d6cba0) at kernel/qwidget.cpp:7832
#24 0x00007fa011e4d0bb in QMainWindow::event (this=0xd80be0, event=0x1d6cba0) at widgets/qmainwindow.cpp:1399
#25 0x00007fa014ad6523 in KXmlGuiWindow::event(QEvent*) () from /usr/lib64/libkdeui.so.5
#26 0x00007fa011aa52ac in QApplicationPrivate::notify_helper (this=0xc78640, receiver=0xd80be0, e=0x1d6cba0) at kernel/qapplication.cpp:4065
#27 0x00007fa011aac57e in QApplication::notify (this=0xc78540, receiver=0xd80be0, e=0x1d6cba0) at kernel/qapplication.cpp:4030
#28 0x00007fa0149cb016 in KApplication::notify(QObject*, QEvent*) () from /usr/lib64/libkdeui.so.5
#29 0x00007fa0125d9ddc in QCoreApplication::notifyInternal (this=0xc78540, receiver=0xd80be0, event=0x1d6cba0) at kernel/qcoreapplication.cpp:610
#30 0x00007fa0125da9ea in sendEvent (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.h:213
#31 QCoreApplicationPrivate::sendPostedEvents (event=<value optimized out>, receiver=<value optimized out>) at kernel/qcoreapplication.cpp:1247
#32 0x00007fa012602803 in sendPostedEvents () at kernel/qcoreapplication.h:218
#33 postEventSourceDispatch () at kernel/qeventdispatcher_glib.cpp:276
#34 0x00007fa00c472dee in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#35 0x00007fa00c4767b8 in ?? () from /usr/lib64/libglib-2.0.so.0
#36 0x00007fa00c4768e0 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#37 0x00007fa0126023a3 in QEventDispatcherGlib::processEvents (this=0xc56930, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:407
#38 0x00007fa011b3831e in QGuiEventDispatcherGlib::processEvents (this=0x7fffd9c9ede0, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:202
#39 0x00007fa0125d8712 in QEventLoop::processEvents (this=<value optimized out>, flags=) at kernel/qeventloop.cpp:149
#40 0x00007fa0125d8ae4 in QEventLoop::exec (this=0x7fffd9ca0660, flags=) at kernel/qeventloop.cpp:201
#41 0x00007fa0125dac99 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:888
#42 0x000000000045dcf8 in main (argc=<value optimized out>, argv=<value optimized out>) at /usr/src/kmymoney-3.96.1/kmymoney/main.cpp:273

Reported using DrKonqi
Comment 1 Alexander Trubitsyn 2010-03-30 22:09:52 UTC
May be not "Planning" but "Payments" - i can't find how to switch program interface from Russian to English. On Russian it is "Платежи" и закладка "Календарь"
Comment 2 Alvaro Soliverez 2010-03-31 14:56:15 UTC
That would be Scheduled Transactions.
Could you try with the newer version, 3.97?
Comment 3 Cristian Oneț 2010-04-10 15:58:07 UTC
SVN commit 1113328 by conet:

BUG: 232757
Make sure that an improper translation will not cause a crash.

 M  +5 -2      kmymoneyscheduleddatetbl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1113328
Comment 4 Alexander Trubitsyn 2010-04-13 20:58:10 UTC
Thank you, Alvaro.
There is no this bug On 3.97.2, but i try new version without russian interface, only with engish one.
Comment 5 victormg 2010-08-30 14:00:07 UTC
Created attachment 51106 [details]
New crash information added by DrKonqi

kmymoney (4.5.0) on KDE Platform 4.5.00 (KDE 4.5.0) using Qt 4.6.3

Every time i try to open Calendar View tab in Scheduled Transactions kmymoney was crashed. It happen only in Russian interface.

-- Backtrace (Reduced):
#7  QString::append (this=0xbff0df64, str=@0x8fc49b8) at tools/qstring.cpp:1455
#8  0x08384d61 in kMyMoneyScheduledDateTbl::addDayPostfix(QString&) ()
#9  0x08385ebf in kMyMoneyScheduledDateTbl::drawCellContents(QPainter*, QStyleOptionViewItem const&, QModelIndex const&, QDate const&) ()
#11 0xb5e045d7 in QTableViewPrivate::drawCell (this=0x891f3a8, painter=0xbff0e3e4, option=..., index=...) at itemviews/qtableview.cpp:935
#12 0xb5e10f1a in QTableView::paintEvent (this=0x891f2e0, event=0x8fcd388) at itemviews/qtableview.cpp:1407
Comment 6 Alvaro Soliverez 2010-08-30 14:16:48 UTC
Can someone else confirm this happening on a non-Russian translated interface or is this specific to that language?
Comment 7 Thomas Baumgart 2010-08-30 14:50:55 UTC
I scanned the source and found out, that the russian kmymoney.po contains the following section:

#: kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:273
msgctxt ""
"These are the suffix strings of the days in the calendar view; please make "
"sure that you keep all the 30 separators (the '-' character) when translating"
msgid ""
"st-nd-rd-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-st-nd-rd-th-th-"
"th-th-th-th-th-st"
msgstr " "

whereas the German on contains:

#: kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:273
msgctxt ""
"These are the suffix strings of the days in the calendar view; please make "
"sure that you keep all the 30 separators (the '-' character) when translating"
msgid ""
"st-nd-rd-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-th-st-nd-rd-th-th-"
"th-th-th-th-th-st"
msgstr "------------------------------"

The comment says to keep the 30 dashes, but in the russian version they are gone. Could that lead to the problem?
Comment 8 Alvaro Soliverez 2010-08-30 15:11:41 UTC
Yes, that's probably the problem. Is it absolutely necessary to have that string as translatable string?
Comment 9 Alvaro Soliverez 2010-09-01 04:40:07 UTC
SVN commit 1170476 by asoliverez:

Skip the postDay suffix calculation if a string is not translated correctly

BUG:232757

 M  +5 -3      kmymoneyscheduleddatetbl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1170476
Comment 10 Cristian Oneț 2010-09-01 09:51:10 UTC
Hi,

I've already fixed this previously but it seems that I've fixed it the wrong way :) see the comment "// make sure that an improper translation will not cause a crash" and this diff http://websvn.kde.org/trunk/extragear/office/kmymoney/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp?r1=1079021&r2=1113328&pathrev=1170476

The current solution still has the BUG I've introduced then:
" if (postfixList.size() <= d) " should actually be
" if (d <= postfixList.size()) " and then the last change of Alvaro can also be reverted.

In the current implementation I think that suffixes are not visible since "postfixList.size() <= d" always evaluates to false (it's correct only when d=31).

Can someone fix this please?
Comment 11 Alvaro Soliverez 2010-09-01 11:40:10 UTC
SVN commit 1170518 by asoliverez:

Reverted previous fixed and done as per Cristian's suggestion.

BUG:232757

 M  +4 -6      kmymoneyscheduleddatetbl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1170518
Comment 12 Alvaro Soliverez 2010-09-01 11:46:59 UTC
SVN commit 1170521 by asoliverez:

Backported fix to stable branch

BUG:232757

 M  +1 -1      kmymoneyscheduleddatetbl.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1170521
Comment 13 IVK 2010-09-30 19:10:49 UTC
Created attachment 52124 [details]
New crash information added by DrKonqi

kmymoney (4.5.0) on KDE Platform 4.5.1 (KDE 4.5.1) using Qt 4.7.0

- What I was doing when the application crashed:

Платежи - Календарь - crashed

Ошибка повторяется постоянно. Способ устранения не понятен, если не собирать из исходников.

-- Backtrace (Reduced):
#7  0xb5725d86 in QString::append(QString const&) () from /usr/lib/libQtCore.so.4
#8  0x083d6c46 in operator+= (this=0x92be428, text=...) at /usr/include/qt4/QtCore/qstring.h:281
#9  kMyMoneyScheduledDateTbl::addDayPostfix (this=0x92be428, text=...) at /build/buildd/kmymoney-4.5/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:275
#10 0x083d83a8 in kMyMoneyScheduledDateTbl::drawCellContents (this=0x92be428, painter=0xbfc2f794, option=..., index=..., theDate=...) at /build/buildd/kmymoney-4.5/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:106
#11 0x085a1789 in KMyMoneyDateTbDelegate::paint (this=0x92ca150, painter=0xbfc2f794, option=..., index=...) at /build/buildd/kmymoney-4.5/kmymoney/widgets/kmymoneydatetbl.cpp:181
Comment 14 abyss.andrey 2010-12-26 20:18:29 UTC
Created attachment 55266 [details]
New crash information added by DrKonqi

kmymoney (4.5.0) on KDE Platform 4.5.4 (KDE 4.5.4) using Qt 4.7.0

- What I was doing when the application crashed:

I selected "Scheduled transactions" -> "Calendar View" and got a crash.
It happends every time. I can't see "Calendar View" at all.

(KMyMoney 4.5.0 KDE 4.5.4)

-- Backtrace (Reduced):
#7  0x023a4d86 in QString::append (this=0xbff76d2c, str=...) at tools/qstring.cpp:1499
#8  0x083d6c46 in operator+= (this=0x8df1220, text=...) at /usr/include/qt4/QtCore/qstring.h:281
#9  kMyMoneyScheduledDateTbl::addDayPostfix (this=0x8df1220, text=...) at /build/buildd/kmymoney-4.5/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:275
#10 0x083d83a8 in kMyMoneyScheduledDateTbl::drawCellContents (this=0x8df1220, painter=0xbff77194, option=..., index=..., theDate=...) at /build/buildd/kmymoney-4.5/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:106
#11 0x085a1789 in KMyMoneyDateTbDelegate::paint (this=0x8df9228, painter=0xbff77194, option=..., index=...) at /build/buildd/kmymoney-4.5/kmymoney/widgets/kmymoneydatetbl.cpp:181
Comment 15 Alvaro Soliverez 2010-12-26 22:37:22 UTC
Did you try KMyMoney 4.5.2? This has been fixed already.
Comment 16 abyss.andrey 2010-12-28 15:44:43 UTC
> Did you try KMyMoney 4.5.2? This has been fixed already.
I'm sorry I missed new version. In 4.5.2 everything is OK.
Comment 17 Belomir 2011-08-22 15:34:22 UTC
Created attachment 63055 [details]
New crash information added by DrKonqi

kmymoney (4.5.0) on KDE Platform 4.6.2 (4.6.2) using Qt 4.7.0

- What I was doing when the application crashed:

All the same: clicking on tab «planning calendar»

This still happens with russian translation…

-- Backtrace (Reduced):
#7  0x026f5d86 in QString::append (this=0xbf8aa48c, str=...) at tools/qstring.cpp:1499
#8  0x083d6c46 in operator+= (this=0xb442f80, text=...) at /usr/include/qt4/QtCore/qstring.h:281
#9  kMyMoneyScheduledDateTbl::addDayPostfix (this=0xb442f80, text=...) at /build/buildd/kmymoney-4.5/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:275
#10 0x083d83a8 in kMyMoneyScheduledDateTbl::drawCellContents (this=0xb442f80, painter=0xbf8aa8f4, option=..., index=..., theDate=...) at /build/buildd/kmymoney-4.5/kmymoney/widgets/kmymoneyscheduleddatetbl.cpp:106
#11 0x085a1789 in KMyMoneyDateTbDelegate::paint (this=0xb212b10, painter=0xbf8aa8f4, option=..., index=...) at /build/buildd/kmymoney-4.5/kmymoney/widgets/kmymoneydatetbl.cpp:181
Comment 18 Alvaro Soliverez 2011-08-22 16:11:49 UTC
Please, update to KMyMoney version 4.5.3 or 4.6.0