Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 18, 2019. It is now read-only.

Handle errors during FMI initialization#1110

Open
sjoelund wants to merge 1 commit into
OpenModelica:master from
sjoelund:fmiinit
Open

Handle errors during FMI initialization #1110
sjoelund wants to merge 1 commit into
OpenModelica:master from
sjoelund:fmiinit

Conversation

@sjoelund

@sjoelund sjoelund commented Oct 7, 2016

Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2016年10月07日_08-16-20.

Copy link
Copy Markdown
Member

The test suite is unstable according to OpenModelica_TEST_PULL_REQUEST 2017年10月02日_11-49-39.

MMC_CATCH_INTERNAL(mmc_jumper)
if (!fmi2callbacksOK) {
return NULL;
}

@adeas31 adeas31 Oct 4, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks a bit strange. The if condition will always fail since fmi2callbacksOK is set to 1 unless you are doing something in MMC_CATCH_INTERNAL which is of course not the case since fmi2callbacksOK is local.

@sjoelund sjoelund Oct 4, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not weird. It's setjmp/longjmp. The assignment to fmi2callbacksOK doesn't occur if an error is triggered.

@sjoelund sjoelund Oct 4, 2017

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, it's a bit wrong since it returns before restoring the jump buffer. But a bigger problem is that when OM imports the FMU, we use thread-local storage for the threadData and we need to have separate threadData for the importing model... This seems to be what causes the crashes. Maybe we need to make the simulation check for existing threadData and re-use that...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer

@adeas31 adeas31 adeas31 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /