shacklettbp / madrona_escape_room

MIT License
16 stars 7 forks source link

Viewer crashes with unhelpful error when fixed window size is larger than monitor size. #1

Open ShawnshanksGui opened 1 year ago

ShawnshanksGui commented 1 year ago

Hello, Given the process of build has been completed(no error is shown). When I run the command "./build/viewer", Errors happened :

dev.dt.queueSubmit(renderqueue, 1, &gfx_submit, frame.cpuFinished): ERROR_DEVICE_LOST Error at /home/guifei/projects/madrona/madrona_escape_room/external/madrona/src/viz/viewer_renderer.cpp:4096 in void madrona::viz::Renderer::render(const madrona::viz::ViewerCam &, const madrona::viz::Renderer::FrameConfig &) dev.dt.queueSubmit(renderqueue, 1, &gfx_submit, frame.cpuFinished) Aborted (core dumped)


my env dependency is as follows: the version of Linux kernel==5.19.0-46-generic. cmake==3.27 python== 3.10 cuda==12.1 torch==2.2.0.dev20230922+cu121 tensorboard==2.14

Give me some helps, thx

shacklettbp commented 1 year ago

What GPU do you have?

ShawnshanksGui commented 1 year ago

RTX A6000

shacklettbp commented 1 year ago

Seems like a bug then since your GPU should be supported. Can you install the vulkan SDK: https://vulkan.lunarg.com/sdk/home#linux

Once that is installed run the viewer with MADRONA_RENDER_VALIDATE=1 ./build/viewer 1 --cpu Report back here if there are any additional warnings that print out.

ShawnshanksGui commented 1 year ago

I have tried it, after installing the vulkan SDK, I run it with " MADRONA_RENDER_VALIDATE=1 ./build/viewer 1 --cpu ",
But there are still errors as follows:


Validation Error: [ VUID-vkCmdBlitImage-dstOffset-00249 ] Object 0: handle = 0x564fe0f47bd0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x110000000011, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x7a4e4265 | vkCmdBlitImage: region [0] dstOffset[].y values (0, 1536) exceed dstSubresource height extent (1061). The Vulkan spec states: For each element of pRegions, dstOffsets[0].y and dstOffsets[1].y must both be greater than or equal to 0 and less than or equal to the height of the specified dstSubresource of dstImage (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-vkCmdBlitImage-dstOffset-00249) Validation Error: [ VUID-vkCmdBlitImage-pRegions-00216 ] Object 0: handle = 0x564fe0f47bd0, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x110000000011, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0xc520728c | vkCmdBlitImage: region [0] destination image blit region exceeds image dimensions. The Vulkan spec states: The destination region specified by each element of pRegions must be a region that is contained within dstImage (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-vkCmdBlitImage-pRegions-00216) Self 0.837 0.140 0.209 0.047 0.000 0.047 -0.125 0.000 -0.291 0.108 -0.073 0.036 0.000 0.036 0.098 0.000 Partner 0.282 -0.637 0.000 0.282 0.586 0.000 Room Entities 0.306 -0.510 0.167 0.295 -0.314 0.167 0.000 1.000 0.000 0.000 1.000 0.000 0.000 1.000 0.000 0.000 1.000 0.000 0.119 0.085 0.167 0.281 0.234 0.167 0.000 1.000 0.000 0.000 1.000 0.000 0.000 1.000 0.000 0.000 1.000 0.000 Door 0.331 -0.315 0.000 0.301 0.201 0.000 Lidar 0.107 0.500 0.224 0.500 0.262 0.500 0.269 0.500 0.290 0.833 0.330 0.833 0.403 0.500 0.523 0.500 0.479 0.500 0.461 0.500 0.285 0.667 0.140 0.500 0.089 0.500 0.068 0.500 0.057 0.500 0.051 0.500 0.048 0.500 0.047 0.500 0.048 0.500 0.052 0.500 0.059 0.500 0.054 0.500 0.046 0.500 0.043 0.500 0.041 0.500 0.041 0.500 0.043 0.500 0.048 0.500 0.056 0.500 0.072 0.500 0.286 0.500 0.313 0.500 0.267 0.500 0.220 0.500 0.195 0.500 0.182 0.500 0.177 0.500 0.178 0.500 0.090 0.500 0.062 0.500 0.049 0.500 0.042 0.500 0.038 0.500 0.036 0.500 0.036 0.500 0.038 0.500 0.041 0.500 0.048 0.500 0.060 0.500 0.087 0.500 0.167 0.500 0.250 0.667 0.329 0.500 0.352 0.500 0.397 0.500 0.369 0.500 0.316 0.833 0.287 0.833 0.274 0.833 0.274 0.500 Steps Remaining 199 199 Reward -0.005 -0.005

Validation Error: [ VUID-vkCmdBlitImage-dstOffset-00249 ] Object 0: handle = 0x564fe0aa5c70, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x120000000012, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0x7a4e4265 | vkCmdBlitImage: region [0] dstOffset[].y values (0, 1536) exceed dstSubresource height extent (1061). The Vulkan spec states: For each element of pRegions, dstOffsets[0].y and dstOffsets[1].y must both be greater than or equal to 0 and less than or equal to the height of the specified dstSubresource of dstImage (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-vkCmdBlitImage-dstOffset-00249) Validation Error: [ VUID-vkCmdBlitImage-pRegions-00216 ] Object 0: handle = 0x564fe0aa5c70, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x120000000012, type = VK_OBJECT_TYPE_IMAGE; | MessageID = 0xc520728c | vkCmdBlitImage: region [0] destination image blit region exceeds image dimensions. The Vulkan spec states: The destination region specified by each element of pRegions must be a region that is contained within dstImage (https://vulkan.lunarg.com/doc/view/1.3.261.1/linux/1.3-extensions/vkspec.html#VUID-vkCmdBlitImage-pRegions-00216) dev.dt.queueSubmit(renderqueue, 1, &gfx_submit, frame.cpuFinished): ERROR_DEVICE_LOST Error at /home/guifei/projects/madrona/madrona_escape_room/external/madrona/src/viz/viewer_renderer.cpp:4096 in void madrona::viz::Renderer::render(const madrona::viz::ViewerCam &, const madrona::viz::Renderer::FrameConfig &) dev.dt.queueSubmit(renderqueue, 1, &gfx_submit, frame.cpuFinished) Aborted (core dumped)


ShawnshanksGui commented 1 year ago

btw, need you to conform whether I have a successful installment of vulkan SDK, after decompression of vulkansdk-linux-x86_64-1.3.261.1.tar.xz, Then, I directly build it with "source setup-env.sh". And, to check, I run the command of "vulkaninfo" to see what happened:

VULKANINFO Vulkan Instance Version: 1.3.261 Instance Extensions: count = 21 VK_EXT_acquire_drm_display : extension revision 1 VK_EXT_acquire_xlib_display : extension revision 1 VK_EXT_debug_report : extension revision 10 VK_EXT_debug_utils : extension revision 2 VK_EXT_direct_mode_display : extension revision 1 VK_EXT_display_surface_counter : extension revision 1 VK_KHR_device_group_creation : extension revision 1 VK_KHR_display : extension revision 23 VK_KHR_external_fence_capabilities : extension revision 1 VK_KHR_external_memory_capabilities : extension revision 1 VK_KHR_external_semaphore_capabilities : extension revision 1 VK_KHR_get_display_properties2 : extension revision 1 VK_KHR_get_physical_device_properties2 : extension revision 2 VK_KHR_get_surface_capabilities2 : extension revision 1 VK_KHR_portability_enumeration : extension revision 1 VK_KHR_surface : extension revision 25 VK_KHR_surface_protected_capabilities : extension revision 1 VK_KHR_wayland_surface : extension revision 6 VK_KHR_xcb_surface : extension revision 6 VK_KHR_xlib_surface : extension revision 6 VK_LUNARG_direct_driver_loading : extension revision 1 Layers: count = 12 VK_LAYER_INTEL_nullhw (INTEL NULL HW) Vulkan version 1.1.73, layer version 1: Layer Extensions: count = 0 Devices: count = 5 GPU id = 0 (NVIDIA RTX A6000) Layer-Device Extensions: count = 0 GPU id = 1 (NVIDIA RTX A6000) Layer-Device Extensions: count = 0 .......

shacklettbp commented 1 year ago

Yep those validation errors are very helpful. This think this is a known bug that is resulting from us trying to create a window that is a higher resolution than your display.

Please try editing src/viewer.cpp and reducing the resolution of the window: https://github.com/shacklettbp/madrona_escape_room/blob/main/src/viewer.cpp#L122 For example if you have a 1080p monitor, those numbers can be at most 1920 for width and 1080 for height.

Sorry about the bug, we're working on a big renderer refactor and will hopefully address this issue as part of that.

ShawnshanksGui commented 1 year ago

ok, I will try it latter.

ShawnshanksGui commented 11 months ago

it's fixed, thx

shacklettbp commented 11 months ago

Great. I'm going to leave this open until we add dynamic window sizing to the viewer.