Bug 438993 - Plotting using ggplot2 makes R crash in RKWard
Summary: Plotting using ggplot2 makes R crash in RKWard
Status: RESOLVED FIXED
Alias: None
Product: rkward
Classification: Applications
Component: R Console (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: RKWard Team
URL:
Keywords:
: 439162 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-21 13:14 UTC by flyos
Modified: 2022-06-16 06:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.7.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description flyos 2021-06-21 13:14:38 UTC
SUMMARY
Since R an update to 4.1.0, plotting using ggplot2 in RKWard results in a crash of the R session with the following error message:
"C stack usage  46703538412652 is too close to the limit"
The error is linked to RKWard's plotting (using e.g. pdf() device works fine) and ggplot2 (using base R plot() function works fine). Plotting in R console in a terminal works fine.

STEPS TO REPRODUCE
1. library(ggplot2)
2. ggplot(iris) + geom_point(aes(x = Sepal.Width, y = Sepal.Length))
3. An error message is triggered (see above) and the R session crashes.

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210618
KDE Plasma Version: 5.22.0
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.11.6-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15.0 Gio of RAM
Graphics Processor: AMD RENOIR
RKWard: 0.7.2
R: 4.1.0
ggplot2: 3.3.4 (tested both using system package and installed package from R)
Comment 1 Thomas Friedrichsmeier 2021-06-26 20:21:45 UTC
*** Bug 439162 has been marked as a duplicate of this bug. ***
Comment 2 Thomas Friedrichsmeier 2021-06-26 20:22:25 UTC
Quick workaround: https://invent.kde.org/education/rkward/-/commit/3ea95cb816e7388b9d0e4c8bb2092b29054243bb
Comment 3 Alfonso 2021-06-26 23:42:30 UTC
Hi, 

Would you recommend to rebuild RKWard against R base 4.1 with the:

>Quick workaround:
>https://invent.kde.org/education/rkward/-/commit/3ea95cb816e7388b9d0e4c8bb2092b29054243bb

?

Or wait for it to be included in a future release?
(right now the server is down, so I'll have to wait till tomorrow)

Thanks a lot for your answers and fixes!!!
Comment 4 Thomas Friedrichsmeier 2021-06-27 07:09:56 UTC
If you want to use RKWard with R 4.1, yes I would recommend to rebuild after applying the patch. The new graphics features (transition patterns, and advanced clipping) will not work in the onscreen device, yet, but there should be no crashes.

Of course we will provide bugfix releases, too, but that may take another while.
Comment 5 Thomas Friedrichsmeier 2021-06-27 07:15:21 UTC
Git commit 157207b915647cd8600c616cf6dfed8f83ecff30 by Thomas Friedrichsmeier.
Committed on 27/06/2021 at 07:14.
Pushed by tfry into branch 'releases/0.7.2'.

Add dummies for the new R graphics functions to avoid crash.

This is not a proper implementation, yet.

M  +3    -0    ChangeLog
M  +14   -1    rkward/rbackend/rkwarddevice/rkgraphicsdevice_setup.cpp
M  +36   -0    rkward/rbackend/rkwarddevice/rkgraphicsdevice_stubs.cpp

https://invent.kde.org/education/rkward/commit/157207b915647cd8600c616cf6dfed8f83ecff30
Comment 6 flyos 2021-07-04 10:40:22 UTC
Sorry for the delay. I can confirm a patched version fixes the problem on my system. Thank you!

I'm not sure which status to choose for the bug as "Fixed - Workaround" is missing, so I'll let you set the status of your choice Thomas.
Comment 7 Alfonso 2021-07-17 13:15:52 UTC
Thanks for the Fix!!!
It is working as: Versión 0.7.2z+0.7.3+devel1