ORNL-Modelica / UnrealEngine-FMIPlugin

27 stars 5 forks source link

A crash #10

Closed xiaoyang666 closed 3 years ago

xiaoyang666 commented 3 years ago

Hi This is a very good project.

Whenever I load the fmu file, there will be a crash

I am very sincerely seeking help.

$D35U@Z3}V~V@~TE63AHRON

xiaoyang666 commented 3 years ago

@greenwoodms06

tnorby commented 3 years ago

@xiaoyang666 thanks for bringing this to our attention.

It looks like we didn't add in the requisite .dlls - I have added them in. Can you check these out and let me know if this resolves your issue?

Additional note: We have the source/x64 third party libraries - fmikit, libzip, zlib - bundled for convenience. In some cases it may be necessary to obtain/build these from source.

tnorby commented 3 years ago

@greenwoodms06 - One additional note, it looks like we get a crash when attempting to open a non-existent file. The project opens with the test.fmu from your local path. Presumably if a user picks a file and (re)moves it then tries to run there will be a crash rather than a helpful message.

greenwoodms06 commented 3 years ago

@tnorby hmmm. Yes I think I came upon a similar crash too... was busy so I didn't think much about it at the time. Seems like we need to add some exists() check or something such that it fails elegantly on beginplay()

greenwoodms06 commented 3 years ago

@tnorby I added a simple catch to hopefully catch the common situation where the extracted fmu is missing

xiaoyang666 commented 3 years ago

Thank you very much for your help. After the change, the running program does not flash back.

greenwoodms06 commented 3 years ago

@xiaoyang666 are you saying it works now?

xiaoyang666 commented 3 years ago

@ xiaoyang666您是说现在可以使用吗?

No problem at the moment. The task I am doing now is to import the Adams model into UE4 for real-time simulation of vehicle dynamics. Create a vehicle class parent class in UE4 and let FMU as a child class. This is my current idea, I hope it will work through this plugin.

greenwoodms06 commented 3 years ago

@xiaoyang666 Excellent. That sounds great. We would love to know how it goes or see a demo of anything you use it for. I'll go ahead and close this issue.