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

Fix crash when requesting images #2926

Closed
wants to merge 1 commit into from

Conversation

marco-stephan
Copy link

@marco-stephan marco-stephan commented Aug 11, 2020

Fixes #2925

The end_draw_handle_ lambda is being executed on a different thread than the ExecuteTask() (MainThread in contrast to RenderThread). As both of these tasks work on data of the RenderRequest object, we have to ensure that the thread that is calling the getScreenshot(...) function blocks until both tasks have been executed completely before continuing.

@WouterJansen
Copy link
Contributor

WouterJansen commented Aug 22, 2020

I do experience the occasional crash on packaged builds so tried this out. Unfortunately, this in fact gives me pretty much a guaranteed fatal crash on one of the first image requests on packaged builds. In the editor it seemingly works fine.

[2020.08.22-11.03.36:694][363]LogWindows: Error: Fatal error: [File:D:\UnrealEngine\Engine\Source\Runtime\RenderCore\Private\RenderingThread.cpp] [Line: 819] 
[2020.08.22-11.03.36:695][363]LogWindows: Error: Rendering thread exception:
[2020.08.22-11.03.36:695][363]LogWindows: Error: Fatal error!

Not much more useful information in the crash logs.

I'm on a custom fork of airsim on UE 4.22.3 but not any changes made to camera operation outside of recently merging this PR #2881.

@ironclownfish
Copy link
Contributor

It sounds like this needs some thorough testing for runtime errors before we merge it.

@zimmy87
Copy link
Contributor

zimmy87 commented Dec 4, 2020

I tested this PR locally and am seeing the same behavior as @WouterJansen: a Fatal Error when calling the simGetImages API. I was able to repro this by running the AirSim\PythonClient\multirotor\high_res_camera.py script on a packaged build. I concur with @ironclownfish, this Fatal Error needs to be fixed before a merge.

@jonyMarino
Copy link
Collaborator

Closed due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AirSim crashes when requested an image
5 participants