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

ubuntu 19.10: build successful, but no runnable application #75

Closed
consultit opened this issue Aug 14, 2019 · 7 comments
Closed

ubuntu 19.10: build successful, but no runnable application #75

consultit opened this issue Aug 14, 2019 · 7 comments

Comments

@consultit
Copy link

Describe the bug
The build of Acid has been successful (inside Acid/build folder).
Unfortunately I can't get any application to run.

To Reproduce
Just try to run any application/test inside Acid/build/bin folder.

Expected behaviour
Applications and tests work.

Screenshots

Hardware:

  • Device: Nvidia GeForce GTX 970
  • OS: Ubuntu 19.10

Additional context
All applications print these information:

Version: 0.13.3
Git: ee705bb9 on master
Compiled on: Linux-4.19.0-5-amd64Audio Device: OpenAL Soft
Selected Audio Device: 'OpenAL Soft'
Instance Layers: VK_LAYER_KHRONOS_validation, VK_LAYER_LUNARG_core_validation, VK_LAYER_LUNARG_object_tracker, VK_LAYER_GOOGLE_unique_objects, VK_LAYER_LUNARG_parameter_validation, VK_LAYER_LUNARG_standard_validation, VK_LAYER_GOOGLE_threading, VK_LAYER_LUNARG_assistant_layer, VK_LAYER_LUNARG_demo_layer, VK_LAYER_LUNARG_starter_layer, VK_LAYER_LUNARG_vktrace, VK_LAYER_LUNARG_api_dump, VK_LAYER_LUNARG_monitor, VK_LAYER_LUNARG_screenshot, VK_LAYER_LUNARG_device_simulation, VK_LAYER_LUNARG_cmake, 

Discrete Physical Device: 5058 'Nvidia' 'GeForce GTX 970'
API Version: 1.1.95
Extensions: VK_KHR_8bit_storage, VK_KHR_16bit_storage, VK_KHR_bind_memory2, VK_KHR_create_renderpass2, VK_KHR_dedicated_allocation, VK_KHR_depth_stencil_resolve, VK_KHR_descriptor_update_template, VK_KHR_device_group, VK_KHR_draw_indirect_count, VK_KHR_driver_properties, VK_KHR_external_fence, VK_KHR_external_fence_fd, VK_KHR_external_memory, VK_KHR_external_memory_fd, VK_KHR_external_semaphore, VK_KHR_external_semaphore_fd, VK_KHR_get_memory_requirements2, VK_KHR_image_format_list, VK_KHR_maintenance1, VK_KHR_maintenance2, VK_KHR_maintenance3, VK_KHR_multiview, VK_KHR_push_descriptor, VK_KHR_relaxed_block_layout, VK_KHR_sampler_mirror_clamp_to_edge, VK_KHR_sampler_ycbcr_conversion, VK_KHR_shader_atomic_int64, VK_KHR_shader_draw_parameters, VK_KHR_shader_float16_int8, VK_KHR_shader_float_controls, VK_KHR_storage_buffer_storage_class, VK_KHR_swapchain, VK_KHR_swapchain_mutable_format, VK_KHR_variable_pointers, VK_KHR_vulkan_memory_model, VK_EXT_blend_operation_advanced, VK_EXT_conditional_rendering, VK_EXT_conservative_rasterization, VK_EXT_depth_range_unrestricted, VK_EXT_descriptor_indexing, VK_EXT_discard_rectangles, VK_EXT_display_control, VK_EXT_global_priority, VK_EXT_inline_uniform_block, VK_EXT_post_depth_coverage, VK_EXT_sample_locations, VK_EXT_sampler_filter_minmax, VK_EXT_scalar_block_layout, VK_EXT_shader_subgroup_ballot, VK_EXT_shader_subgroup_vote, VK_EXT_shader_viewport_index_layer, VK_EXT_transform_feedback, VK_EXT_vertex_attribute_divisor, VK_NV_dedicated_allocation, VK_NV_device_diagnostic_checkpoints, VK_NV_fill_rectangle, VK_NV_fragment_coverage_to_color, VK_NV_framebuffer_mixed_samples, VK_NV_geometry_shader_passthrough, VK_NV_sample_mask_override_coverage, VK_NV_shader_subgroup_partitioned, VK_NV_viewport_array2, VK_NV_viewport_swizzle, VK_NVX_device_generated_commands, VK_NVX_multiview_per_view_attributes,

Selected Physical Device: 5058 'GeForce GTX 970'

Running bin/Editor issues this additional error message:

File System error while adding a path or zip(Resources/Engine): not found
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
Aborted

While running any of the tests bin/Test* issues this additional error message:

Selected Physical Device: 5058 'GeForce GTX 970'
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create
Aborted

Can you help?
Thanks

@mattparks
Copy link
Member

What CXX compiler is being used by CMake? If you run the tests with gdb (build for debug mode) you should be able to get more info for me.

@mattparks
Copy link
Member

I made a small change that fixed runtime crashes on Linux: 9305528
If this fixes your issue then close this commit.

@consultit
Copy link
Author

I've updated and successfully compiled with both g++ (Ubuntu 9.1.0-9ubuntu2) 9.1.0 and clang version 8.0.1-3 (tags/RELEASE_801/final), but TestGUI, in both cases, issues the following additional message:

File System error adding path or zip (Resources / Engine): not found
Render Stage built in 2.157ms
 [UNASSIGNED-CoreValidation-Shader-OutputNotConsumed] Object: 0x1f (Type = 15) | Vertex attribute at location 2 not consumed by vertex shader
 [UNASSIGNED-CoreValidation-Shader-OutputNotConsumed] Object: 0x25 (Type = 15) | Vertex attribute at location 2 not consumed by vertex shader
 [UNASSIGNED-CoreValidation-Shader-InterfaceTypeMismatch] Object: 0x2b (Type = 15) | Attribute type of `VK_FORMAT_R32_UINT` at location 2 does not match vertex shader input
terminate called after throwing an instance of 'std :: runtime_error'
  what (): Failed to find a valid memory type for buffer
Aborted

@mattparks
Copy link
Member

All I can tell is that the exception is thrown from Buffer::FindMemoryType, this is only used when creating Buffers and Images. Some memory property is missing from your device, if you could figure out the calls leading up to the exception using CLion/GDB I could be more helpful.

I don't think I have it written wrong, two memory type resources:

https://github.com/SaschaWillems/Vulkan/blob/4318c6d43e286350dac64487bece3ce5adc624de/base/VulkanDevice.hpp#L126

https://vulkan-tutorial.com/code/29_multisampling.cpp

I've tested master on my AMD R9 390 (Windows, macOS), and NVidia 840M (Linux), and they have no major issues.

@consultit
Copy link
Author

consultit commented Aug 16, 2019

After some debug sessions of TestGUI I found that Buffer::FindMemoryType() is called several times with the following different combinations of the (typeFilter, requiredProperties) parameters, that I report:

(160, 1)
(130,  1)
(1665, 6)
(1665, 1)
(1665, 4)
(1665, 3) -> throws exception

the last combination throws the exception.
I'm definitely not a vulkan expert, so I don't know how to make it work with my video card.
P.S. this is the stack trace:

Thread #1 [TestGUI] 2366 [core: 0] (Suspended : Signal : SIGABRT:Aborted)	
	__GI_raise() at raise.c:50 0x7ffff700bbfb	
	__GI_abort() at abort.c:79 0x7ffff6fec855	
	0x7ffff73be5fa	
	0x7ffff73ca9bc	
	std::terminate() at 0x7ffff73caa17	
	__cxa_throw() at 0x7ffff73cac79	
	acid::Buffer::FindMemoryType() at Buffer.cpp:98 0x7ffff7d3e1c4	
	acid::Buffer::Buffer() at Buffer.cpp:35 0x7ffff7d3dd2f	
	std::make_unique<acid::Buffer, unsigned long const&, int, int>() at unique_ptr.h:853 0x7ffff7ca403c	
	acid::Model::SetIndices() at Model.cpp:85 0x7ffff7ca3a70	
	acid::Model::Initialize<acid::VertexDefault>() at Model.inl:63 0x7ffff7bdb157	
	acid::ModelRectangle::Load() at ModelRectangle.cpp:75 0x7ffff7cd3fab	
	acid::ModelRectangle::Create() at ModelRectangle.cpp:20 0x7ffff7cd34ab	
	acid::ModelRectangle::Create() at ModelRectangle.cpp:29 0x7ffff7cd35e0	
	acid::Gui::Gui() at Gui.cpp:11 0x7ffff7be5ebd	
	acid::UiStartLogo::UiStartLogo() at UiStartLogo.cpp:19 0x7ffff7e16fdb	
	test::Scene1::Scene1() at Scene1.cpp:16 0x5555555be4cc	
	std::make_unique<test::Scene1>() at unique_ptr.h:853 0x5555555ab841	
	test::MainGame::MainGame() at MainGame.cpp:95 0x5555555a51ac	
	std::make_unique<test::MainGame>() at unique_ptr.h:853 0x5555555aadb0	
	main() at MainGame.cpp:19 0x5555555a4356	

@mattparks
Copy link
Member

mattparks commented Aug 16, 2019 via email

@consultit
Copy link
Author

Just updated the source and TestGUI seems to work.

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

No branches or pull requests

2 participants