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

simGetImages API causes a Vulcan Error for high resolution images #4339

Closed
bozcani opened this issue Feb 7, 2022 · 3 comments · Fixed by #4372
Closed

simGetImages API causes a Vulcan Error for high resolution images #4339

bozcani opened this issue Feb 7, 2022 · 3 comments · Fixed by #4372
Labels

Comments

@bozcani
Copy link

bozcani commented Feb 7, 2022

Bug report

  • AirSim Version/#commit: 1.6.0
  • UE/Unity version: 4.27.1
  • autopilot version:
  • OS Version: Ubuntu 20.04
  • GPU: NVIDIA GeForce RTX 3060 Laptop GPU, 6GB

What's the issue you encountered?

I see that pixel formats in PIPCamera.cpp have been changed a while ago in this commit: 705a366

This change causes an error if simGetImages API is called for a relatively higher resolution image request (i.e, 2048, 1152). See the error below:

[2022.02.07-08.39.54:241][288]LogVulkanRHI: Error: VulkanRHI::vkDeviceWaitIdle(Device) failed, VkResult=-4
 at <path to UE4.27>/Engine/Source/Runtime/VulkanRHI/Private/VulkanDevice.cpp:1344 
 with error VK_ERROR_DEVICE_LOST
Fatal error: [File:<path to UE4.27>/Engine/Source/Runtime/VulkanRHI/Private/VulkanUtil.cpp] [Line: 958] 
VulkanRHI::vkDeviceWaitIdle(Device) failed, VkResult=-4
 at <path to UE4.27>/Engine/Source/Runtime/VulkanRHI/Private/VulkanDevice.cpp:1344 
 with error VK_ERROR_DEVICE_LOST
Segmentation fault (core dumped)

I think the reason is when you switch pixel format to Float, it requires more memory. There is no problem with commits before 705a366

However, after 705a366, the error appears when you request high resolution images vie simGetImages API.

Settings

Related piece of Settings:

  "CameraDefaults": {
      "CaptureSettings": [
        {
          "ImageType": 0,
          "Width": 2048,
          "Height": 1152,
          "FOV_Degrees": 90,
          "AutoExposureSpeed": 100,
          "MotionBlurAmount": 0
        },
        {
          "ImageType": 5,
          "Width": 2048,
          "Height": 1152,
          "FOV_Degrees": 90,
          "AutoExposureSpeed": 100,
          "MotionBlurAmount": 0
        }
    ],
    "Gimbal": {
      "Stabilization": 1,
      "Pitch": -45, "Roll": 0
    }
  }

How can the issue be reproduced?

  1. Run simGetImages API with the above settings.

Include full error message in text form

What's better than filing an issue? Filing a pull request :).

@jonyMarino jonyMarino added the bug label Feb 21, 2022
@jonyMarino
Copy link
Collaborator

Thanks for the report. We will fix it.

@zimmy87
Copy link
Contributor

zimmy87 commented Feb 24, 2022

Hi @bozcani, I've put out a fix for this issue in #4372, please retest with the fix applied and let me know if you notice any additional issues.

@bozcani
Copy link
Author

bozcani commented Mar 1, 2022

It works with the fix. Thanks! Feel free to close the issue after merging

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

Successfully merging a pull request may close this issue.

3 participants