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

UndefRefError when accessing field declaredType in modelDescription #151

Closed
dafred94 opened this issue Oct 7, 2022 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@dafred94
Copy link

dafred94 commented Oct 7, 2022

using FMIZoo
using FMI

bball = fmiLoad(get_model_filename(1, "Dymola", "2022x"))

# now for the error...
bball.modelDescription.modelVariables[2]._Real.declaredType

Note that this only happens for specific modelVariables!

@dafred94
Copy link
Author

dafred94 commented Oct 7, 2022

Found a hint in https://github.com/ThummeTo/FMICore.jl/blob/d9898e702f8feeb383b080fe648bf80833948edc/src/FMI2_c.jl#L154.

The inner constructor does not assign to all fields.

@ThummeTo ThummeTo changed the title UndefRefError when accessing a field in modelDescription UndefRefError when accessing field declaredType in modelDescription Oct 7, 2022
@ThummeTo ThummeTo added the bug Something isn't working label Oct 13, 2022
@JoKircher
Copy link
Contributor

This PR will resolve the issue, supporting declaredTypes correctly.

ThummeTo/FMIImport.jl#79

@ThummeTo ThummeTo pinned this issue Mar 6, 2023
@ThummeTo ThummeTo unpinned this issue Mar 6, 2023
@ThummeTo
Copy link
Owner

ThummeTo commented Mar 8, 2023

This is solved in v0.12.0

@ThummeTo ThummeTo closed this as completed Mar 8, 2023
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

3 participants