Bug 240539 - Crash when using floating point numbers in javaScript
Summary: Crash when using floating point numbers in javaScript
Status: RESOLVED DOWNSTREAM
Alias: None
Product: kst
Classification: Applications
Component: scripting (show other bugs)
Version: 1.9.1
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-03 02:26 UTC by Andrew Walker
Modified: 2010-06-03 02:31 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 Andrew Walker 2010-06-03 02:26:45 UTC
Version:           1.9.1 (using KDE 4.4.0) 
OS:                Linux

Kst will crash when using some floating point numbers within javaScript

Reproducible: Didn't try

Steps to Reproduce:
Start Kst
If necessary enable the JaveScript Extensions
Select Tools... Show JavaScript Console
In the console enter:
flt=2.3456

Actual Results:  
Kst crashes with the following stack:

Application: Kst (kst), signal: Segmentation fault
[Current thread is 1 (Thread 0xb7844700 (LWP 1861))]

Thread 2 (Thread 0xb73c8b70 (LWP 1862)):
#0  0x0021e416 in __kernel_vsyscall ()
#1  0x00637f72 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#2  0x00a83884 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libc.so.6
#3  0x00fae7a9 in KstWaitCondition::wait (this=0x866d6b0, time=9999) at /home/arwalker/kst/src/libkst/kstwaitcondition_unix.cpp:250
#4  0x0046a079 in UpdateThread::run (this=0x866d6a8) at /home/arwalker/kst/src/libkstapp/updatethread.cpp:78
#5  0x0472d18d in QThreadInstance::start(void*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#6  0x00633ab5 in start_thread () from /lib/libpthread.so.0
#7  0x00a7483e in clone () from /lib/libc.so.6

Thread 1 (Thread 0xb7844700 (LWP 1861)):
[KCrash Handler]
#6  0x03213cd8 in ?? () from /usr/lib/libkjs.so.1
#7  0x03213f5f in ?? () from /usr/lib/libkjs.so.1
#8  0x0321452c in ?? () from /usr/lib/libkjs.so.1
#9  0x03214a80 in kjs_dtoa () from /usr/lib/libkjs.so.1
#10 0x03219ec0 in KJS::UString::from(double) () from /usr/lib/libkjs.so.1
#11 0x0321a1b7 in KJS::NumberImp::toString(KJS::ExecState*) const () from /usr/lib/libkjs.so.1
#12 0x032227cb in KJS::ValueImp::dispatchToString(KJS::ExecState*) const () from /usr/lib/libkjs.so.1
#13 0x071ef810 in KJS::Value::toString (this=0xbfc89be4, exec=0x86c44a0) at /usr/include/kde/kjs/value.h:247
#14 0x071f2075 in JSIfaceImpl::evaluate (this=0x840c340, script=...) at /home/arwalker/kst/src/extensions/js/jsiface_impl.cpp:65
#15 0x07297cd2 in JSIface::process (this=0x840c340, fun=..., data=..., replyType=..., replyData=...) at /home/arwalker/kst/src/extensions/js/jsiface_skel.cpp:33
#16 0x007fb09e in DCOPClient::receive(QCString const&, QCString const&, QCString const&, QMemArray<char> const&, QCString&, QMemArray<char>&) () from /usr/lib/libDCOP.so.4
#17 0x008007ef in ?? () from /usr/lib/libDCOP.so.4
#18 0x0080120d in ?? () from /usr/lib/libDCOP.so.4
#19 0x0080dc87 in KDE_IceProcessMessages () from /usr/lib/libDCOP.so.4
#20 0x007f0f7f in DCOPClient::processSocketData(int) () from /usr/lib/libDCOP.so.4
#21 0x00800f42 in DCOPClient::qt_invoke(int, QUObject*) () from /usr/lib/libDCOP.so.4
#22 0x0479c482 in QObject::activate_signal(QConnectionList*, QUObject*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#23 0x0479dc25 in QObject::activate_signal(int, int) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#24 0x04b31221 in QSocketNotifier::activated(int) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#25 0x047be557 in QSocketNotifier::event(QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#26 0x04733c75 in QApplication::internalNotify(QObject*, QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#27 0x04735983 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#28 0x042c3a0c in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdecore.so.4
#29 0x04727554 in QEventLoop::activateSocketNotifiers() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#30 0x046dca54 in QEventLoop::processEvents(unsigned int) () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#31 0x0474e710 in QEventLoop::enterLoop() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#32 0x0474e5b7 in QEventLoop::exec() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#33 0x04734340 in QApplication::exec() () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#34 0x0805a32d in main (argc=1, argv=0xbfc8af64) at /home/arwalker/kst/src/kst/main.cpp:858


Expected Results:  
Kst runs normally

This is problem on a standard Fedora Core 12 installation (both 32 bit and 64 bit)
Comment 1 Andrew Walker 2010-06-03 02:31:30 UTC
Updating the following packages fixed the problem:

on a 32-bit installation
kdelibs3-3.5.10-21.fc12.i686.rpm
kdelibs3-devel-3.5.10-21.fc12.i686.rpm

on a 64-bit installation:
kdelibs3-3.5.10-21.fc12.x86_64.rpm
kdelibs3-devel-3.5.10-21.fc12.x86_64.rpm

The packages were installed using:

yum -Uvf kdelibs3-devel-3.5.10-21.fc12.<arch>.rpm kdelibs3-3.5.10-21.fc12.<arch>.rpm

A note will be added to the install section of the kst website.