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

StackOverFlowError #216

Closed
ranjanan opened this issue Feb 21, 2024 · 2 comments
Closed

StackOverFlowError #216

ranjanan opened this issue Feb 21, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@ranjanan
Copy link
Contributor

ranjanan commented Feb 21, 2024

I got the following StackOverflowError using FMI 0.13.2 and Julia v1.10:
BouncingBall.zip

julia> fmiSimulate(fmu, 0.0, 10.0)
ERROR: StackOverflowError:
Stacktrace:
     [1] fmi2Simulate(::FMU2, ::Nothing, ::Nothing, ::Nothing, ::Vararg{Any})
       @ FMI D:\.julia\packages\FMI\wLMzX\src\FMI2\comp_wraps.jl:17
     [2] fmi2Simulate(::FMU2, ::Nothing, ::Vararg{Any}; kwargs::@Kwargs{})
       @ FMI D:\.julia\packages\FMI\wLMzX\src\FMI2\comp_wraps.jl:18
--- the last 2 lines are repeated 6527 more times ---
 [13057] fmi2Simulate(::FMU2, ::Float64, ::Float64)
       @ FMI D:\.julia\packages\FMI\wLMzX\src\FMI2\comp_wraps.jl:17
 [13058] fmiSimulate(::FMU2, ::Float64, ::Vararg{Float64}; kwargs::@Kwargs{})
       @ FMI D:\.julia\packages\FMI\wLMzX\src\FMI.jl:746

Doing this instead runs as expected:

julia> fmiSimulate(fmu, (0.0, 10.0))
Model name:
        BouncingBall
Success:
        true
f(x)-Evaluations:
        In-place: 0
        Out-of-place: 0
Jacobian-Evaluations:
        ∂ẋ_∂x: 0
        ∂ẋ_∂u: 0
        ∂y_∂x: 0
        ∂y_∂u: 0
        ∂e_∂x: 0
        ∂e_∂u: 0
Gradient-Evaluations:
        ∂ẋ_∂t: 0
        ∂y_∂t: 0
        ∂e_∂t: 0
Callback-Evaluations:
        Condition (event-indicators): 0
        Time-Choice (event-instances): 0
        Affect (event-handling): 0
        Save values: 0
        Steps completed: 0
Values [1001]:
        0.0     ()
        0.01    ()
        0.02    ()
        0.03    ()
        0.04    ()
        0.05    ()
        0.06    ()
        0.07    ()
        0.08    ()
        ...
        10.0    ()
Events [0]:
@ThummeTo
Copy link
Owner

Yep, I see.
We will refactor that part anyway (there is currently function wrapping implemented, which is not the Julia way in a world with multiple dispatch). It's on the todo!

Thanks for the hint!

@ThummeTo ThummeTo self-assigned this Feb 22, 2024
@ThummeTo ThummeTo added the bug Something isn't working label Feb 22, 2024
@ThummeTo ThummeTo mentioned this issue Aug 9, 2024
@ThummeTo
Copy link
Owner

ThummeTo commented Sep 4, 2024

This should not occur anymore, please reopen if this is not true ;-)

@ThummeTo ThummeTo closed this as completed Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants