Bug 305642 - KAlgebra crashed when a end parentheses was entered in an equation
Summary: KAlgebra crashed when a end parentheses was entered in an equation
Status: RESOLVED FIXED
Alias: None
Product: kalgebra
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-23 00:23 UTC by ryanloringcooper
Modified: 2012-08-28 10:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ryanloringcooper 2012-08-23 00:23:58 UTC
Application: kalgebra (0.11)
KDE Platform Version: 4.8.4 (4.8.4)
Qt Version: 4.8.1
Operating System: Linux 3.2.0-29-generic-pae i686
Distribution: Ubuntu 12.04.1 LTS

-- Information about the crash:
- What I was doing when the application crashed:
I was typing out the problem x(144-(x^2))^(1/2) in the 2D Graph and the application crashed when I hit the second end parenthese. I restarted the application and tried again and it happened again in the same way. This is the KAlgebra downloaded from the Ubuntu Software Center.

The crash can be reproduced every time.

-- Backtrace:
Application: KAlgebra (kalgebra), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb3f80740 (LWP 3842))]

Thread 3 (Thread 0xb1a0fb40 (LWP 3845)):
#0  0xb779f424 in __kernel_vsyscall ()
#1  0xb549b380 in poll () from /lib/i386-linux-gnu/libc.so.6
#2  0xb483ca7b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb482f0ae in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb482f56b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xb1a18134 in ?? () from /usr/lib/i386-linux-gnu/gio/modules/libdconfsettings.so
#6  0xb48526b3 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb4d06d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#8  0xb54a9ace in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 2 (Thread 0xb10ffb40 (LWP 3846)):
#0  0xb779f424 in __kernel_vsyscall ()
#1  0xb549b380 in poll () from /lib/i386-linux-gnu/libc.so.6
#2  0xb483ca7b in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb482f0ae in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb482f56b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xb27541ba in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0xb48526b3 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb4d06d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#8  0xb54a9ace in clone () from /lib/i386-linux-gnu/libc.so.6

Thread 1 (Thread 0xb3f80740 (LWP 3842)):
[KCrash Handler]
#7  0xb70a3686 in size (this=0x8c30df0) at /usr/include/qt4/QtCore/qlist.h:98
#8  size (this=0x8c30df0) at /usr/include/qt4/QtCore/qlist.h:137
#9  Analitza::Analyzer::calcCallFunction (this=0x8c11ae4, function=0x8c30de8, args=..., oper=0x8c29388) at ../../analitza/analyzer.cpp:978
#10 0xb70a3dec in Analitza::Analyzer::func (this=0x8c11ae4, n=...) at ../../analitza/analyzer.cpp:964
#11 0xb70a0634 in Analitza::Analyzer::operate (this=0x8c11ae4, c=0x89db440) at ../../analitza/analyzer.cpp:685
#12 0xb70a089c in Analitza::Analyzer::calc (this=0x8c11ae4, root=0x89db440) at ../../analitza/analyzer.cpp:614
#13 0xb70a439e in Analitza::Analyzer::calculateLambda (this=0x8c11ae4) at ../../analitza/analyzer.cpp:241
#14 0xb7060236 in FunctionY::calc (this=0x8c11ad8, p=...) at ../../analitzagui/functioncartesian.cpp:198
#15 0xb705b882 in Function::calc (this=0xbff0d994, dp=...) at ../../analitzagui/function.cpp:150
#16 0x08068182 in FunctionEdit::edit (this=0x86b1388) at ../../src/functionedit.cpp:264
#17 0xb58086b1 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#18 0xb628ce15 in QPlainTextEdit::textChanged() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#19 0xb628ff78 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#20 0xb58086b1 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#21 0xb5fe2df5 in QTextControl::textChanged() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#22 0xb5fec074 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#23 0xb5fec474 in QTextControl::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#24 0xb6287d13 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#25 0xb57f8c9d in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#26 0xb58089bd in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#27 0xb6494e95 in QTextDocument::contentsChanged() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#28 0xb6024127 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#29 0xb602802b in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#30 0xb602aeb5 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#31 0xb6054384 in QTextCursor::insertText(QString const&, QTextCharFormat const&) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#32 0xb6054915 in QTextCursor::insertText(QString const&) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#33 0xb5fea7bc in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#34 0xb5feb814 in QTextControl::processEvent(QEvent*, QMatrix const&, QWidget*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#35 0xb5fdfef4 in QTextControl::processEvent(QEvent*, QPointF const&, QWidget*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#36 0xb628efbe in QPlainTextEdit::keyPressEvent(QKeyEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#37 0xb705a65c in ExpressionEdit::keyPressEvent (this=0x86b2dd0, e=0xbff0eb04) at ../../analitzagui/expressionedit.cpp:244
#38 0xb5dba250 in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#39 0xb61d7e55 in QFrame::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#40 0xb626c5e4 in QAbstractScrollArea::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#41 0xb628e0de in QPlainTextEdit::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#42 0xb5d5fed4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#43 0xb5d65e68 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#44 0xb68e5401 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#45 0xb57f197e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#46 0xb5d5dced in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#47 0xb5e14401 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#48 0xb5e148ab in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#49 0xb5deb7b5 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#50 0xb5e18eac in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#51 0xb482ed86 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
#52 0xb482f125 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#53 0xb482f201 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#54 0xb5824887 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#55 0xb5e18aaa in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#56 0xb57f050d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#57 0xb57f07a9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#58 0xb57f5eba in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
#59 0xb5d5da74 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
#60 0x08057fef in main (argc=141276312, argv=0x8c2fef0) at ../../src/main.cpp:41

Reported using DrKonqi
Comment 1 Christoph Feck 2012-08-23 10:42:09 UTC
Reproducible on today's master with the steps from comment #0.
Comment 2 Aleix Pol 2012-08-27 00:39:00 UTC
Yep. The problem is that you put x(...) so it thought you were using x as a function.

For the moment, if you want it to work, you'll have to add a *. I'll add an error message so that the crash doesn't happen again.

Thanks for the report!
Comment 3 ryanloringcooper 2012-08-27 01:27:42 UTC
You're welcome. Thank you for the work around.
On Aug 26, 2012 5:39 PM, "Aleix Pol" <aleixpol@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=305642
>
> Aleix Pol <aleixpol@kde.org> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |aleixpol@kde.org
>
> --- Comment #2 from Aleix Pol <aleixpol@kde.org> ---
> Yep. The problem is that you put x(...) so it thought you were using x as a
> function.
>
> For the moment, if you want it to work, you'll have to add a *. I'll add an
> error message so that the crash doesn't happen again.
>
> Thanks for the report!
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 4 Aleix Pol 2012-08-28 00:17:45 UTC
Git commit f92e8951d0c729ad0ca51f518f35fde86d07f556 by Aleix Pol.
Committed on 28/08/2012 at 02:15.
Pushed by apol into branch 'KDE/4.9'.

Fix crash when calling (x(x^2))^2

When resolving the type of an arithmetic function, check that all the
operands are valid first.

M  +1    -0    analitza/expressiontypechecker.cpp
M  +1    -0    analitza/tests/typechecktest.cpp

http://commits.kde.org/analitza/f92e8951d0c729ad0ca51f518f35fde86d07f556
Comment 5 Aleix Pol 2012-08-28 00:17:45 UTC
Git commit d850addaf3cd1916eb3b7977232948652db76413 by Aleix Pol.
Committed on 28/08/2012 at 02:15.
Pushed by apol into branch 'master'.

Fix crash when calling (x(x^2))^2

When resolving the type of an arithmetic function, check that all the
operands are valid first.

M  +1    -0    analitza/expressiontypechecker.cpp
M  +1    -0    analitza/tests/typechecktest.cpp

http://commits.kde.org/analitza/d850addaf3cd1916eb3b7977232948652db76413