Re: [R] R crashes when loading rgl package before minqa package
Hi! I have been using R for two years, but since last week I have a problem with rgl, using R 2.12 on Ubuntu 10.04. In fact, when I load rgl with library(), before any other command, I have the following error message. Could anybody help me? Thanks in advance, # + library(rgl) *** caught segfault *** address 0x4, cause 'memory not mapped' Traceback: 1: .Call(rgl_init, initValue) 2: rgl.init(initValue) 3: fun(...) 4: doTryCatch(return(expr), name, parentenv, handler) 5: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 6: tryCatchList(expr, classes, parentenv, handlers) 7: tryCatch(fun(...), error = identity) 8: runHook(.onLoad, package, env, package.lib, package) 9: loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) 10: doTryCatch(return(expr), name, parentenv, handler) 11: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 12: tryCatchList(expr, classes, parentenv, handlers) 13: tryCatch(expr, error = function(e) {call - conditionCall(e)if (!is.null(call)) {if (identical(call[[1L]], quote(doTryCatch))) call - sys.call(-4L)dcall - deparse(call)[1L]prefix - paste(Error in, dcall, : )LONG - 75Lmsg - conditionMessage(e)sm - strsplit(msg, \n)[[1L]]w - 14L + nchar(dcall, type = w) + nchar(sm[1L], type = w)if (is.na(w)) w - 14L + nchar(dcall, type = b) + nchar(sm[1L], type = b)if (w LONG) prefix - paste(prefix, \n , sep = )}else prefix - Error : msg - paste(prefix, conditionMessage(e), \n, sep = ).Internal(seterrmessage(msg[1L])) if (!silent identical(getOption(show.error.messages), TRUE)) { cat(msg, file = stderr()).Internal(printDeferredWarnings())} invisible(structure(msg, class = try-error))}) 14: try({ns - loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source)dataPath - file.path(which.lib.loc, package, data)env - attachNamespace(ns, pos = pos, dataPath = dataPath, deps)}) 15: library(rgl) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace --- interrupted --- ## --- Andrea Boneschi Politecnico di Milano -- View this message in context: http://r.789695.n4.nabble.com/R-crashes-when-loading-rgl-package-before-minqa-package-tp2719252p3005193.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] R crashes when loading rgl package before minqa package
Gaspard Lequeux Gaspard.Lequeux at biomath.ugent.be writes: Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26, 27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512, 992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800, 975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948, 970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000, 975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) optimft - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(sum((yvals - yft)^2)) } Sequence of commands needed to make the bug appear: Start R source('bugs.R') library(minqa) library(rgl) newuoa(initpar, optimft) = OK Start R source('bugs.R') library(rgl) library(minqa) newuoa(initpar, optimft) = Crash: segfault: address 0x18, cause 'memory not mapped' I found the bug using the package qpcR, where rgl is loaded when loading qpcR while minqa is only loaded later, when needed. Running on Debian squeeze 64 bit. R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu rgl version: 0.91 minqa version: 1.1.9 Rcpp version: 0.8.6 (loaded by minqa) Kind regards, Gaspard Lequeux Duplicated on Ubuntu 10.04 sessionInfo() R version 2.11.1 (2010-05-31) i486-pc-linux-gnu locale: [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_CA.UTF-8 [7] LC_PAPER=en_CA.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] minqa_1.1.9 Rcpp_0.8.6 rgl_0.91.787 Running valgrind: bol...@ubuntu-10:~/R/misc$ R -d valgrind --vanilla ==26985== Memcheck, a memory error detector ==26985== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==26985== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info ==26985== Command: /usr/lib/R/bin/exec/R --vanilla ==26985== R version 2.11.1 (2010-05-31) [snip startup info] xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23, 24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919, 983.8946,992.2512,992.1178,979.5379,974.4269,968.4113, 991.5210,977.3361,985.7800,975.5220,974.6880,973.8102, 980.7295,982.0034,984.7993,978.4948,970.4351,969.0718, 983.7892,976.3637,980.7833,987.1665,976.6000,975.1332, 971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) optimft - function(x) { +yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) +return(sum((yvals - yft)^2)) + } library(rgl) library(minqa) Loading required package: Rcpp newuoa(initpar, optimft) ==26985== Invalid read of size 4 ==26985==at 0x6763C17: __cxa_allocate_exception (in /usr/lib/libstdc++.so.6.0.13) ==26985==by 0x6EC026E: calfun_ (minqa.cpp:30) ==26985==by 0x6EC4F56: newuob_ (newuob.f:323) ==26985==by 0x6EC4ADA: newuoa_ (newuoa.f:68) ==26985==by 0x6EC2350: newuoa_cpp__rcpp__wrapper__(Rcpp::Vector14, Rcpp::Environment, SEXPREC*) (minqa.cpp:120) ==26985==by 0x6EC27D1: newuoa_cpp (minqa.cpp:110) ==26985==by 0x40BB170: ??? (in /usr/lib/R/lib/libR.so) ==26985==by 0x40F20C1: Rf_eval (in /usr/lib/R/lib/libR.so) ==26985==by 0x40F42BF: ??? (in /usr/lib/R/lib/libR.so) ==26985==by 0x40F1E37: Rf_eval (in /usr/lib/R/lib/libR.so) ==26985==by 0x40F5C6F: Rf_applyClosure (in /usr/lib/R/lib/libR.so) ==26985==by 0x40F1CDC: Rf_eval (in /usr/lib/R/lib/libR.so) ==26985== Address 0xc is not stack'd, malloc'd or (recently) free'd ==26985== *** caught segfault *** address 0xc, cause 'memory not mapped' Traceback: 1: .Call(newuoa_cpp, par, ctrl, fn1) 2: newuoa(initpar, optimft) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection: I strongly suspect that the problem is with minqa, and that loading rgl is just a way to make the problem surface. I may take a look at minqa , but you may want to send an e-mail to the maintainer [ maintainer(minqa) ] as well ... Ben Bolker __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] R crashes when loading rgl package before minqa package
I get this on Windows (it does not crash): library(minqa) library(rgl) newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced This tells me that you should be constraining your parameter x[4] (may be even x[5]) to be non-negative: Here is what I get with `bobyqa': bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0)) parameter estimates: -5.311767080681, -3861.89005072333, 979.239647766226, 0.268156271922112, 27.6418856936228 objective: 1457.20987728737 number of function evaluations: 78 Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Date: Wednesday, September 29, 2010 11:40 am Subject: [R] R crashes when loading rgl package before minqa package To: r-help@r-project.org Hej, Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) optimft - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(sum((yvals - yft)^2)) } Sequence of commands needed to make the bug appear: Start R source('bugs.R') library(minqa) library(rgl) newuoa(initpar, optimft) = OK Start R source('bugs.R') library(rgl) library(minqa) newuoa(initpar, optimft) = Crash: segfault: address 0x18, cause 'memory not mapped' I found the bug using the package qpcR, where rgl is loaded when loading qpcR while minqa is only loaded later, when needed. Running on Debian squeeze 64 bit. R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu rgl version: 0.91 minqa version: 1.1.9 Rcpp version: 0.8.6 (loaded by minqa) Kind regards, Gaspard Lequeux __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] R crashes when loading rgl package before minqa package
You data is not good enough for the model that you are trying to fit (or conversely, the model is not appropriate for the data). Some of the parameters in your model will not be estimable because there is no information in the data. See the following: xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) fn - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(yft) } plot(xvals, yvals, type=p) lines(xvals, fn(initpar)) Hope this helps, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Ravi Varadhan rvarad...@jhmi.edu Date: Thursday, September 30, 2010 10:15 am Subject: Re: [R] R crashes when loading rgl package before minqa package To: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Cc: r-help@r-project.org I get this on Windows (it does not crash): library(minqa) library(rgl) newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced This tells me that you should be constraining your parameter x[4] (may be even x[5]) to be non-negative: Here is what I get with `bobyqa': bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0)) parameter estimates: -5.311767080681, -3861.89005072333, 979.239647766226, 0.268156271922112, 27.6418856936228 objective: 1457.20987728737 number of function evaluations: 78 Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Date: Wednesday, September 29, 2010 11:40 am Subject: [R] R crashes when loading rgl package before minqa package To: r-help@r-project.org Hej, Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) optimft - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(sum((yvals - yft)^2)) } Sequence of commands needed to make the bug appear: Start R source('bugs.R') library(minqa) library(rgl) newuoa(initpar, optimft) = OK Start R source('bugs.R') library(rgl) library(minqa) newuoa(initpar, optimft) = Crash: segfault: address 0x18, cause 'memory not mapped' I found the bug using the package qpcR, where rgl is loaded when loading qpcR while minqa is only loaded later, when needed. Running on Debian squeeze 64 bit. R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu rgl version: 0.91 minqa version: 1.1.9 Rcpp version: 0.8.6 (loaded by minqa) Kind regards, Gaspard Lequeux __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] R crashes when loading rgl package before minqa package
Hej, On Thu, 30 Sep 2010, Ravi Varadhan wrote: I get this on Windows (it does not crash): library(minqa) library(rgl) newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced Does it crash when you load first rgl and then only minqa? Like this: library(rgl) library(minqa) newuoa(initpar, optimft) /Gaspard This tells me that you should be constraining your parameter x[4] (may be even x[5]) to be non-negative: Here is what I get with `bobyqa': bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0)) parameter estimates: -5.311767080681, -3861.89005072333, 979.239647766226, 0.268156271922112, 27.6418856936228 objective: 1457.20987728737 number of function evaluations: 78 Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Date: Wednesday, September 29, 2010 11:40 am Subject: [R] R crashes when loading rgl package before minqa package To: r-help@r-project.org Hej, Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) optimft - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(sum((yvals - yft)^2)) } Sequence of commands needed to make the bug appear: Start R source('bugs.R') library(minqa) library(rgl) newuoa(initpar, optimft) = OK Start R source('bugs.R') library(rgl) library(minqa) newuoa(initpar, optimft) = Crash: segfault: address 0x18, cause 'memory not mapped' I found the bug using the package qpcR, where rgl is loaded when loading qpcR while minqa is only loaded later, when needed. Running on Debian squeeze 64 bit. R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu rgl version: 0.91 minqa version: 1.1.9 Rcpp version: 0.8.6 (loaded by minqa) Kind regards, Gaspard Lequeux __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] R crashes when loading rgl package before minqa package
Hej, On Thu, 30 Sep 2010, Ravi Varadhan wrote: You data is not good enough for the model that you are trying to fit (or conversely, the model is not appropriate for the data). Yes. I agree. However, this should not cause R to crash. (Around 100.000 models are fitted, and it is not possible to look at the data by hand first. Bogus results are filtered out afterwards.) /Gaspard Some of the parameters in your model will not be estimable because there is no information in the data. See the following: xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) fn - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(yft) } plot(xvals, yvals, type=p) lines(xvals, fn(initpar)) Hope this helps, Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Ravi Varadhan rvarad...@jhmi.edu Date: Thursday, September 30, 2010 10:15 am Subject: Re: [R] R crashes when loading rgl package before minqa package To: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Cc: r-help@r-project.org I get this on Windows (it does not crash): library(minqa) library(rgl) newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced This tells me that you should be constraining your parameter x[4] (may be even x[5]) to be non-negative: Here is what I get with `bobyqa': bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0)) parameter estimates: -5.311767080681, -3861.89005072333, 979.239647766226, 0.268156271922112, 27.6418856936228 objective: 1457.20987728737 number of function evaluations: 78 Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Date: Wednesday, September 29, 2010 11:40 am Subject: [R] R crashes when loading rgl package before minqa package To: r-help@r-project.org Hej, Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) optimft - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(sum((yvals - yft)^2)) } Sequence of commands needed to make the bug appear: Start R source('bugs.R') library(minqa) library(rgl) newuoa(initpar, optimft) = OK Start R source('bugs.R') library(rgl) library(minqa) newuoa(initpar, optimft) = Crash: segfault: address 0x18, cause 'memory not mapped' I found the bug using the package qpcR, where rgl is loaded when loading qpcR while minqa is only loaded later, when needed. Running on Debian squeeze 64 bit. R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu rgl version: 0.91 minqa version: 1.1.9 Rcpp version: 0.8.6 (loaded by minqa) Kind regards, Gaspard Lequeux __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] R crashes when loading rgl package before minqa package
No. It still does not crash in Windows. library(rgl) library(minqa) Loading required package: Rcpp newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Date: Thursday, September 30, 2010 11:43 am Subject: Re: [R] R crashes when loading rgl package before minqa package To: r-help@r-project.org Hej, On Thu, 30 Sep 2010, Ravi Varadhan wrote: I get this on Windows (it does not crash): library(minqa) library(rgl) newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced Does it crash when you load first rgl and then only minqa? Like this: library(rgl) library(minqa) newuoa(initpar, optimft) /Gaspard This tells me that you should be constraining your parameter x[4] (may be even x[5]) to be non-negative: Here is what I get with `bobyqa': bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0)) parameter estimates: -5.311767080681, -3861.89005072333, 979.239647766226, 0.268156271922112, 27.6418856936228 objective: 1457.20987728737 number of function evaluations: 78 Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Date: Wednesday, September 29, 2010 11:40 am Subject: [R] R crashes when loading rgl package before minqa package To: r-help@r-project.org Hej, Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) optimft - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(sum((yvals - yft)^2)) } Sequence of commands needed to make the bug appear: Start R source('bugs.R') library(minqa) library(rgl) newuoa(initpar, optimft) = OK Start R source('bugs.R') library(rgl) library(minqa) newuoa(initpar, optimft) = Crash: segfault: address 0x18, cause 'memory not mapped' I found the bug using the package qpcR, where rgl is loaded when loading qpcR while minqa is only loaded later, when needed. Running on Debian squeeze 64 bit. R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu rgl version: 0.91 minqa version: 1.1.9 Rcpp version: 0.8.6 (loaded by minqa) Kind regards, Gaspard Lequeux __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] R crashes when loading rgl package before minqa package
I also cannot reproduce the crash. sessionInfo() R version 2.11.1 (2010-05-31) x86_64-unknown-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] minqa_1.1.9 Rcpp_0.8.6 rgl_0.91 On Thu, 30 Sep 2010, Ravi Varadhan wrote: No. It still does not crash in Windows. library(rgl) library(minqa) Loading required package: Rcpp newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Date: Thursday, September 30, 2010 11:43 am Subject: Re: [R] R crashes when loading rgl package before minqa package To: r-help@r-project.org Hej, On Thu, 30 Sep 2010, Ravi Varadhan wrote: I get this on Windows (it does not crash): library(minqa) library(rgl) newuoa(initpar, optimft) Error in newuoa(initpar, optimft) : non-finite x values not allowed in calfun In addition: Warning message: In log(x[4]) : NaNs produced Does it crash when you load first rgl and then only minqa? Like this: library(rgl) library(minqa) newuoa(initpar, optimft) /Gaspard This tells me that you should be constraining your parameter x[4] (may be even x[5]) to be non-negative: Here is what I get with `bobyqa': bobyqa(initpar, optimft, lower=c(-Inf, -Inf, -Inf, 0, 0)) parameter estimates: -5.311767080681, -3861.89005072333, 979.239647766226, 0.268156271922112, 27.6418856936228 objective: 1457.20987728737 number of function evaluations: 78 Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvarad...@jhmi.edu - Original Message - From: Gaspard Lequeux gaspard.lequ...@biomath.ugent.be Date: Wednesday, September 29, 2010 11:40 am Subject: [R] R crashes when loading rgl package before minqa package To: r-help@r-project.org Hej, Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) optimft - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(sum((yvals - yft)^2)) } Sequence of commands needed to make the bug appear: Start R source('bugs.R') library(minqa) library(rgl) newuoa(initpar, optimft) = OK Start R source('bugs.R') library(rgl) library(minqa) newuoa(initpar, optimft) = Crash: segfault: address 0x18, cause 'memory not mapped' I found the bug using the package qpcR, where rgl is loaded when loading qpcR while minqa is only loaded later, when needed. Running on Debian squeeze 64 bit. R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu rgl version: 0.91 minqa version: 1.1.9 Rcpp version: 0.8.6 (loaded by minqa) Kind regards, Gaspard Lequeux __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self
[R] R crashes when loading rgl package before minqa package
Hej, Calling newuoa (from the minqa package) makes R crash when the package rgl is loaded first. This however only on certain selected data. The data used for testing (saved to 'bugs.R'): xvals = c(1,2,4,5,7,8,9,10,11,12,14,15,16,18,19,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36) yvals = c(857.7597,975.8624,978.2655,979.3034,965.5919,983.8946,992.2512,992.1178,979.5379,974.4269,968.4113,991.5210,977.3361,985.7800,975.5220,974.6880,973.8102,980.7295,982.0034,984.7993,978.4948,970.4351,969.0718,983.7892,976.3637,980.7833,987.1665,976.6000,975.1332,971.0757,989.4693) initpar = c(-5.1471384, -3861.8905839, 979.2616002, 0.2572355, 27.5705764) optimft - function(x) { yft = x[2] + (x[3] - x[2])/((1 + exp(x[1] * (log(xvals) - log(x[4]^x[5]) return(sum((yvals - yft)^2)) } Sequence of commands needed to make the bug appear: Start R source('bugs.R') library(minqa) library(rgl) newuoa(initpar, optimft) = OK Start R source('bugs.R') library(rgl) library(minqa) newuoa(initpar, optimft) = Crash: segfault: address 0x18, cause 'memory not mapped' I found the bug using the package qpcR, where rgl is loaded when loading qpcR while minqa is only loaded later, when needed. Running on Debian squeeze 64 bit. R version: R version 2.11.1 (2010-05-31) x86_64-pc-linux-gnu rgl version: 0.91 minqa version: 1.1.9 Rcpp version: 0.8.6 (loaded by minqa) Kind regards, Gaspard Lequeux __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.