[rkward-tracker] [ rkward-Bugs-3002439 ] FIXED IN SVN: CRASH with some objects created by XML package
SourceForge.net
noreply at sourceforge.net
Tue May 18 17:44:38 UTC 2010
Bugs item #3002439, was opened at 2010-05-16 18:40
Message generated for change (Settings changed) made by xavidp
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=459007&aid=3002439&group_id=50231
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: data handling
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Xavier de Pedro (xavidp)
Assigned to: Thomas Friedrichsmeier (tfry)
Summary: FIXED IN SVN: CRASH with some objects created by XML package
Initial Comment:
Hi:
I guess I have some problem with my own R script for processing xml files (through the usage of R4X package). But the fact is that RKward crashes every time I attempt to run this script (reporter.00.5.r, attached), due to this part: \"xmlTreeParse(xml_r)\"
I get a prop screen with this error:
-----------------------
*** caught segfault ***
address 0x3e, cause \'memory not mapped\'
-----------------------
However, when I run the same script reporter.00.5.r from the command line, with:
Rscript reporter_00.5.r
the script seems to read the line with the \"hello\" output in the console, at least.
Oh well, in case this can help the authors of rkward to improve the error detection and warnings for the user, instead of crashing the program.
More details: RKward: 0.5.2. KDE: 4.4.2, OS: GNU/Linux (Ubuntu Lucid 10.04), R: 2.10.1
Fir this script to run, some extra R packages need to be installed: XML, R4X and their dependencies. The commands to install them are included (commented) in the reporter.00.5.r script, as weel as the linux dependencies for the xml package to install.
----------------------------------------------------------------------
>Comment By: Xavier de Pedro (xavidp)
Date: 2010-05-18 19:44
Message:
Thanks heaps! and you compiled it in a dev, branch for testing at
launchpad! And fixing so quickly!
Gorgeous! You (and rkward) Rock, Thomas! :-)
Many thanks, indeed.
----------------------------------------------------------------------
Comment By: Thomas Friedrichsmeier (tfry)
Date: 2010-05-18 16:23
Message:
Hi again,
the problem should be fixed in SVN (http://p.sf.net/svn), now. It would be
nice, if you could test this, too. An updated binary packages for ubuntu is
available from this PPA:
https://launchpad.net/~rkward-devel/+archive/rkward-devel .
Thanks for reporting.
----------------------------------------------------------------------
Comment By: Thomas Friedrichsmeier (tfry)
Date: 2010-05-17 12:40
Message:
Thanks for reporting. I can confirm the issue.
The crash happens when RKWard tries to fetch the structure of the object
"xml_parsed" (the result of an invalid xmlParseTree(), the one without
validate=TRUE). Of course, RKWard should not crash on such an object, but
in fact we are not the only ones to blame: The object xml_parsed is simply
a broken R object, as also evidenced by str(xml_parsed) (which throws an
error: subscript out of bounds). Practically it should be possible to avoid
the issue by simply using validate=TRUE in all calls to xmlParseTree(),
thus, hopefully avoiding that a broken object is created in the first
place.
----
Internals: The crash is in RKStructureGetter::getStructureWorker(), more
specifically while fetching children of a regular container (do_cont ==
TRUE) around lines 418-443. Always using the last of the three variants of
subscripting in this block (SEXP child = callSimpleFun2
(double_brackets_fun, value, index, R_BaseEnv);) seems to avoid the
problem. Before using this unconditionally, we should really time the
overhead esp. in package:datasets.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=459007&aid=3002439&group_id=50231
More information about the rkward-tracker
mailing list