Bug 320536 - Rocs crashed when trying to execute Javascript.
Summary: Rocs crashed when trying to execute Javascript.
Status: RESOLVED FIXED
Alias: None
Product: Rocs
Classification: Applications
Component: general (show other bugs)
Version: 1.8
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Andreas Cord-Landwehr
URL:
Keywords:
: 320538 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-05-31 13:43 UTC by mmellott
Modified: 2013-07-12 15:32 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.11


Attachments
New crash information added by DrKonqi (13.67 KB, text/plain)
2013-06-18 15:10 UTC, mmellott
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mmellott 2013-05-31 13:43:13 UTC
Application: rocs (1.8.60)
KDE Platform Version: 4.10.2
Qt Version: 4.8.4
Operating System: Linux 3.8.0-23-generic x86_64
Distribution: Ubuntu 13.04

-- Information about the crash:
Rocs was working fine until I added the distances function to my code. Will try to use this funtion again.

-- Backtrace:
Application: Rocs (rocs), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fc10aee97c0 (LWP 2143))]

Thread 8 (Thread 0x7fc0f1162700 (LWP 2144)):
#0  0x00007fc1015a4ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fc1088cf585 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x00007fc1088cf5d9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x00007fc0fec32764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#4  0x00007fc1015a0f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007fc10427be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 7 (Thread 0x7fc0b085f700 (LWP 2145)):
#0  0x00007fc1015a4ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fc108615a09 in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#2  0x00007fc1088fdcee in ?? () from /usr/lib/x86_64-linux-gnu/libQtWebKit.so.4
#3  0x00007fc0fec32764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#4  0x00007fc1015a0f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007fc10427be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 6 (Thread 0x7fc0abbff700 (LWP 2146)):
#0  0x00007fc10426f3cd in poll () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fc0ff6d21dc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fc0ff6d2304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fc104c0a036 in QEventDispatcherGlib::processEvents (this=0x7fc0a40008f0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#4  0x00007fc104bda38f in QEventLoop::processEvents (this=this@entry=0x7fc0abbfed00, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007fc104bda618 in QEventLoop::exec (this=this@entry=0x7fc0abbfed00, flags=...) at kernel/qeventloop.cpp:204
#6  0x00007fc104adc410 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#7  0x00007fc104adebec in QThreadPrivate::start (arg=0x1638cd0) at thread/qthread_unix.cpp:338
#8  0x00007fc0fec32764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#9  0x00007fc1015a0f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#10 0x00007fc10427be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 5 (Thread 0x7fc0aa74a700 (LWP 2147)):
#0  0x00007fc0ff7115b9 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fc0ff6d190b in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fc0ff6d20fe in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fc0ff6d2304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fc104c0a036 in QEventDispatcherGlib::processEvents (this=0x7fc09c0008f0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007fc104bda38f in QEventLoop::processEvents (this=this@entry=0x7fc0aa749d00, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fc104bda618 in QEventLoop::exec (this=this@entry=0x7fc0aa749d00, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007fc104adc410 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:542
#8  0x00007fc104adebec in QThreadPrivate::start (arg=0x13efc20) at thread/qthread_unix.cpp:338
#9  0x00007fc0fec32764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#10 0x00007fc1015a0f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#11 0x00007fc10427be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 4 (Thread 0x7fc09bfff700 (LWP 2149)):
#0  0x00007fc0ff71135c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007fc0ff7115b9 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007fc0ff6d1c74 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fc0ff6d2175 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fc0ff6d2304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007fc104c0a036 in QEventDispatcherGlib::processEvents (this=0x7fc0940008f0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007fc104bda38f in QEventLoop::processEvents (this=this@entry=0x7fc09bffecd0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007fc104bda618 in QEventLoop::exec (this=this@entry=0x7fc09bffecd0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007fc104adc410 in QThread::exec (this=this@entry=0x17d5e90) at thread/qthread.cpp:542
#9  0x00007fc104bbbedf in QInotifyFileSystemWatcherEngine::run (this=0x17d5e90) at io/qfilesystemwatcher_inotify.cpp:256
#10 0x00007fc104adebec in QThreadPrivate::start (arg=0x17d5e90) at thread/qthread_unix.cpp:338
#11 0x00007fc0fec32764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#12 0x00007fc1015a0f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#13 0x00007fc10427be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 3 (Thread 0x7fc09a28f700 (LWP 2150)):
#0  0x00007fc1015a4ca4 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fc1097bae77 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#2  0x00007fc1097baea9 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#3  0x00007fc0fec32764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#4  0x00007fc1015a0f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#5  0x00007fc10427be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 2 (Thread 0x7fc0a9f49700 (LWP 3757)):
#0  0x00007fc10428a1df in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fc10426f3c2 in poll () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fc0ff6d21dc in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007fc0ff6d2304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007fc104c0a036 in QEventDispatcherGlib::processEvents (this=0x7fc0a0002980, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#5  0x00007fc104bda38f in QEventLoop::processEvents (this=this@entry=0x7fc0a9f48cd0, flags=...) at kernel/qeventloop.cpp:149
#6  0x00007fc104bda618 in QEventLoop::exec (this=this@entry=0x7fc0a9f48cd0, flags=...) at kernel/qeventloop.cpp:204
#7  0x00007fc104adc410 in QThread::exec (this=this@entry=0x234ee10) at thread/qthread.cpp:542
#8  0x00007fc104bbbedf in QInotifyFileSystemWatcherEngine::run (this=0x234ee10) at io/qfilesystemwatcher_inotify.cpp:256
#9  0x00007fc104adebec in QThreadPrivate::start (arg=0x234ee10) at thread/qthread_unix.cpp:338
#10 0x00007fc0fec32764 in ?? () from /usr/lib/nvidia-304/libGL.so.1
#11 0x00007fc1015a0f8e in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#12 0x00007fc10427be1d in clone () from /lib/x86_64-linux-gnu/libc.so.6

Thread 1 (Thread 0x7fc10aee97c0 (LWP 2143)):
[KCrash Handler]
#5  0x00007fc109801018 in QScriptEngine::newQObject(QObject*, QScriptEngine::ValueOwnership, QFlags<QScriptEngine::QObjectWrapOption> const&) () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#6  0x00000000004240a1 in MainWindow::executeScript (this=this@entry=0x15ca210, mode=mode@entry=MainWindow::Execute, text=...) at /home/matt/rocs-source/App/Ui/MainWindow.cpp:947
#7  0x00000000004244ea in MainWindow::executeScriptFull (this=this@entry=0x15ca210, text=...) at /home/matt/rocs-source/App/Ui/MainWindow.cpp:925
#8  0x0000000000418f5a in MainWindow::qt_static_metacall (_o=0x15ca210, _c=<optimized out>, _id=10, _a=0x7fffa58590d0) at /home/matt/rocs-build/App/moc_MainWindow.cpp:133
#9  0x00007fc104bf00ef in QMetaObject::activate (sender=sender@entry=0x1950bb0, m=m@entry=0x7fc1060667a0 <QAction::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x7fffa58590d0) at kernel/qobject.cpp:3539
#10 0x00007fc1055be152 in QAction::triggered (this=this@entry=0x1950bb0, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#11 0x00007fc1055bf580 in QAction::activate (this=0x1950bb0, event=<optimized out>) at kernel/qaction.cpp:1257
#12 0x00007fc1059839ef in QAbstractButtonPrivate::click (this=this@entry=0x194f560) at widgets/qabstractbutton.cpp:530
#13 0x00007fc105983c9c in QAbstractButton::mouseReleaseEvent (this=0x194f530, e=0x7fffa5859980) at widgets/qabstractbutton.cpp:1123
#14 0x00007fc105a4077a in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:718
#15 0x00007fc105611a89 in QWidget::event (this=0x194f530, event=0x7fffa5859980) at kernel/qwidget.cpp:8375
#16 0x00007fc1055c48ec in QApplicationPrivate::notify_helper (this=this@entry=0x13f5000, receiver=receiver@entry=0x194f530, e=e@entry=0x7fffa5859980) at kernel/qapplication.cpp:4567
#17 0x00007fc1055c7a33 in QApplication::notify (this=<optimized out>, receiver=0x194f530, e=0x7fffa5859980) at kernel/qapplication.cpp:4110
#18 0x00007fc10a3ddaf6 in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#19 0x00007fc104bdb63e in QCoreApplication::notifyInternal (this=0x7fffa585c100, receiver=receiver@entry=0x194f530, event=event@entry=0x7fffa5859980) at kernel/qcoreapplication.cpp:946
#20 0x00007fc1055ca933 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#21 QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x194f530, event=event@entry=0x7fffa5859980, alienWidget=alienWidget@entry=0x194f530, nativeWidget=nativeWidget@entry=0x194e9f0, buttonDown=buttonDown@entry=0x7fc1060a2308 <qt_button_down>, lastMouseReceiver=..., spontaneous=spontaneous@entry=true) at kernel/qapplication.cpp:3178
#22 0x00007fc10563fec4 in QETWidget::translateMouseEvent (this=this@entry=0x194e9f0, event=event@entry=0x7fffa585a100) at kernel/qapplication_x11.cpp:4631
#23 0x00007fc10563eef1 in QApplication::x11ProcessEvent (this=0x7fffa585c100, event=event@entry=0x7fffa585a100) at kernel/qapplication_x11.cpp:3746
#24 0x00007fc10566a0b2 in x11EventSourceDispatch (s=0x13f5850, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#25 0x00007fc0ff6d1f05 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007fc0ff6d2248 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#27 0x00007fc0ff6d2304 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#28 0x00007fc104c0a016 in QEventDispatcherGlib::processEvents (this=0x13f2d90, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#29 0x00007fc10566a1ae in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#30 0x00007fc104bdf56f in QCoreApplication::processEvents (flags=...) at kernel/qcoreapplication.cpp:1133
#31 0x00007fc10980b83f in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#32 0x00007fc109709540 in ?? () from /usr/lib/x86_64-linux-gnu/libQtScript.so.4
#33 0x00007fc09830205a in ?? ()
#34 0x0000000000000000 in ?? ()

Reported using DrKonqi
Comment 1 Andreas Cord-Landwehr 2013-05-31 14:03:28 UTC
Please install the libqt4-script-dbg packages when the crash occurs again to provide debug information for qtscript internals, too.

If you can paste the problematic script, that also would ease analyzing the crash.
Comment 2 mmellott 2013-05-31 14:35:43 UTC
Did not save the script before crash.
Comment 3 Andreas Cord-Landwehr 2013-05-31 14:38:18 UTC
*** Bug 320538 has been marked as a duplicate of this bug. ***
Comment 4 mmellott 2013-06-18 15:10:46 UTC
Created attachment 80616 [details]
New crash information added by DrKonqi

rocs (1.8.80) on KDE Platform 4.10.3 using Qt 4.8.4

- What I was doing when the application crashed:
Running a script. Had just stopped a script that was in progress.
 
- Custom settings of the application:
Built from source with latest (38a303bef84fb49c776fbabbc75f9e0fd1229952) master commits.

-- Backtrace (Reduced):
#6  data (this=0x8) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:135
[...]
#9  QScriptEngine::newQObject (this=0x0, object=0x2bcf2f0, ownership=QScriptEngine::QtOwnership, options=...) at api/qscriptengine.cpp:2197
#10 0x000000000042dda7 in MainWindow::executeScript (this=0x27389c0, mode=MainWindow::Execute, text=...) at /home/matt/rocs-source/App/Ui/MainWindow.cpp:978
#11 0x000000000042dc0b in MainWindow::executeScriptFull (this=0x27389c0, text=...) at /home/matt/rocs-source/App/Ui/MainWindow.cpp:956
#12 0x000000000041859e in MainWindow::qt_static_metacall (_o=0x27389c0, _c=QMetaObject::InvokeMetaMethod, _id=10, _a=0x7fff99fcbf20) at /home/matt/rocs-build/App/moc_MainWindow.cpp:133
Comment 5 mmellott 2013-06-19 08:44:26 UTC
Can consistently reproduce crash by pressing "Stop" while script is running and then pressing "Run" to restart the script.
Comment 6 Andreas Cord-Landwehr 2013-07-03 14:57:18 UTC
Git commit 9e7c0230b90785498203e9fda1b7d396254d4b95 by Andreas Cord-Landwehr.
Committed on 03/07/2013 at 14:55.
Pushed by cordlandwehr into branch 'master'.

Initialize global engine objects after engine.

When execution is stopped, the current engine is removed. Hence,
it is necessary to create it again before setting up global
engine objects.

M  +2    -2    App/Ui/MainWindow.cpp
M  +11   -0    RocsCore/QtScriptBackend.cpp
M  +5    -0    RocsCore/QtScriptBackend.h

http://commits.kde.org/rocs/9e7c0230b90785498203e9fda1b7d396254d4b95