CsPaintDemo crashes

Discuss issues related to installing or building
Post Reply
Posts: 1
Joined: Fri Apr 09 2021 12:21 pm

CsPaintDemo crashes

Post by palim »


first I want to thank the copperspice team for the free (as in freedom and as in beer) access of your code and examples.

Despite I'm no developer and having very poor knowledge of C++ I am interested in the Vulkan demo of the rotatable copper pot that comes with cs_paint.

After successfully building cs_paint (with a warning), when I execute the binary, a window opens for a moment and closes with an error:

Code: Select all

user@computer:/opt/copperspice/cs_paint/bin$ ./CsPaintDemo 
vk::Device::allocateDescriptorSetsUnique: ErrorOutOfPoolMemory, exiting
Segmentation fault (core dumped)
Here some output from the compilation including the mentioned warning:

Code: Select all

user@computer:/opt/copperspice/cs_paint$ cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/copperspice/cs_paint_lib /opt/copperspice/cs_paint
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Vulkan: /usr/lib/x86_64-linux-gnu/libvulkan.so  
-- GLM: Build with C++17 features
GLM: GCC - GNU compiler
-- The following packages have been found:

 * sdl2, Used only by the demo, <https://www.libsdl.org>
 * Vulkan, Required to build CsPaint, <https://vulkan.lunarg.com>

-- Configuring done
-- Generating done
-- Build files have been written to: /opt/copperspice/cs_paint
user@computer:/opt/copperspice/cs_paint$ ninja install
[16/30] Building CXX object CMakeFiles/CsPaint.dir/src/cspaint_device.cpp.o
src/cspaint_device.cpp: In member function ‘std::future<std::shared_ptr<CsPaint::image> > CsPaint::device::createTexture(const void*, uint64_t, uint32_t, uint32_t, vk::Format, vk::MemoryPropertyFlags, vk::ImageAspectFlags)’:
src/cspaint_device.cpp:308:19: warning: ignoring return value of ‘vk::Result vk::Queue::submit(uint32_t, const vk::SubmitInfo*, vk::Fence, const Dispatch&) const [with Dispatch = vk::DispatchLoaderStatic; uint32_t = unsigned int]’, declared with attribute nodiscard [-Wunused-result]
  308 |    vk_queue.submit(1, &submitInfo, nullptr);
      |    ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/cspaint_device.h:28,
                 from src/cspaint_device.cpp:19:
/usr/include/vulkan/vulkan.hpp:91846:49: note: declared here
91846 |   VULKAN_HPP_NODISCARD VULKAN_HPP_INLINE Result Queue::submit( uint32_t submitCount, const VULKAN_HPP_NAMESPACE::SubmitInfo* pSubmits, VULKAN_HPP_NAMESPACE::Fence fence, Dispatch const & d  ) const VULKAN_HPP_NOEXCEPT
      |                                                 ^~~~~
[18/30] Generating demo/resources/shader.vert.h
[19/30] Generating demo/resources/text.frag.h
[20/30] Generating demo/resources/shader.frag.h
[29/30] Install the project...
-- Install configuration: "Release"
-- Installing: /opt/copperspice/cs_paint_lib/lib/libCsPaint.so
-- Set runtime path of "/opt/copperspice/cs_paint_lib/lib/libCsPaint.so" to "$ORIGIN"
-- Installing: /opt/copperspice/cs_paint_lib/bin/CsPaintDemo
-- Set runtime path of "/opt/copperspice/cs_paint_lib/bin/CsPaintDemo" to "$ORIGIN"
-- Installing: /opt/copperspice/cs_paint_lib/include/glm
-- Installing: /opt/copperspice/cs_paint_lib/include/glm/CMakeFiles
I'm working with Ubuntu 20.04.2 and installed the most recent vulkan drivers from LunarG (1.2.170) for my OS. I wonder if I did something wrong or if someone other can reproduce the issue and can help me to get the demo running.

Thanks in advance and cheers,
Posts: 154
Joined: Fri Apr 10 2015 8:23 am

Re: CsPaintDemo crashes

Post by ansel »

Thanks for looking at CsPaint. We are currently not seeing these issues on any other system, and would like to investigate this further with you.

Can you provide some additional debugging information?
  • A description of the graphics hardware on your system (things like Integrated GPU, discrete GPU, driver version)
  • The output of the "vulkaninfo" command
  • Any warnings or issues seen while running the "vkcube" program
Ansel Sermersheim
CopperSpice Cofounder
Post Reply