-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fix Weather API crash #3009
Fix Weather API crash #3009
Conversation
Hey @rajat2004 what other tasks are remaining for this PR? Do you have an estimate for when this will come out of the draft stage? |
@zimmy87 The main problem right now to work on loading the assets correctly, currently they get removed from the packaged build since UE can't find any references to them, with the error message posted above
I'll mostly be able to work on this only after a few days, have some exams right now |
c376e91
to
65318a3
Compare
@saihv If possible, could you have a look at this PR when free? I'm having some troubles with the Weather assets, the implementation seems to be in both C++ code and .uasset files, I refreshed the assets which UE said had compilation errors, I feel things should be working if it were using just the C++ code, however only some weather effects such as Fog or Dust are working, and others are not. I'll also try to dig more into what is causing the issues, but this might become too complex if changes are required in both code and assets. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No rush on these changes as this is still in the draft stage; just leaving these comments for when you're ready to move out of draft stage
Hi @rajat2004, as per loading the assets, is there 1 or more objects that can be added to "AirSim\Unreal\Environments\Blocks\Content\AirSimAssets.umap" that will force the right assets to load for that project? In all the release environments, we add a copy of AirSimAssets.umap to the environment's content folder, which forces the assets for both the drone and car to load (otherwise we get similar errors about the assets not being packaged). |
@zimmy87 Yeah, I believe adding the Weather assets to the map should force UE to package them as well. If that works, then just the first commit should be enough to fix the problem. TBH, I personally would prefer that this problem be fixed in the code itself, but that seems to be getting pretty messy, so including the assets is probably the easier way to go |
Hi @rajat2004, we've published #3729 which relocates AirSimAssets.umap to be inside of the plugin. If there's a actor that can be added to AirSimAssets.umap that will fix the packaging errors you're seeing, let us know and we can update our PR. |
Hi @rajat2004! Is there something you need to continue with this PR? |
@jonyMarino I think the only fix required now is to run the weather commands on the game thread, the missing assets can be fixed by including them in the map which references all the assets. I'll drop the later commits, if they're needed it'll better to do it again from scratch especially with the assets involved. |
65318a3
to
c9cd185
Compare
Hi Rajat! It's weird, but I've tested your script (weather.py) without your changes, and it seems to work fine with the latest version (1.5), even without the change David made to AirSimAssets.umap. |
@jonyMarino Did you try running the script with a binary rather than the editor? It fails with the 1.5.0 release for me. Currently can't compile and test a binary |
This turned out to be a Linux-only issue. I was able to repro with both binaries and in editor, but only in Linux. Applying this PR fixed the issue so I am moving ahead with merging. Thanks for the contribution @rajat2004! |
Fixes: #2988
With the latest release binary, using the
simEnableWeather
API causes crash, with the following error -Note that it'll work fine in the Editor, with or without the fix and the next problem described below
Quite clear, and so added the
RunOnGameThread
part, which exposes the more serious problem, the Weather assets are not being packagedIssue which brought this problem to light - #2988 (Described in more detail as well)
There is a workaround mentioned in the issue, but I think it'll be better to fix this at the root itself (unless turns out to be too difficult)
Haven't yet figured out how to load the asset correctly using C++ though
A Linux binary with the game thread fix applied - https://drive.google.com/file/d/1kEEhSq0u5UGiCQs3bnlZKENx7A1cnW4Q/view?usp=sharing
Current error message -