Skip to content

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

@bozcani

Description

@bozcani

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 :).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions