[rkward-devel] local

Stefan Rödiger stefan_roediger at gmx.de
Fri Aug 6 00:29:10 UTC 2010


Am Donnerstag 05 August 2010, 09:21:15 schrieb Thomas Friedrichsmeier:
> Hi,
> 
Hi

> On Wednesday 04 August 2010, Stefan Rödiger wrote:
> > Thanks, that (remove a toplevel object) was what I did and it lead to
> > occasional crashes of RKWard (well at least all objects were removed ;)
> > ). That's why assumed to do something "harmful" and "not intended by the
> > developer". I'll keep an eye on it (maybe another "nobody else has this
> > problem"?).
> 
> well, I am somewhat curious as to the use-case for this. Of course the
> whole point of running plugin code in a local environment is to make sure
> the .GlobalEnv isn't touched, generally.
>

The use case might be quite specific for me. Anyways, recently I do most of my 
work with RKWard. A rush of data (from up to 96 files and thereof a certain 
row of different lengths) is read into RKWard (via custom script manly). 
Sometimes I use them in a matrix and sometimes not. However, usually I do not 
need the data when process but remove them otherwise there is to much clutter. 
Calling rm(list=ls()) or naming specific objects is fine but inconvenient over 
time. That's why I was considering to have a plugin which does the job for me 
BUT takes care that I don't delete whiteout a little reminder ("Pay attention 
to what you do").  Basically I like the idea of having such a little helper.
 
> But in any case, it really should not crash. A backtrace may (or may not)
> be helpful, if you run into this again. If you can give me (mostly)
> reproducible step-by-step instructions on how to trigger the crash, that
> is probably next to fixing it.

I think it's easy to test for you. In the first place I didn't see what's 
wrong in my workflow but I guess I figured it out. I attached the plugin map 
and corresponding files. Location is /data/.

Scenario I: No object is open for editing ("my.data" not open)  in fresh 
started RKWard
1. Create objects
2. Invoke the plugin
3. confirm to remove and do so
4.  nothing should crash 

Scenario II: Object is open for editing  ("my.data") in fresh started RKWard
1. Create objects
2. Invoke the plugin
3. confirm to remove and do so
4. Push "accidentally" "no" when asked "Das Objekt 'meine.daten' wurde vom 
Workspace entfernt oder in einen anderen Objekttyp umgewandelt, aber es ist 
gegenwärtig zur Bearbeitung geöffnet. Wollen Sie es wiederherstellen?" (sorry 
for German, but doesn't matter anyways)
Now it should crash.
If "yes" is chosen nothing will crash but obviously the object currently open 
will no be removed.

If you close the object in advance nothing will happen. One scenario I could 
not reproduce was that deletion of open (edited) objects other than my.data 
only sometimes "caused" crashes.

> 
> If "nobody else has seen this problem" that does not mean it isn't a
> problem, or that it won't cause more wide-spread trouble on a later day.
I see

> So we should really try to get to the root of this (and also of the
> problem with the basic statistics plugin).
> 
I'll help where I can.

> SVN version or 0.5.3?

SVN
> 
> Regards
> Thomas

Regards
Stefan
-------------- next part --------------
<!DOCTYPE rkpluginmap>

<document base_prefix="" namespace="rkward">
	<components>
		<component type="standard" id="simple_anova" file="simple_anova/description.xml" label="Simple Anova" />
		<component type="standard" id="sieve_plot" file="plots/sieve_plot.xml" label="Extended Sieve Plot" />
		<component type="standard" id="generate_random" file="data/generate_random.xml" label="Generate random data" />
		<component type="standard" id="sort_data" file="data/sort.xml" label="Sort data" />
		<component type="standard" id="sort_data2" file="data/sort2.xml" label="Sort data (Variant 2)" />
		<component type="standard" id="remove_objects" file="data/remove_objects.xml" label="Remove objects" />

<!-- These are purely for testing: -->
		<component type="standard" id="qtscript_test1" file="testing/test1.xml" label="QtScript Test 1" />
		<component type="standard" id="qtscript_test2" file="testing/test2.xml" label="QtScript Test 2" />
<!-- End -->
	</components>

	<hierarchy>
		<menu id="file" label="File">
			<menu id="import" label="Import" index="4">
				<menu id="import_format" label="Import format">
				</menu>
			</menu>
			<menu id="export" label="Export" index="5">
			</menu>
		</menu>
		<menu id="data" label="Data" index="3">
			<entry component="generate_random"/>
			<entry component="sort_data"/>
			<entry component="sort_data2"/>
			<entry component="remove_objects"/>
		</menu>
		<menu id="analysis" label="Analysis" index="4">
			<entry component="simple_anova" index="9"/>
			<entry component="qtscript_test1" index="1"/>
		</menu>
		<menu id="plots" label="Plots" index="5">
			<entry component="sieve_plot" />
		</menu>
		<menu id="distributions" label="Distributions" index="7">
		</menu>
	</hierarchy>

	<context id="import">
		<menu id="import" label="Import">
		</menu>
	</context>
</document>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_objects.xml
Type: application/xml
Size: 397 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20100806/e0c1337d/attachment.wsdl>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove_objects.js
Type: application/javascript
Size: 157 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20100806/e0c1337d/attachment.js>
-------------- next part --------------
<!DOCTYPE rkhelp>
<document>
	<summary>
Use this to remove all objects from the current environment.
	</summary>

	<usage>
Use this to remove all objects from the current environment. NOTE: All the objects in the current environment will be removed permanently. It is not possible to restore the objects. There will be no warning!
	</usage>
	<related>
		<ul>
			<li><link href="rkward://rhelp/rm"/></li>
			<li><link href="rkward://rhelp/ls"/></li>
			<li><link href="rkward://rhelp/.GlobalEnv"/></li>
		</ul>
	</related>
</document>
-------------- next part --------------
Application: RKWard (rkward.bin), signal: Segmentation fault
[Current thread is 1 (Thread 0xb40b6710 (LWP 8315))]

Thread 4 (Thread 0xb2945b70 (LWP 8327)):
#0  0xb77ed424 in __kernel_vsyscall ()
#1  0xb63f7482 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb5cce8b1 in ?? () from /usr/lib/libQtCore.so.4
#3  0xb5cce9f3 in QThread::msleep(unsigned long) () from /usr/lib/libQtCore.so.4
#4  0x0815cdd2 in RThread::handleSubstackCall (this=0x9925e70, call=...) at /home/comp/RKWard/trunk/rkward/rkward/rbackend/rthread.cpp:443
#5  0x0815ca00 in RThread::checkObjectUpdatesNeeded (this=0x9925e70, check_list=true) at /home/comp/RKWard/trunk/rkward/rkward/rbackend/rthread.cpp:612
#6  0x0815d341 in RThread::run (this=0x9925e70) at /home/comp/RKWard/trunk/rkward/rkward/rbackend/rthread.cpp:127
#7  0xb5ccefae in ?? () from /usr/lib/libQtCore.so.4
#8  0xb63f2955 in start_thread () from /lib/i686/cmov/libpthread.so.0
#9  0xb4f6b10e in clone () from /lib/i686/cmov/libc.so.6

Thread 3 (Thread 0xad2ffb70 (LWP 8405)):
#0  0xb77ed424 in __kernel_vsyscall ()
#1  0xb63f6f7f in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb68b1597 in ?? () from /usr/lib/libQtScript.so.4
#3  0xb68b15e1 in ?? () from /usr/lib/libQtScript.so.4
#4  0xb63f2955 in start_thread () from /lib/i686/cmov/libpthread.so.0
#5  0xb4f6b10e in clone () from /lib/i686/cmov/libc.so.6

Thread 2 (Thread 0xac67fb70 (LWP 8705)):
#0  0xb77ed424 in __kernel_vsyscall ()
#1  0xb63f7482 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/i686/cmov/libpthread.so.0
#2  0xb5cce8b1 in ?? () from /usr/lib/libQtCore.so.4
#3  0xb5cce9f3 in QThread::msleep(unsigned long) () from /usr/lib/libQtCore.so.4
#4  0x08152ab4 in QtScriptBackendThread::run (this=0xa42df88) at /home/comp/RKWard/trunk/rkward/rkward/scriptbackends/qtscriptbackend.cpp:255
#5  0xb5ccefae in ?? () from /usr/lib/libQtCore.so.4
#6  0xb63f2955 in start_thread () from /lib/i686/cmov/libpthread.so.0
#7  0xb4f6b10e in clone () from /lib/i686/cmov/libc.so.6

Thread 1 (Thread 0xb40b6710 (LWP 8315)):
[KCrash Handler]
#6  QList<int>::detach (this=0x8) at /usr/include/qt4/QtCore/qlist.h:122
#7  0x08134a8b in QList<int>::operator[] (this=0x9e33338, row=0, pretty=false) at /usr/include/qt4/QtCore/qlist.h:448
#8  RKVariable::getText (this=0x9e33338, row=0, pretty=false) at /home/comp/RKWard/trunk/rkward/rkward/core/rkvariable.cpp:409
#9  0x0811f5eb in RKVarEditModel::headerData (this=0x9e33180, section=0, orientation=Qt::Vertical, role=0) at /home/comp/RKWard/trunk/rkward/rkward/dataeditor/rkvareditmodel.cpp:319
#10 0xb58c2589 in QHeaderView::sectionSizeFromContents(int) const () from /usr/lib/libQtGui.so.4
#11 0xb58c06e2 in QHeaderView::sizeHint() const () from /usr/lib/libQtGui.so.4
#12 0xb58e3594 in QTableView::updateGeometries() () from /usr/lib/libQtGui.so.4
#13 0xb58e393b in QTableView::columnCountChanged(int, int) () from /usr/lib/libQtGui.so.4
#14 0xb58efb17 in QTableView::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4
#15 0x0812cbef in TwinTableMember::qt_metacall (this=0x9e1c6e0, _c=QMetaObject::InvokeMetaMethod, _id=86, _a=0xbfb1a054) at /home/comp/RKWard/build/rkward/dataeditor/twintablemember.moc:152
#16 0xb5dd080a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#17 0xb5ddf1db in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#18 0xb58be8c9 in QHeaderView::sectionCountChanged(int, int) () from /usr/lib/libQtGui.so.4
#19 0xb58c2055 in ?? () from /usr/lib/libQtGui.so.4
#20 0xb58cc150 in QHeaderView::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4
#21 0xb5dd080a in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/lib/libQtCore.so.4
#22 0xb5ddf1db in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4
#23 0xb5e3078f in QAbstractItemModel::columnsRemoved(QModelIndex const&, int, int) () from /usr/lib/libQtCore.so.4
#24 0xb5dc49f3 in QAbstractItemModel::endRemoveColumns() () from /usr/lib/libQtCore.so.4
#25 0x081242ed in RKVarEditModel::objectRemoved (this=0x9e33180, object=0x9e33338) at /home/comp/RKWard/trunk/rkward/rkward/dataeditor/rkvareditmodel.cpp:92
#26 0x0812447e in RKVarEditDataFrameModel::objectRemoved (this=0x9e33180, object=0x9e316a0) at /home/comp/RKWard/trunk/rkward/rkward/dataeditor/rkvareditmodel.cpp:826
#27 0x08147037 in RKModificationTracker::sendListenerNotification (this=0x983f250, type=RObjectListener::ObjectRemoved, o=0x9e316a0, index=0, new_index=0, changes=0x0)
    at /home/comp/RKWard/trunk/rkward/rkward/core/rkmodificationtracker.cpp:202
#28 0x08147df2 in RKModificationTracker::removeObject (this=0x983f250, object=0x9e316a0, editor=0x0, removed_in_workspace=true)
    at /home/comp/RKWard/trunk/rkward/rkward/core/rkmodificationtracker.cpp:94
#29 0x08148c99 in REnvironmentObject::updateFromR (this=0x97fa970, chain=0xad622160, current_symbols=...) at /home/comp/RKWard/trunk/rkward/rkward/core/renvironmentobject.cpp:121
#30 0x08158a34 in RInterface::processREvalRequest (this=0x97a33e8, request=0xb2945230) at /home/comp/RKWard/trunk/rkward/rkward/rbackend/rinterface.cpp:353
#31 0x0815a1de in RInterface::customEvent (this=0x97a33e8, e=0xad661e38) at /home/comp/RKWard/trunk/rkward/rkward/rbackend/rinterface.cpp:207
#32 0xb5ddbe8c in QObject::event(QEvent*) () from /usr/lib/libQtCore.so.4
#33 0xb53145cc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#34 0xb531b15e in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4
#35 0xb6b8dc5a in KApplication::notify(QObject*, QEvent*) () from /usr/lib/libkdeui.so.5
#36 0xb5dcb52b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4
#37 0xb5dcef8c in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQtCore.so.4
#38 0xb5dcf10d in QCoreApplication::sendPostedEvents(QObject*, int) () from /usr/lib/libQtCore.so.4
#39 0xb5df759f in ?? () from /usr/lib/libQtCore.so.4
#40 0xb479d2f5 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#41 0xb47a0fd8 in ?? () from /lib/libglib-2.0.so.0
#42 0xb47a11b8 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#43 0xb5df7095 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#44 0xb53d2f45 in ?? () from /usr/lib/libQtGui.so.4
#45 0xb5dc9b49 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#46 0xb5dc9f9a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4
#47 0xb5dcf1cf in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4
#48 0xb5314667 in QApplication::exec() () from /usr/lib/libQtGui.so.4
#49 0x0807699f in main (argc=5, argv=0xbfb1b374) at /home/comp/RKWard/trunk/rkward/rkward/main.cpp:160


More information about the Rkward-devel mailing list