Bug 260006 - When summing up a series program crashes
Summary: When summing up a series program crashes
Status: RESOLVED FIXED
Alias: None
Product: kalgebra
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR major
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 22:50 UTC by Diego Candido
Modified: 2010-12-20 02:40 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Candido 2010-12-15 22:50:59 UTC
Version:           unspecified (using KDE 4.5.1) 
OS:                Linux

When i enter the following series on kalgebra it crashes

Reproducible: Always

Steps to Reproduce:
Enter the following text in input area: sum(probability(5, t, 6, 1, 5):t=0..5)

where probability is defined as: probability:=(place, case, totalprobability, positive, negative)->(comb(place, case)*(positive/totalprobability)^case)*(negative/totalprobability)^(place-case)

Actual Results:  
Application: KAlgebra (kalgebra), signal: Segmentation fault
[KCrash Handler]
#6  Analitza::Analyzer::calc (this=0x915b55c, root=0x0) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:695
#7  0xb718c814 in Analitza::Analyzer::operate (this=0x915b55c, c=0x9751c70) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:798
#8  0xb718c9dc in Analitza::Analyzer::calc (this=0x915b55c, root=0x9751c70) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:700
#9  0xb718c4f8 in Analitza::Analyzer::operate (this=0x915b55c, c=0x97513d8) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:786
#10 0xb718c9dc in Analitza::Analyzer::calc (this=0x915b55c, root=0x97513d8) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:700
#11 0xb718c521 in Analitza::Analyzer::operate (this=0x915b55c, c=0x9751048) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:789
#12 0xb718c9dc in Analitza::Analyzer::calc (this=0x915b55c, root=0x9751048) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:700
#13 0xb718c4f8 in Analitza::Analyzer::operate (this=0x915b55c, c=0x9633758) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:786
#14 0xb718c9dc in Analitza::Analyzer::calc (this=0x915b55c, root=0x9633758) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:700
#15 0xb718c4f8 in Analitza::Analyzer::operate (this=0x915b55c, c=0x969b6b8) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:786
#16 0xb718c9dc in Analitza::Analyzer::calc (this=0x915b55c, root=0x969b6b8) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:700
#17 0xb718c4f8 in Analitza::Analyzer::operate (this=0x915b55c, c=0x968ff80) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:786
#18 0xb718c9dc in Analitza::Analyzer::calc (this=0x915b55c, root=0x968ff80) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:700
#19 0xb718c4f8 in Analitza::Analyzer::operate (this=0x915b55c, c=0x974ad78) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:786
#20 0xb718c9dc in Analitza::Analyzer::calc (this=0x915b55c, root=0x974ad78) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:700
#21 0xb718fcfc in Analitza::Analyzer::boundedOperation (this=0x915b55c, n=..., t=..., initial=0x9685f40) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:994
#22 0xb718fe03 in Analitza::Analyzer::sum (this=0x915b55c, n=...) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:1013
#23 0xb718c5b8 in Analitza::Analyzer::operate (this=0x915b55c, c=0x9712508) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:746
#24 0xb718c9dc in Analitza::Analyzer::calc (this=0x915b55c, root=0x9712508) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:700
#25 0xb718cc4b in Analitza::Analyzer::simp (this=0x915b55c, root=0x9712508) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:1093
#26 0xb719224c in Analitza::Analyzer::evaluate (this=0x915b55c) at /home/joxer/edu/kalgebra/analitza/analyzer.cpp:112
#27 0x08064a85 in ConsoleHtml::addOperation (this=0x915b548, e=..., input=...) at /home/joxer/edu/kalgebra/src/consolehtml.cpp:112
#28 0x08057f35 in KAlgebra::operate (this=0x9146070) at /home/joxer/edu/kalgebra/src/kalgebra.cpp:457
#29 0x0805f2d5 in KAlgebra::qt_metacall (this=0x9146070, _c=QMetaObject::InvokeMetaMethod, _id=43, _a=0xbf94aa5c) at /home/joxer/edu/kalgebra/src/kalgebra.moc:121
#30 0xb62a67aa in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#31 0xb62b51bb in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#32 0xb71432b7 in ExpressionEdit::returnPressed (this=0x927df58) at /home/joxer/edu/kalgebra/analitzagui/expressionedit.moc:113
#33 0xb71444f7 in ExpressionEdit::returnPress (this=0x927df58) at /home/joxer/edu/kalgebra/analitzagui/expressionedit.cpp:507
#34 0xb71453de in ExpressionEdit::keyPressEvent (this=0x927df58, e=0xbf94b354) at /home/joxer/edu/kalgebra/analitzagui/expressionedit.cpp:204
#35 0xb58484d3 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4
#36 0xb5c428d3 in QFrame::event(QEvent*) () from /usr/lib/libQtGui.so.4
#37 0xb5cdda97 in QAbstractScrollArea::event(QEvent*) () from /usr/lib/libQtGui.so.4
#38 0xb5d0319e in QPlainTextEdit::event(QEvent*) () from /usr/lib/libQtGui.so.4
#39 0xb57ea5cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#40 0xb57f2c71 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#41 0xb68c0c5a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#42 0xb62a14cb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#43 0xb57eb3ae in ?? () from /usr/lib/libQtGui.so.4
#44 0xb58a3c20 in ?? () from /usr/lib/libQtGui.so.4
#45 0xb58a60e0 in ?? () from /usr/lib/libQtGui.so.4
#46 0xb587a4d7 in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4
#47 0xb58a9372 in ?? () from /usr/lib/libQtGui.so.4
#48 0xb3976305 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#49 0xb3979fe8 in ?? () from /lib/libglib-2.0.so.0
#50 0xb397a1c8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#51 0xb62cd075 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#52 0xb58a8ed5 in ?? () from /usr/lib/libQtGui.so.4
#53 0xb629fae9 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#54 0xb629ff3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#55 0xb62a516f in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#56 0xb57ea667 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#57 0x0806778b in main (argc=1, argv=0xbf94beb4) at /home/joxer/edu/kalgebra/src/main.cpp:41


Expected Results:  
The sum of numbers

My arch is 32bit
Comment 1 Aleix Pol 2010-12-15 22:55:33 UTC
Can you try if that still happens if using up to date trunk?

Thank you
Comment 2 Aleix Pol 2010-12-20 02:40:26 UTC
SVN commit 1207851 by apol:

Make it possible to _evaluate_ sum's instead of expecting them to be simplified at some point.

BUG: 260006


 M  +97 -24    analyzer.cpp  
 M  +2 -0      analyzer.h  
 M  +12 -2     tests/analitzatest.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1207851