You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 31, 2024. It is now read-only.
Problem: This nanovg-vulkan-glfw-integration-demo crash/segfault on resize. Happening only when C code of nonovg library builded with C++ code.
Happening at random - can be first resize or multiple resizes.
Debug: valgrind show no memory leaks, and same as gdb when crash happening it point on:
Thread 1 "example-vk_glfw" received signal SIGSEGV, Segmentation fault.
vknvg_renderCreateTexture (uptr=0xd86e90, type=1, w=1024, h=512, imageFlags=0, data=0x0) at /home/danil/2021_vulkan_projects/not_clean/nanovg-vulkan-glfw-integration-demo/example/../src/nanovg_vk.h:1457
Not Vulkan or driver bug:
Changing VK_PRESENT_MODE_IMMEDIATE_KHR to VK_PRESENT_MODE_FIFO_KHR - crash still happening.
Changing MAX_FRAMES_IN_FLIGHT to 1 or 10 - crash still happening.
but I dont remember why and what for
(currently I have broken Vulkan render loop because texture allocation when pixel size not 1 (dpi scale), still looking for correct fix)
danilw
changed the title
Nanovg creating crash on resize when compiled with C++ code
Fix DPI scale
Feb 3, 2023
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Just to track the problem.
Problem:
This nanovg-vulkan-glfw-integration-demo crash/segfault on resize.
Happening only when C code of nonovg library builded with C++ code.
Happening at random - can be first resize or multiple resizes.
Debug:
valgrind show no memory leaks, and same as gdb when crash happening it point on:
https://github.com/danilw/nanovg-vulkan-glfw-integration-demo/blob/main/src/nanovg_vk.h#L1457
Not Vulkan or driver bug:
Changing
VK_PRESENT_MODE_IMMEDIATE_KHR
toVK_PRESENT_MODE_FIFO_KHR
- crash still happening.Changing
MAX_FRAMES_IN_FLIGHT
to 1 or 10 - crash still happening.But pressing
hotkey 3
(keyboard number 3) or commenting https://github.com/danilw/nanovg-vulkan-glfw-integration-demo/blob/main/example/example_vulkan_glfw_integration.cpp#L1414 to 1435 (removing nanovg render from loop) - no crash.Bug in the C-code of nanovg.
And it does look like "double free or corruption" bug - https://youtu.be/xVT1y0xWgww
I checked static variables, and lots of other stuff, still can not see the source of problem... will update when find problem.
The text was updated successfully, but these errors were encountered: