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

Segmentation fault when calling function after fmiUnload() #64

Closed
AnHeuermann opened this issue Jan 10, 2022 · 3 comments
Closed

Segmentation fault when calling function after fmiUnload() #64

AnHeuermann opened this issue Jan 10, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@AnHeuermann
Copy link

Description

When I call a function after fmiUnload I get an segmentation fault and Julia crashes.

How to reproduce

I have a FMU that I can't share that produces this error, but I can't get a FMU from the Modelica Standard Library to simulate because of #63. But I guess this should work for any FMU.

using FMI

myFMU = fmiLoad("someFMu.fmu")
fmiInstantiate!(myFMU)
success, simData = fmiSimulate(myFMU, 0.0, 1.0)
fmiUnload(myFMU)

fmiInfo(myFMU)

Of course I expect an error, but not a segmentation fault.


Version 'n stuff

OS: Ubuntu 20.04
Julia:

Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i7-10700KF CPU @ 3.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
(@v1.7) pkg> status FMI
      Status `~/.julia/environments/v1.7/Project.toml`
  [14a09403] FMI v0.3.6
@ThummeTo
Copy link
Owner

Hey Andreas,

I agree that an error message should be the way to go, instead af a crash. As you expected, this issue affects any FMU. I will try to find a nice solution for this. Until then, don't do such evil things and let that dead piece of memory in peace after fmiUnload 😅

@JoKircher
Copy link
Contributor

I will have a look at this.

@ThummeTo
Copy link
Owner

ThummeTo commented Nov 7, 2023

this can be closed, please reopen if this is still the case with v0.13.0

@ThummeTo ThummeTo closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants