ropensci / NLMR

📦 R package to simulate neutral landscape models 🏔
https://ropensci.github.io/NLMR/
65 stars 17 forks source link

segmentation fault in nlm_fbm #79

Open mhesselbarth opened 2 years ago

mhesselbarth commented 2 years ago

R-CMD-check

The new CI using GitHub actions runs successfully on Windows and Linux, however, fails on macOS due to an segmentation fault occurring during nlm_fbm. I can actually reproduce the error on my local machine as well and the R session crashes at the following line:

RandomFields::RFoptions(...)
bitbacchus commented 2 years ago

Hm, it fails to build the vignette getstarted.Rmd at line 111: nr <- NLMR::nlm_fbm(50, 100, fract_dim = 1.2). Can you locally build NLMR without the vignette and try to run nr <- NLMR::nlm_fbm(50, 100, fract_dim = 1.2) manually to see what happens?

marcosci commented 2 years ago

Hm, works like a charm on my mac:

nr <- NLMR::nlm_fbm(50, 100, fract_dim = 1.2) 'RandomFieldsUtils' will NOT use OMP 'RandomFields' will NOT use OMP

mhesselbarth commented 2 years ago

Hm, it fails to build the vignette getstarted.Rmd at line 111: nr <- NLMR::nlm_fbm(50, 100, fract_dim = 1.2). Can you locally build NLMR without the vignette and try to run nr <- NLMR::nlm_fbm(50, 100, fract_dim = 1.2) manually to see what happens?

My R session crashes completely which also seems to be the case during the CI given the following error in the logs

 *** caught segfault ***
address 0x10f00001640, cause 'memory not mapped'
bitbacchus commented 2 years ago

Super weird. Can you maybe try to run some checks like described here? On my Linux machine they run flawlessly. The checks are run in a Linux docker container, but as docker uses the host OS kernel, maybe we can learn where the segfault happens exactly...

Do you guys have the same macOS? Or has someone a fancy m1 mac already>

marcosci commented 2 years ago

I saw Max's hometown village this weekend, fancy things suit him apparently 😄

Maybe Max needs to upgrade xcode? I updated it this week because of some sklearn stuff and I works ... can't think of a different reason.

mhesselbarth commented 2 years ago

I can try to update XCode and see if that helps. Weird that it also fails during the CI run tho

mhesselbarth commented 2 years ago

Still crashing my R session completely after updating XCode...no idea what is happening...

bitbacchus commented 2 years ago

Super weird. Can you maybe try to run some checks like described here? On my Linux machine they run flawlessly. The checks are run in a Linux docker container, but as docker uses the host OS kernel, maybe we can learn where the segfault happens exactly...

maybe this helps to find the issue... -> https://eco-programmers.github.io/brain/R/Debugging%20R%20Packages/

mhesselbarth commented 2 years ago

Right...I can have a look at this next week...

Since the CI also fails, doesn't seem to be a problem just on my laptop, right?