FMI.jl icon indicating copy to clipboard operation
FMI.jl copied to clipboard

StackOverFlowError

Open ranjanan opened this issue 4 months ago • 1 comments

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]:

ranjanan avatar Feb 21 '24 20:02 ranjanan