Closed penguin42 closed 6 years ago
and filed as Fedora bz https://bugzilla.redhat.com/show_bug.cgi?id=1648430
Changed to vector.data()
to avoid the assert. Though I strongly disagree with the idea that a runtime can fatal error on something that isn't at all fatal in a release build, especially when that means that every vector lookup is paying a cost.
Description
I'm getting an assertion running 'replay' on the attached capture file (from my own toy application). This triggers on Fedora 29's renderdoc-1.1-1.fc29.x86_64 but doesn't trigger if I build 1.1 or head from source myself on f29; my suspicion is that fedora's rpm build turns some checking flags on in the build? (I'll file a Fedora bug referencing this one)
Repro steps
Using the capture file at: http://www.treblig.org/debug/vulkanmand_2018.11.09_16.23.02_frame0.rdc
renderdoccmd replay /tmp/RenderDoc/vulkanmand_2018.11.09_16.23.02_frame0.rdc
/usr/include/c++/8/bits/stl_vector.h:932: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) [with _Tp = VkImageMemoryBarrier; _Alloc = std::allocator; std::vector<_Tp, _Alloc>::reference = VkImageMemoryBarrier&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
Environment
Fedora 29 x86-64 renderdoc-1.1-1.fc29.x86_64 Radeon rx550 on the open/Mesa drivers
back trace below; some notes:
4 WrappedVulkan::Serialise_vkCmdEndRenderPass (this=0x47e140, ser=..., commandBuffer=)
1297 is I think: GetResourceManager()->RecordBarriers(m_BakedCmdBufferInfo[cmd].imgbarriers, m_ImageLayouts, (uint32_t)imgBarriers.size(), &imgBarriers[0]);
(gdb) bt full
0 0x00007ffff6c6e53f in raise () from /lib64/libc.so.6
No symbol table info available.
1 0x00007ffff6c58895 in abort () from /lib64/libc.so.6
No symbol table info available.
2 0x00007ffff73af0a8 in std::__replacement_assert (
No locals.
3 0x00007ffff77c4c4f in std::vector<VkImageMemoryBarrier, std::allocator >::operator[] (__n=0,
4 WrappedVulkan::Serialise_vkCmdEndRenderPass (this=0x47e140, ser=..., commandBuffer=)
5 0x00007ffff7660054 in WrappedVulkan::ProcessChunk(ReadSerialiser&, VulkanChunk) ()
--Type for more, q to quit, c to continue without paging--
_report", '\000' <repeats 236 times>, specVersion = 9}, {
extensionName = "VK_EXT_debug_utils", '\000' <repeats 237 times>, specVersion = 1}, {
extensionName = "VK_EXT_depth_range_unrestricted", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_EXT_direct_mode_display", '\000' <repeats 229 times>, specVersion = 1}, {
extensionName = "VK_EXT_display_control", '\000' <repeats 233 times>, specVersion = 1}, {
extensionName = "VK_EXT_display_surface_counter", '\000' <repeats 225 times>, specVersion = 1}, {
extensionName = "VK_EXT_global_priority", '\000' <repeats 233 times>, specVersion = 2}, {
extensionName = "VK_EXT_sampler_filter_minmax", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_stencil_export", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_subgroup_ballot", '\000' <repeats 226 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_subgroup_vote", '\000' <repeats 228 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_viewport_index_layer", '\000' <repeats 221 times>, specVersion = 1}, {
extensionName = "VK_EXT_validation_flags", '\000' <repeats 232 times>, specVersion = 1}, {
extensionName = "VK_EXT_vertex_attribute_divisor", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_IMG_format_pvrtc", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_16bit_storage", '\000' <repeats 235 times>, specVersion = 1}, {
extensionName = "VK_KHR_bind_memory2", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_dedicated_allocation", '\000' <repeats 228 times>, specVersion = 3}, {
extensionName = "VK_KHR_descriptor_update_template", '\000' <repeats 222 times>, specVersion = 1}, {
extensionName = "VK_KHR_device_group", '\000' <repeats 236 times>, specVersion = 3}, {
extensionName = "VK_KHR_device_group_creation", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_KHR_display", '\000' <repeats 241 times>, specVersion = 21}, {
extensionName = "VK_KHR_display_swapchain", '\000' <repeats 231 times>, specVersion = 9}, {
extensionName = "VK_KHR_external_fence", '\000' <repeats 234 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_fence_capabilities", '\000' <repeats 221 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_fence_fd", '\000' <repeats 231 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_memory", '\000' <repeats 233 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_memory_capabilities", '\000' <repeats 220 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_memory_fd", '\000' <repeats 230 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_semaphore", '\000' <repeats 230 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_semaphore_capabilities", '\000' <repeats 217 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_semaphore_fd", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_KHR_get_memory_requirements2", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_KHR_get_physical_device_properties2", '\000' <repeats 217 times>, specVersion = 1}, {
extensionName = "VK_KHR_get_surface_capabilities2", '\000' <repeats 223 times>, specVersion = 1}, {
extensionName = "VK_KHR_image_format_list", '\000' <repeats 231 times>, specVersion = 1}, {
extensionName = "VK_KHR_maintenance1", '\000' <repeats 236 times>, specVersion = 2}, {
extensionName = "VK_KHR_maintenance2", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_maintenance3", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_multiview", '\000' <repeats 239 times>, specVersion = 1}, {
extensionName = "VK_KHR_push_descriptor", '\000' <repeats 233 times>, specVersion = 2}, {
extensionName = "VK_KHR_relaxed_block_layout", '\000' <repeats 228 times>, specVersion = 1}, {
extensionName = "VK_KHR_sampler_mirror_clamp_to_edge", '\000' <repeats 220 times>, specVersion = 1}, {
extensionName = "VK_KHR_sampler_ycbcr_conversion", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_KHR_shader_draw_parameters", '\000' <repeats 226 times>, specVersion = 1}, {
extensionName = "VK_KHR_storage_buffer_storage_class", '\000' <repeats 220 times>, specVersion = 1}, {
extensionName = "VK_KHR_surface", '\000' <repeats 241 times>, specVersion = 25}, {
extensionName = "VK_KHR_swapchain", '\000' <repeats 239 times>, specVersion = 70}, {
extensionName = "VK_KHR_variable_pointers", '\000' <repeats 231 times>, specVersion = 1}, {
extensionName = "VK_KHR_xcb_surface", '\000' <repeats 237 times>, specVersion = 6}, {
extensionName = "VK_KHR_xlib_surface", '\000' <repeats 236 times>, specVersion = 6}, {
extensionName = "VK_NV_dedicated_allocation", '\000' <repeats 229 times>, specVersion = 1}, {
extensionName = "VK_NV_external_memory", '\000' <repeats 234 times>, specVersion = 1}, {
extensionName = "VK_NV_external_memory_capabilities", '\000' <repeats 221 times>, specVersion = 1}}
renderdocProvidedInstanceExtensions = {{extensionName = "VK_EXT_debug_utils", '\000' <repeats 237 times>,
specVersion = 1}}
6 0x00007ffff7660ceb in WrappedVulkan::ContextProcessChunk (this=0x47e140, ser=..., chunk=VulkanChunk::vkCmdEndRenderPass)
7 0x00007ffff7661044 in WrappedVulkan::ContextReplayLog(CaptureState, unsigned int, unsigned int, bool) ()
--Type for more, q to quit, c to continue without paging--
extensionName = "VK_AMD_shader_trinary_minmax", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_EXT_acquire_xlib_display", '\000' <repeats 228 times>, specVersion = 1}, {
extensionName = "VK_EXT_conservative_rasterization", '\000' <repeats 222 times>, specVersion = 1}, {
extensionName = "VK_EXT_debug_marker", '\000' <repeats 236 times>, specVersion = 4}, {
extensionName = "VK_EXT_debug_report", '\000' <repeats 236 times>, specVersion = 9}, {
extensionName = "VK_EXT_debug_utils", '\000' <repeats 237 times>, specVersion = 1}, {
extensionName = "VK_EXT_depth_range_unrestricted", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_EXT_direct_mode_display", '\000' <repeats 229 times>, specVersion = 1}, {
extensionName = "VK_EXT_display_control", '\000' <repeats 233 times>, specVersion = 1}, {
extensionName = "VK_EXT_display_surface_counter", '\000' <repeats 225 times>, specVersion = 1}, {
extensionName = "VK_EXT_global_priority", '\000' <repeats 233 times>, specVersion = 2}, {
extensionName = "VK_EXT_sampler_filter_minmax", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_stencil_export", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_subgroup_ballot", '\000' <repeats 226 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_subgroup_vote", '\000' <repeats 228 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_viewport_index_layer", '\000' <repeats 221 times>, specVersion = 1}, {
extensionName = "VK_EXT_validation_flags", '\000' <repeats 232 times>, specVersion = 1}, {
extensionName = "VK_EXT_vertex_attribute_divisor", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_IMG_format_pvrtc", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_16bit_storage", '\000' <repeats 235 times>, specVersion = 1}, {
extensionName = "VK_KHR_bind_memory2", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_dedicated_allocation", '\000' <repeats 228 times>, specVersion = 3}, {
extensionName = "VK_KHR_descriptor_update_template", '\000' <repeats 222 times>, specVersion = 1}, {
extensionName = "VK_KHR_device_group", '\000' <repeats 236 times>, specVersion = 3}, {
extensionName = "VK_KHR_device_group_creation", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_KHR_display", '\000' <repeats 241 times>, specVersion = 21}, {
extensionName = "VK_KHR_display_swapchain", '\000' <repeats 231 times>, specVersion = 9}, {
extensionName = "VK_KHR_external_fence", '\000' <repeats 234 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_fence_capabilities", '\000' <repeats 221 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_fence_fd", '\000' <repeats 231 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_memory", '\000' <repeats 233 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_memory_capabilities", '\000' <repeats 220 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_memory_fd", '\000' <repeats 230 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_semaphore", '\000' <repeats 230 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_semaphore_capabilities", '\000' <repeats 217 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_semaphore_fd", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_KHR_get_memory_requirements2", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_KHR_get_physical_device_properties2", '\000' <repeats 217 times>, specVersion = 1}, {
extensionName = "VK_KHR_get_surface_capabilities2", '\000' <repeats 223 times>, specVersion = 1}, {
extensionName = "VK_KHR_image_format_list", '\000' <repeats 231 times>, specVersion = 1}, {
extensionName = "VK_KHR_maintenance1", '\000' <repeats 236 times>, specVersion = 2}, {
extensionName = "VK_KHR_maintenance2", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_maintenance3", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_multiview", '\000' <repeats 239 times>, specVersion = 1}, {
extensionName = "VK_KHR_push_descriptor", '\000' <repeats 233 times>, specVersion = 2}, {
extensionName = "VK_KHR_relaxed_block_layout", '\000' <repeats 228 times>, specVersion = 1}, {
extensionName = "VK_KHR_sampler_mirror_clamp_to_edge", '\000' <repeats 220 times>, specVersion = 1}, {
extensionName = "VK_KHR_sampler_ycbcr_conversion", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_KHR_shader_draw_parameters", '\000' <repeats 226 times>, specVersion = 1}, {
extensionName = "VK_KHR_storage_buffer_storage_class", '\000' <repeats 220 times>, specVersion = 1}, {
extensionName = "VK_KHR_surface", '\000' <repeats 241 times>, specVersion = 25}, {
extensionName = "VK_KHR_swapchain", '\000' <repeats 239 times>, specVersion = 70}, {
extensionName = "VK_KHR_variable_pointers", '\000' <repeats 231 times>, specVersion = 1}, {
extensionName = "VK_KHR_xcb_surface", '\000' <repeats 237 times>, specVersion = 6}, {
extensionName = "VK_KHR_xlib_surface", '\000' <repeats 236 times>, specVersion = 6}, {
extensionName = "VK_NV_dedicated_allocation", '\000' <repeats 229 times>, specVersion = 1}, {
extensionName = "VK_NV_external_memory", '\000' <repeats 234 times>, specVersion = 1}, {
extensionName = "VK_NV_external_memory_capabilities", '\000' <repeats 221 times>, specVersion = 1}}
renderdocProvidedInstanceExtensions = {{extensionName = "VK_EXT_debug_utils", '\000' <repeats 237 times>,
specVersion = 1}}
8 0x00007ffff7663d56 in WrappedVulkan::ReadLogInitialisation(RDCFile*, bool) ()
--Type for more, q to quit, c to continue without paging--
extensionName = "VK_AMD_shader_explicit_vertex_parameter", '\000' <repeats 216 times>, specVersion = 1}, {
extensionName = "VK_AMD_shader_trinary_minmax", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_EXT_acquire_xlib_display", '\000' <repeats 228 times>, specVersion = 1}, {
extensionName = "VK_EXT_conservative_rasterization", '\000' <repeats 222 times>, specVersion = 1}, {
extensionName = "VK_EXT_debug_marker", '\000' <repeats 236 times>, specVersion = 4}, {
extensionName = "VK_EXT_debug_report", '\000' <repeats 236 times>, specVersion = 9}, {
extensionName = "VK_EXT_debug_utils", '\000' <repeats 237 times>, specVersion = 1}, {
extensionName = "VK_EXT_depth_range_unrestricted", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_EXT_direct_mode_display", '\000' <repeats 229 times>, specVersion = 1}, {
extensionName = "VK_EXT_display_control", '\000' <repeats 233 times>, specVersion = 1}, {
extensionName = "VK_EXT_display_surface_counter", '\000' <repeats 225 times>, specVersion = 1}, {
extensionName = "VK_EXT_global_priority", '\000' <repeats 233 times>, specVersion = 2}, {
extensionName = "VK_EXT_sampler_filter_minmax", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_stencil_export", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_subgroup_ballot", '\000' <repeats 226 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_subgroup_vote", '\000' <repeats 228 times>, specVersion = 1}, {
extensionName = "VK_EXT_shader_viewport_index_layer", '\000' <repeats 221 times>, specVersion = 1}, {
extensionName = "VK_EXT_validation_flags", '\000' <repeats 232 times>, specVersion = 1}, {
extensionName = "VK_EXT_vertex_attribute_divisor", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_IMG_format_pvrtc", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_16bit_storage", '\000' <repeats 235 times>, specVersion = 1}, {
extensionName = "VK_KHR_bind_memory2", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_dedicated_allocation", '\000' <repeats 228 times>, specVersion = 3}, {
extensionName = "VK_KHR_descriptor_update_template", '\000' <repeats 222 times>, specVersion = 1}, {
extensionName = "VK_KHR_device_group", '\000' <repeats 236 times>, specVersion = 3}, {
extensionName = "VK_KHR_device_group_creation", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_KHR_display", '\000' <repeats 241 times>, specVersion = 21}, {
extensionName = "VK_KHR_display_swapchain", '\000' <repeats 231 times>, specVersion = 9}, {
extensionName = "VK_KHR_external_fence", '\000' <repeats 234 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_fence_capabilities", '\000' <repeats 221 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_fence_fd", '\000' <repeats 231 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_memory", '\000' <repeats 233 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_memory_capabilities", '\000' <repeats 220 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_memory_fd", '\000' <repeats 230 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_semaphore", '\000' <repeats 230 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_semaphore_capabilities", '\000' <repeats 217 times>, specVersion = 1}, {
extensionName = "VK_KHR_external_semaphore_fd", '\000' <repeats 227 times>, specVersion = 1}, {
extensionName = "VK_KHR_get_memory_requirements2", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_KHR_get_physical_device_properties2", '\000' <repeats 217 times>, specVersion = 1}, {
extensionName = "VK_KHR_get_surface_capabilities2", '\000' <repeats 223 times>, specVersion = 1}, {
extensionName = "VK_KHR_image_format_list", '\000' <repeats 231 times>, specVersion = 1}, {
extensionName = "VK_KHR_maintenance1", '\000' <repeats 236 times>, specVersion = 2}, {
extensionName = "VK_KHR_maintenance2", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_maintenance3", '\000' <repeats 236 times>, specVersion = 1}, {
extensionName = "VK_KHR_multiview", '\000' <repeats 239 times>, specVersion = 1}, {
extensionName = "VK_KHR_push_descriptor", '\000' <repeats 233 times>, specVersion = 2}, {
extensionName = "VK_KHR_relaxed_block_layout", '\000' <repeats 228 times>, specVersion = 1}, {
extensionName = "VK_KHR_sampler_mirror_clamp_to_edge", '\000' <repeats 220 times>, specVersion = 1}, {
extensionName = "VK_KHR_sampler_ycbcr_conversion", '\000' <repeats 224 times>, specVersion = 1}, {
extensionName = "VK_KHR_shader_draw_parameters", '\000' <repeats 226 times>, specVersion = 1}, {
extensionName = "VK_KHR_storage_buffer_storage_class", '\000' <repeats 220 times>, specVersion = 1}, {
extensionName = "VK_KHR_surface", '\000' <repeats 241 times>, specVersion = 25}, {
extensionName = "VK_KHR_swapchain", '\000' <repeats 239 times>, specVersion = 70}, {
extensionName = "VK_KHR_variable_pointers", '\000' <repeats 231 times>, specVersion = 1}, {
extensionName = "VK_KHR_xcb_surface", '\000' <repeats 237 times>, specVersion = 6}, {
extensionName = "VK_KHR_xlib_surface", '\000' <repeats 236 times>, specVersion = 6}, {
extensionName = "VK_NV_dedicated_allocation", '\000' <repeats 229 times>, specVersion = 1}, {
extensionName = "VK_NV_external_memory", '\000' <repeats 234 times>, specVersion = 1}, {
extensionName = "VK_NV_external_memory_capabilities", '\000' <repeats 221 times>, specVersion = 1}}
renderdocProvidedInstanceExtensions = {{extensionName = "VK_EXT_debug_utils", '\000' <repeats 237 times>,
specVersion = 1}}
9 0x00007ffff7a7c593 in ReplayController::PostCreateInit (this=0x47ad30, device=, rdc=)
10 0x00007ffff7a7d235 in ReplayController::CreateDevice (this=this@entry=0x47ad30, rdc=0x479bf0)
--Type for more, q to quit, c to continue without paging--
11 0x00007ffff7a669e2 in CaptureFile::OpenCapture(std::function<void (float)>) (this=, progress=...)
12 0x00000000004231d0 in ReplayCommand::Execute (this=, parser=...)
13 0x00000000004116c1 in renderdoccmd (env=..., argv=std::vector of length 1, capacity 3 = {...})
14 0x00000000004122cc in renderdoccmd (env=..., argc=argc@entry=3, c_argv=c_argv@entry=0x7fffffffde68)
15 0x000000000040819b in main (argc=3, argv=0x7fffffffde68)