R Session Aborted

When I run sampling() function for a (hierarchical) model,
about half of them fails with the following error :(R session aborted).
Sometimes succeeds without the error, but sometimes fails with the error (, the success rate is 50%~10%?).
But for another model, the error does not occur, so, I guess it causes my Stan program.

a

The sampling failure always occurs in the following step, so it cannot go out from the warmup.

I am not sure but the following relates?

> writeLines(readLines(file.path(Sys.getenv("HOME"), ".R/Makevars")))
CXX14 = "C:\Rtools\mingw_64\bin\g++.exe"



CXX14FLAGS=-O3 -Wno-unused-variable -Wno-unused-function
CXX14 = g++ -std=c++1y
 


CC=/opt/local/bin/gcc-mp-4.7
CXX=/opt/local/bin/g++-mp-4.7
CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/opt/local/include
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/lib
CXXFLAGS= -g0 -O3 -Wall
MAKE=make -j4

CXXFLAGS=-O3

 
CXX14FLAGS=-O3 -Wno-unused-variable -Wno-unused-function
CXX14 = g++ -std=c++1y
 

CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable
 -Wno-unused-function -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION

Have you tried to run it in R directly and thus check to see if this has to do with RStudio?

Yes, from R console (not R studio), the error occurs.

Well the warning message corresponds to bad initial start values for the sampling. I think you need to provide a complete minimum working example.

Now, I do not have a minimal example, but the code is given by the following;

library(BayesianFROC)
# This is data
   viewdata(dd)

# Run rstan::sampling(), and fit a model to the above data
f <- fit_Bayesian_FROC( ite  = 111,  cha = 1, summary = T, dataList = dd )

# Show Stan file
f@stanmodel