Bug 258974 - Report change crashes kmymoney in Czech and Danish locales
Summary: Report change crashes kmymoney in Czech and Danish locales
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 262140 263606 268391 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-12-06 07:01 UTC by schunkac
Modified: 2011-05-27 22:17 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description schunkac 2010-12-06 07:01:21 UTC
Application: kmymoney (4.5.0)
KDE Platform Version: 4.5.1 (KDE 4.5.1)
Qt Version: 4.7.0
Operating System: Linux 2.6.35-23-generic x86_64
Distribution: Ubuntu 10.10

-- Information about the crash:
When you change settings in preconfigured reports to create your own report and confirm that with OK button, application crashes

The crash can be reproduced every time.

-- Backtrace:
Application: KMyMoney (kmymoney), signal: Floating point exception
[Current thread is 1 (Thread 0x7f5a149bd760 (LWP 2080))]

Thread 2 (Thread 0x7f59fb0a6710 (LWP 2081)):
#0  0x00007f5a0f381203 in poll () from /lib/libc.so.6
#1  0x00007f5a0a4dc009 in ?? () from /lib/libglib-2.0.so.0
#2  0x00007f5a0a4dc45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#3  0x00007f5a101d91e6 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#4  0x00007f5a101aba02 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#5  0x00007f5a101abdec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#6  0x00007f5a100b62fd in QThread::exec() () from /usr/lib/libQtCore.so.4
#7  0x00007f5a1018b5f8 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00007f5a100b927e in ?? () from /usr/lib/libQtCore.so.4
#9  0x00007f5a11fdd971 in start_thread () from /lib/libpthread.so.0
#10 0x00007f5a0f38d94d in clone () from /lib/libc.so.6
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f5a149bd760 (LWP 2080)):
[KCrash Handler]
#6  0x00000000005670d5 in reports::PivotTable::calculateColumnHeadings (this=0x53a0040) at /build/buildd/kmymoney-4.5/kmymoney/reports/pivottable.cpp:555
#7  0x000000000057a026 in reports::PivotTable::init (this=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/reports/pivottable.cpp:400
#8  0x000000000057b567 in reports::PivotTable::PivotTable (this=0x53a0040, _config_f=...) at /build/buildd/kmymoney-4.5/kmymoney/reports/pivottable.cpp:94
#9  0x00000000004e09a1 in KReportsView::KReportTab::updateReport (this=0x417abc0) at /build/buildd/kmymoney-4.5/kmymoney/views/kreportsview.cpp:180
#10 0x00000000004e0ac2 in KReportsView::KReportTab::showEvent (this=0x1, event=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/views/kreportsview.cpp:158
#11 0x00007f5a10bb8c79 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#12 0x00007f5a10b62fdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#13 0x00007f5a10b68aed in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#14 0x00007f5a12fe1156 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#15 0x00007f5a101accdc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#16 0x00007f5a10bbcf4a in QWidgetPrivate::show_helper() () from /usr/lib/libQtGui.so.4
#17 0x00007f5a10bbe69a in QWidget::setVisible(bool) () from /usr/lib/libQtGui.so.4
#18 0x00007f5a10ba286e in QStackedLayout::setCurrentIndex(int) () from /usr/lib/libQtGui.so.4
#19 0x00007f5a10ff62a3 in ?? () from /usr/lib/libQtGui.so.4
#20 0x00007f5a10ff6560 in QTabWidget::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4
#21 0x00007f5a130e19c5 in KTabWidget::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libkdeui.so.5
#22 0x00007f5a101c4b27 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#23 0x00007f5a10fead2e in QTabBar::currentChanged(int) () from /usr/lib/libQtGui.so.4
#24 0x00000000004e3121 in KReportsView::slotConfigure (this=0x2be15f0) at /build/buildd/kmymoney-4.5/kmymoney/views/kreportsview.cpp:794
#25 0x00000000004ec87e in KReportsView::qt_metacall (this=0x2be15f0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff5d782840) at /build/buildd/kmymoney-4.5/obj-x86_64-linux-gnu/kmymoney/views/kreportsview.moc:116
#26 0x00007f5a101c4b27 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#27 0x00007f5a11240402 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4
#28 0x00007f5a10f3aeeb in ?? () from /usr/lib/libQtGui.so.4
#29 0x00007f5a10f3c5bb in ?? () from /usr/lib/libQtGui.so.4
#30 0x00007f5a10f3c82c in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4
#31 0x00007f5a10bb904e in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#32 0x00007f5a10b62fdc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#33 0x00007f5a10b6930e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#34 0x00007f5a12fe1156 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#35 0x00007f5a101accdc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#36 0x00007f5a10b67dbe in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4
#37 0x00007f5a10beb345 in ?? () from /usr/lib/libQtGui.so.4
#38 0x00007f5a10be9c5c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#39 0x00007f5a10c160e2 in ?? () from /usr/lib/libQtGui.so.4
#40 0x00007f5a0a4d8342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#41 0x00007f5a0a4dc2a8 in ?? () from /lib/libglib-2.0.so.0
#42 0x00007f5a0a4dc45c in g_main_context_iteration () from /lib/libglib-2.0.so.0
#43 0x00007f5a101d9193 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#44 0x00007f5a10c15a4e in ?? () from /usr/lib/libQtGui.so.4
#45 0x00007f5a101aba02 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#46 0x00007f5a101abdec in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#47 0x00007f5a101afebb in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#48 0x0000000000452d58 in main (argc=<value optimized out>, argv=<value optimized out>) at /build/buildd/kmymoney-4.5/kmymoney/main.cpp:260

Reported using DrKonqi
Comment 1 Cristian Oneț 2010-12-06 11:28:50 UTC
At pivottable.cpp:555 there is this instruction:
int segment = (m_beginDate.month() - 1) / columnpitch; 
I'm suspecting that columnpitch is 0.
Comment 2 Alvaro Soliverez 2010-12-06 11:36:45 UTC
In this case, for columnPith to be 0, there should be something wrong with the saved report.

Does this happen with any report or only with a specific one?
Comment 3 Cristian Oneț 2010-12-06 12:17:08 UTC
Yep, it seems that the report editing went somehow wrong. Could you post the output of the following command:
zcat yourefile.kmy | grep "columntype="
Comment 4 schunkac 2010-12-06 21:13:49 UTC
Here it is:

zcat bank/banking/schunka.kmy |grep
"columntype="

  <REPORT datelock="next3months" comment="Vlastní výkaz" detail="total"
charttype="bar" tax="0" chartgridlines="1" includesprice="0"
includestransfers="1" chartdatalabels="1" investments="0" chartbydefault="0"
columnsaredays="1" includesaverageprice="0" rowtype="assetliability"
convertcurrency="1" group="Forecast" type="pivottable 1.15" id="R000003"
showrowtotals="0" includeunused="1" name="Předpověd pro následující
čtvrtletí(Přizpůsobeno)" includeschedules="1" loans="0" favorite="1"
columntype="weeks" chartlinewidth="2" includesmovingaverage="0"
includesforecast="1" includesactuals="0" >
  <REPORT datelock="next3months" comment="Vlastní výkaz" detail="total"
charttype="bar" tax="0" chartgridlines="0" includesprice="0"
includestransfers="0" chartdatalabels="1" investments="0" chartbydefault="1"
columnsaredays="0" includesaverageprice="0" rowtype="assetliability"
convertcurrency="1" group="" type="pivottable 1.15" id="R000006"
showrowtotals="0" includeunused="0" name="Předpověď čistého
jmění(Přizpůsobeno)" includeschedules="0" loans="0" favorite="0"
columntype="months" chartlinewidth="2" includesmovingaverage="0"
includesforecast="1" includesactuals="0" >
  <REPORT datelock="yeartodate" comment="Vlastní výkaz" detail="all"
charttype="pie" tax="0" chartgridlines="1" includesprice="0"
includestransfers="0" chartdatalabels="1" investments="0" chartbydefault="1"
columnsaredays="0" includesaverageprice="0" rowtype="expenseincome"
convertcurrency="1" group="Income and Expenses" type="pivottable 1.15"
id="R000008" showrowtotals="0" includeunused="0" name="Koláčový graf příjmů
a výdajů(Přizpůsobeno)" includeschedules="0" loans="0" favorite="0"
columntype="months" chartlinewidth="2" includesmovingaverage="0"
includesforecast="0" includesactuals="0" >

I don't know if it helps but I used an older version where I made this
reports (don't know exactly but some 1.something version of kmymoney) and
for like 2 months ago I installed new one, to be precise, version 4.5.0.


2010/12/6 Cristian Onet <onet.cristian@gmail.com>

> https://bugs.kde.org/show_bug.cgi?id=258974
>
>
>
>
>
> --- Comment #3 from Cristian Onet <onet cristian gmail com>  2010-12-06
> 12:17:08 ---
> Yep, it seems that the report editing went somehow wrong. Could you post
> the
> output of the following command:
> zcat yourefile.kmy | grep "columntype="
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>
Comment 5 Cristian Oneț 2010-12-06 22:30:17 UTC
It seems that all your custom reports have a valid column type. Can you recall which one of these where you customizing when the crash occurred?
Comment 6 Alvaro Soliverez 2010-12-07 04:20:20 UTC
I think I know what that is. The budget reports don't support the weeks period anymore. 
Can you try to customize a standard report again to make it look like you want?
Comment 7 schunkac 2010-12-07 09:12:01 UTC
Anyone, whenever I customize a report. No matter if default one or
previously customized. Application crashes.

I also use cz-cs locales.

So the upgrade to newer version could not cause the trouble?

Only error popping up whenever crash happens is something aboutlist null
pointer exception.

Anyway, I'm glad for any help.

Dne 6.12.2010 22:29 "Cristian Onet" <onet.cristian@gmail.com> napsal/a:

https://bugs.kde.org/show_bug.cgi?id=258974




--- Comment #5 from Cristian Onet <onet cristian gmail com>  2010-12-06
22:30:17 ---
It seems that all your custom reports have a valid column type. Can you
recall
which one of these where you customizing when the crash occurred?

--

Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail ...
Comment 8 Cristian Oneț 2010-12-07 09:28:16 UTC
Could you try switching to English and perform the same operation? Maybe it's a translation related issue.
Comment 9 schunkac 2010-12-07 09:49:30 UTC
That helps, but I noticed that stack bar type of chart didn't show any
numbers on the axis, so it's almost useless. The bar type have to be redrawn
to show them correctly. Problem of having kmymoney in english is fine for
me, if it will work, but locales are taken from environment settings. That
would mean all KDE stuff in english, which I choose not to. Is there any way
I can change translation just for kmymoney? And is there any way to fix the
translation problem so in the future I can use kmymoney in my native
language?

2010/12/7 Cristian Onet <onet.cristian@gmail.com>

> https://bugs.kde.org/show_bug.cgi?id=258974
>
>
>
>
>
> --- Comment #8 from Cristian Onet <onet cristian gmail com>  2010-12-07
> 09:28:16 ---
> Could you try switching to English and perform the same operation? Maybe
> it's a
> translation related issue.
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You reported the bug.
>
Comment 10 Thomas Baumgart 2010-12-07 10:12:28 UTC
Try starting kmymoney from the commandline as follows:

  kmymoney --lang=C

That should do it (I have never tested it though due to the lack of a translated KDE installation). Alternatively, try --lang=en_GB
Comment 11 Cristian Oneț 2010-12-07 10:15:34 UTC
There is no need for you to switch the KDE locale for this. Now that we know
how to reproduce the problem (use the Czech translation) we can come up with a
fix for the this. Until then you can switch only KMyMoney's translation (not
locale) to English from the settings menu.
Comment 12 Cristian Oneț 2010-12-07 18:38:04 UTC
I just got to try out KMyMoney with the Czech translation and didn't succeeded to crash it by customizing reports. Since your is the only setup that is able to reproduce this any extra hints would be welcome. You've said that the same application is working fine when using the English translation, did you change only the language or also the country settings?
Comment 13 Thomas Baumgart 2011-01-07 08:32:54 UTC
*** Bug 262140 has been marked as a duplicate of this bug. ***
Comment 14 Ivo Smelhaus 2011-01-09 21:29:27 UTC
This bug doesn't appear with option --lang=C.
Didn't occur during more hours work and many changes in reports.
Comment 15 Cristian Oneț 2011-05-20 18:45:01 UTC
*** Bug 268391 has been marked as a duplicate of this bug. ***
Comment 16 Cristian Oneț 2011-05-20 18:47:36 UTC
So this happens with Czech and Danish we have to take a look why a translation could cause a crash in that area.
Comment 17 Cristian Oneț 2011-05-21 10:26:52 UTC
SVN commit 1232929 by conet:

BUG: 258974

Prevent two different translations of an entity that is referenced by the translated string. Is something is still wrong after this fix don't crash anyway output a warning instead.

 M  +7 -7      dialogs/kreportconfigurationfilterdlg.cpp  
 M  +6 -0      reports/pivottable.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1232929
Comment 18 Alvaro Soliverez 2011-05-21 17:44:45 UTC
I think there's a problem in the way we handle the combo. We are comparing by the value of the translated string, instead of by an enum. We should change that to fix it for good.
Comment 19 Cristian Oneț 2011-05-21 21:08:02 UTC
(In reply to comment #18)
> I think there's a problem in the way we handle the combo. We are comparing by
> the value of the translated string, instead of by an enum. We should change
> that to fix it for good.

If we make sure that there is now way that the translated strings could differ from the two point we reference the values (combo definition vs. combo result usage) from my point of view using an enum is the same thing. I admit though that it would be a bit nicer.
Comment 20 Cristian Oneț 2011-05-27 22:17:32 UTC
*** Bug 263606 has been marked as a duplicate of this bug. ***