[Rd] multinom crashes (when I do something stupid) (PR#8358)
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Wed Nov 30 14:40:01 CET 2005
rob.foxall at bbsrc.ac.uk writes:
> Full_Name: Rob Foxall
> Version: 2.2.0
> OS: Windows XP
> Submission from: (NULL) (149.155.96.5)
>
>
> I was using multinom from nnet package, when I did something stupid -- I entered
> in an incorrect factor variable as response. This factor had only one level.
> Instead of R telling me not to be so dumb, it crashed, clicking on debug coming
> up with the message "An exception 'Unhandled Win32 Exception' has occurred in
> Rgui.exe." This has happened on both my laptop and desktop (it took me a while
> to see my mistake!). It can be easily reproduced with made-up data, e.g.
>
> library(nnet)
> set.seed(1) # not really needed, but definitely crashes for this!
> temp_g <- as.factor(rep("level1",10))
> temp_x <- rnorm(10)
> multinom(temp_g ~ temp_x)
Thanks for the reproducible example, but the general directive is to
send reports on packages directly to the package maintainer. (He'll
see it here, so don't worry about resending.)
The fault comes here:
# weights: 3 (0 variable)
initial value 0.000000
final value 0.000000
converged
*** glibc detected *** free(): invalid next size (fast): 0x000000000172ce20 ***
Program received signal SIGABRT, Aborted.
0x00002aaaab059e79 in raise () from /lib64/tls/libc.so.6
(gdb) bt
#0 0x00002aaaab059e79 in raise () from /lib64/tls/libc.so.6
#1 0x00002aaaab05b48f in abort () from /lib64/tls/libc.so.6
#2 0x00002aaaab08e5d3 in __libc_message () from /lib64/tls/libc.so.6
#3 0x00002aaaab093153 in malloc_printerr () from /lib64/tls/libc.so.6
#4 0x00002aaaab0948a7 in free () from /lib64/tls/libc.so.6
#5 0x00002aaaaacb43ec in R_chk_free () from /usr/lib64/R/lib//libR.so
#6 0x00002aaaabfa3c0d in VR_unset_net ()
from /usr/lib64/R/library/nnet/libs/nnet.so
#7 0x00002aaaaac5c3ac in do_dotCode () from /usr/lib64/R/lib//libR.so
#8 0x00002aaaaac7e712 in Rf_eval () from /usr/lib64/R/lib//libR.so
....
I.e. it is within internal C code from the nnet package, so the error
most likely belongs to the package, not R at large.
--
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
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-devel
mailing list