[rkward-devel] Potential Data editor bug
Thomas Friedrichsmeier
thomas.friedrichsmeier at ruhr-uni-bochum.de
Sun Sep 19 15:31:08 UTC 2010
Hi,
On Sunday 19 September 2010, Prasenjit Kapat wrote:
> Here is something that I found interesting. Consider the last two
> lines of Stefan's Procedure.txt:
>
> data <- data.frame (....
> names (data) <- c(...
>
> The crash is deterministic after you run these two lines individually
> (ie, "Run current line").
>
> But the crash does NOT occur after you run them together (ie, "Run
> selection") or after you run the whole file (ie "Run all") or after
> _source ("Procedure.txt")_. Stefan can you confirm this?
The reason is that in the first case, RKWard sees "data" for the first time, and
knows that it is a totally new object. In the second case it sees that the
object may have been modified, and tries to walk through all sub-objects (i.e.
columns in this case) to check whether those still exist, have been moved, or
there are new ones. In this second case, RKWard tries to look up each column
by name, and this is where the problem arises.
So, I think I have a relatively good idea, what's causing the problem, but I'm
still pondering a good solution.
> Although, in many attempts I could not reproduce the crash using any
> of the following toy examples:
Thanks for all the testing. I believe that's mostly due to the memory
gremlins, though. It's their sort of humor...
> As a caution to the user: Should a warning be displayed when the data
> editor encounters multiple columns with same name? Noting that, the
> data itself is not lost, it is just not displayed and hence not safe
> to be edited! (Or is it safe anyways?)
*In theory* it might be safe, but it's probably a good idea to warn the user!
Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/rkward-devel/attachments/20100919/7ea7921e/attachment.sig>
More information about the Rkward-devel
mailing list