Summary: | RKWard and R 4.0.0 breaks during for-loop | ||
---|---|---|---|
Product: | [Applications] rkward | Reporter: | flyos |
Component: | R Console | Assignee: | RKWard Team <rkward-devel> |
Status: | RESOLVED FIXED | ||
Severity: | grave | CC: | thomas.friedrichsmeier |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
flyos
2020-05-23 09:31:50 UTC
Confirmed. Thanks a lot for reporting! This seem to be at least partially due to the following: https://stat.ethz.ch/pipermail/r-devel/2020-May/079561.html I'm currently investigating options to fix this, but it looks rather tricky, indeed... I looked for the error over the Internet, it doesn't seem to be highly specific/informative, indeed. I hope this message of yours picks some interests (by someone who knows an easy fix?). Well, this definitely looks like a bug in R, although I am afraid active bindings are not a heavily used feature in R, and depending on how hard this is to fix, it may or may not get priority. The short term workaround - I'll admit it is a lousy on - is to either put the whole for()-loop into a local() environment, or to remove the loop index after using it. The fallback plan for RKWard is to avoid using active bindings (we happen to use them for detecting when a symbol has been changed). This has been on my TODO list for a long time, for performance reasons, but unfortunately it's not quite trivial to implement... Git commit f1e12da76b7ea4dbcb99c8a38ce9dbb5cb96e1a6 by Thomas Friedrichsmeier. Committed on 24/05/2020 at 08:25. Pushed by tfry into branch 'master'. Workaround to avoid bug in R 4.0.0 when using for loop on top level context M +1 -0 ChangeLog M +5 -0 rkward/rbackend/rkrinterface.cpp https://invent.kde.org/education/rkward/commit/f1e12da76b7ea4dbcb99c8a38ce9dbb5cb96e1a6 I can confirm the new update to 0.7.1b fixes the bug (both for the MWE above and my original script). I'm taking the liberty to mark the bug as RESOLVED (although I'm aware the workaround isn't very satisfying and the actual bug being in R, I'd still rather mark this as FIXED rather than UPSTREAM). |