radian icon indicating copy to clipboard operation
radian copied to clipboard

Radian 0.6.13 crashes after calling reticulate.

Open camsique opened this issue 1 year ago • 6 comments
trafficstars

radian --version
radian version: 0.6.13
r executable: /usr/local/lib64/R/bin/R
r version: 4.3.1
python executable: /usr/bin/python
python version: 3.9.18

Case 1) No crash, but does not work.

r$> library(reticulate)
r$> pd <- import("pandas")
Error: C stack usage  7973712 is too close to the limit

Case 2) Crashes

r$> library(reticulate)
r$> use_python("/usr/bin/python")
Error: C stack usage  7975088 is too close to the limit
Error: C stack usage  7974544 is too close to the limit

 *** caught segfault ***
address (nil), cause 'memory not mapped'
Segmentation fault (core dumped)

Case 3) No problem calling this in plain R console.

This used to work in radian prior to upgrading to development version.

camsique avatar Sep 16 '24 13:09 camsique

It seems that reticulate 1.39 introduces some changes that break how radian interacts with it.

Downgrading reticulate to 1.38 is a workaround for now before I have time to investigate the exact cause.

remotes::install_version("reticulate", version="1.38")

randy3k avatar Sep 16 '24 17:09 randy3k

At the first glace, it is most likely caused by https://github.com/rstudio/reticulate/pull/1641 where it changes how the python is initialated.

randy3k avatar Sep 16 '24 17:09 randy3k

Dear randy3k, the workaround with reticulate downgrade works. Thank you. Also thank you for the amazing package!

camsique avatar Sep 16 '24 17:09 camsique

I have found the culprit and reported to upstream. Hopefully they will be able to fix it soon.

randy3k avatar Sep 16 '24 19:09 randy3k

Thank you.

camsique avatar Sep 16 '24 21:09 camsique

It should be fixed in the next reticulate release.

randy3k avatar Sep 21 '24 05:09 randy3k