Ricardo Luiz Andrade Abrantes <[EMAIL PROTECTED]> writes: > Hello to everybody! > After reading all the C code, checking for problems, and find nothing, I > decided something a little bit different... > If my ".so" library works in a wrog way in R it should do the same in C. So > I created a C program that loads my library file and the executes the same > function R is executing. > The program worked perfectly! In fact I changed two things in my library: > The function I call now return an int, not a SEXP, and the return value is 0 > not R_NilValue. > Valgrind's output is ok too... > If .Call has no problems, and if my function works perfect when called from > a C program, where the problem lies? Why my program becomes "crazy" when I > run it from R? > I would apreciate very much your help! I don't where else I could find help > on this.
Well, did you try running under a debugger? R -d gdb then "bt" after the segfault. (Make sure that things are compiled with -g option) -- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel