After upgrading to R 4.1.0 and RStudio 1.4.1717 from R 4.0.5 & Rstudio 1.4.1106 (custom docker container, based on rocker/tidyverse),
I started seeing these messages printed in Red, to Rstudio console.
16 Jun 2021 01:16:27 [rsession-rstudio] ERROR system error 84 (Invalid or incomplete multibyte or wide character) [str: はここでmcparallelジョブを, len: 34, from: UTF-8, to: ISO8859-1]; OCCURRED AT rstudio::core::Error rstudio::r::util::{anonymous}::iconvstrImpl(const string&, const string&, const string&, bool, std::__cxx11::string*) src/cpp/r/RUtil.cpp:187; LOGGED FROM: rstudio::core::Error rstudio::session::modules::spelling::{anonymous}::checkSpelling(const rstudio::core::json::JsonRpcRequest&, rstudio::core::json::JsonRpcResponse*) src/cpp/session/modules/SessionSpelling.cpp:225
16 Jun 2021 01:16:27 [rsession-rstudio] ERROR system error 84 (Invalid or incomplete multibyte or wide character) [str: して, len: 6, from: UTF-8, to: ISO8859-1]; OCCURRED AT rstudio::core::Error rstudio::r::util::{anonymous}::iconvstrImpl(const string&, const string&, const string&, bool, std::__cxx11::string*) src/cpp/r/RUtil.cpp:187; LOGGED FROM: rstudio::core::Error rstudio::session::modules::spelling::{anonymous}::checkSpelling(const rstudio::core::json::JsonRpcRequest&, rstudio::core::json::JsonRpcResponse*) src/cpp/session/modules/SessionSpelling.cpp:225
16 Jun 2021 01:16:27 [rsession-rstudio] ERROR system error 84 (Invalid or incomplete multibyte or wide character) [str: ざっくり, len: 12, from: UTF-8, to: ISO8859-1]; OCCURRED AT rstudio::core::Error rstudio::r::util::{anonymous}::iconvstrImpl(const string&, const string&, const string&, bool, std::__cxx11::string*) src/cpp/r/RUtil.cpp:187; LOGGED FROM: rstudio::core::Error rstudio::session::modules::spelling::{anonymous}::checkSpelling(const rstudio::core::json::JsonRpcRequest&, rstudio::core::json::JsonRpcResponse*) src/cpp/session/modules/SessionSpelling.cpp:225
It seems "comments" in the R files opened in RStudio editor are somehow leaking? causing such errors.
Comments written with Japanese characters cause the error, ASCII only comments seem unaffected by this.
Script execution is not interrupted, it is a cosmetic issue. (but a little unnerving. may cause further errors down the line.)
I have several machines with source files synced via github.
This error is reproducible, by using the same image based on latest R 4.1.0 image.
If I roll back to 4.0.5 image, the problem disappears.
Exact symptom on 4 of my machines running Ubunto 18.04 & 20.04 so I expect this to be an issue with the image than my local setup.
Is anyone experiencing the same issue?
Any advices where should I look into, to correct the errors?
Thanks! Taiyo