Summary: | FIXED IN SVN: CRASH with some objects created by XML package | ||
---|---|---|---|
Product: | [Applications] rkward | Reporter: | RKWard Team <rkward-devel> |
Component: | general | Assignee: | RKWard Team <rkward-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | All | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
-- Originally posted by (AT sourceforge.net): xavidp --
reporter.00.5.r - the script with tproduces that error. The data file (in xml) will come in another
-- Originally posted by (AT sourceforge.net): xavidp -- R_test.xml - test file with xml format to be stored under the logs_test subdirectory, for the report |
Description
RKWard Team
2010-05-16 15:40:47 UTC
-- Originally posted by (AT sourceforge.net): xavidp -- reporter.00.5.r - the script with tproduces that error. The data file (in xml) will come in another attachment after this one. -- Created an attachment -- -- Originally posted by (AT sourceforge.net): xavidp -- R_test.xml - test file with xml format to be stored under the logs_test subdirectory, for the reporter script to work. -- Created an attachment -- 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. 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. - **assigned_to**: nobody --> tfry - **summary**: rkward crashes when working with xml files (R4X) --> FIXED IN SVN: CRASH with some objects created by XML package - **status**: open --> open-fixed -- Originally posted by (AT sourceforge.net): xavidp -- 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. -- Originally posted by (AT sourceforge.net): xavidp -- - **status**: open-fixed --> closed-fixed |