Few more details: nSamples_save is an integer variable and if nSamples_save>1000 I get the error, while if nSamples_save<1000 everything is fine -- View this message in context: http://r.789695.n4.nabble.com/Invalid-read-of-size-8-tp4702843p4702847.html Sent from the R devel mailing list archive at Nabble.com.