Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random crashes with getMolecule if run enough times #9

Open
stanstrup opened this issue Aug 25, 2017 · 8 comments
Open

Random crashes with getMolecule if run enough times #9

stanstrup opened this issue Aug 25, 2017 · 8 comments

Comments

@stanstrup
Copy link

stanstrup commented Aug 25, 2017

If I invoke getMolecule enough times it crashes R. Not at the same number of runs but randomly...

library(Rdisop)
for(i in 1:10000){
        print(i)
        temp <- getMolecule("CH4")
}
@sneumann
Copy link
Owner

sneumann commented Aug 28, 2017

Hi, I can't confirm that under Linux. Which OS ? sessionInfo() ?
Can you run "R -d gdb" for a stacktrace of the crash ?

@stanstrup
Copy link
Author

This was on windows 10.
I traced this to an exception code C0000005. Apparently has to do with memory.

I have now tried it on 3 different systems. Windows 7, Windows server 2008 and windows 10.

So it seems windows 10 related. Two different windows 10 machines crash. None of the others. Version of R doesn't seem to matter.

@andrewjmc
Copy link

I am having the same problem. Intriguing!

@sneumann
Copy link
Owner

sneumann commented Jul 1, 2019

Hi @andrewjmc , the memory issue could be the Disop C++ code, or the the R-C++ wrappers.
So which version of Rdisop is that ? In April @David-J-R changed stuff from RcppClassic to Rcpp,
which could've magically fixed things as side-effect. Yours, Steffen

@dschief001
Copy link

dschief001 commented Dec 2, 2019

Under Win10, I've got the same issue.
in a forloop doing a lot of things an sourcing two sub scripts containing functions only the Rdisop function call produces a Fatal Error, causing a total Rstudio crash. I was able to trace the issue back to the Rdisop calls: getMass(getMolecule("H2")) which were saved to a variable, now I hardcoded these values and it doesn't throw the error so far...
(I used the momentary RStudio version "Version 1.2.5025", to check it wasn't caused by the preview version I used.) Rdisop version 1.44.0

Thanks

  • happens also always randomly at the second/third pass through, code is more/ less similar to the given example above.

@sneumann
Copy link
Owner

sneumann commented Dec 2, 2019

Hi @dschief001 , I just tried Jan's example again and can't reproduce
under Linux. Your Rdisop is after Rdisop-1.43.2 which has the new C++ code
by David Rasp. And while Jan saw the issue only on older WIndows versions,
yours is a current Win10. Currently I am of little help here. Yours, Steffen

@dschief001
Copy link

library(Rdisop)

input <- c()
for (i in seq_len(10000)) {
  input[i] <- addMolecules(formula1 = "C12H21NO10P",formula2 = "CH2")$formula
}

crashes R on both my Win10 machines, my Rdisop versions both are 1.44.0

Hi @sneumann!

Thanks anyways for considering, I solved the issue by cardcoding the values used, but today had a similar issue, as shown above, which still seems to be present. Yours, Jakob

@sneumann
Copy link
Owner

This will require someone who can do (memory) debugging on windows.
The issue does not surface here on Linux, I am afraid. Yours, Steffen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants