[ESS] brms / cmdstanr crashes in emacs but not terminal

Manuel Teodoro teoten @end|ng |rom gm@||@com
Fri May 26 10:27:49 CEST 2023


Hi Joshua,

Here is an idea but I hope that somebody with more experience in Emacs can
chip in to the discussion.

In my experience I have encountered a similar situation a couple of times:
when a process is available in the terminal but not in Emacs it is because
the path to the scripts and terminal commands is not known by emacs. Thus,
it can be possible that your package is trying to execute some commands
that are known by your terminal cmd.exe and if you tell Emacs what is the
path containing all those terminal commands, Emacs will be able to find it.

Here are a couple of links that could possibly give you some ideas. As I
said, I am not really expert in the topic, plus I use emacs in Linux so,
I'm sorry if I can't help more. But for sure this will give you some
starting point.

https://www.emacswiki.org/emacs/ExecPath
https://emacs.stackexchange.com/questions/64081/how-to-get-the-path-from-the-shell

Good luck!
Manuel T.

On Fri, May 26, 2023 at 2:35 AM Joshua Wiley via ESS-help <
ess-help using r-project.org> wrote:

> Hi All,
>
> I normally work in Emacs (28.2 build 2)) on Windows 11 pro as an admin
> user.
> Quite a few of my analyses these days use Stan (via cmdstanr and the brms
> package as example).
> I upgraded R to 4.3.0 and Stan. Now, I am quite reliably getting crashes
> where my R process terminates when using Stan. For those not familiar, Stan
> is in C++ and generates code which is then compiled into a custom C++ model
> for that Bayesian analysis. The compilation is fine, but when it starts
> sampling, I get this when I run via Emacs:
>
> ## Start sampling
> ## > >
> ## Process R finished at Fri May 26 10:32:05 2023
>
> The reason I'm asking here and not just on Stan forums is that when I start
> a terminal (cmd.exe) and start R there and run the exact same code, it
> reliably finishes and does not crash.
>
> I also tried M-x shell in Emacs and running R through that and also get a
> crash.
>
> If anyone knows a solution that would be great but at this stage I'd love
> to hear even just ideas on _what_ the difference is? I guess in my head R
> through terminal and R through Emacs were the same and so I'm not sure
> where to even begin looking for causes.
>
> Many thanks,
>
> Josh
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> ESS-help using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/ess-help
>

	[[alternative HTML version deleted]]



More information about the ESS-help mailing list