#Has anyone ever had an error with a deletion after a ``vkUpdateDescriptorSets`` call?

70 messages · Page 1 of 1 (latest)

distant token
#

You can see in the call stack above, but the program exits right after a call to vkUpdateDescriptorSets because of some breakpoint instruction in deletion/deallocation after the call. This section of code used to create my descriptor sets worked in the past, and the only thing I have changed since then was to turn my image/image view from a 2D image to an array image.

ripe sandal
#

setup validation layers

distant token
#

no val errors

#

output just stops

ripe sandal
#

are they actually enabled

distant token
#

yes

#

I get a depth clamp val error

#

which I am wilfully ignoring rn

ripe sandal
distant token
#

literally only thing I have changed was the image view, and I create a new uniform buffer for my shadow map

#

this part of the code worked fine when I didnt have a uniform buffer and my image view was just a 2D iimage

wanton stirrup
#

it's something to do with a vector you've made, some kind of pointer misuse perhaps

distant token
#

yeah, its trying to clean up my vector of descriptor writes

#

hmm

wanton stirrup
#

given the assert I'm guessing it's a double-free somehow

#

or just an invalid free

distant token
#

right... Im just wondering how this changed with my change of the image view

#

cuz this used to work before

#

wait

wanton stirrup
#

most likely it was a bug that existed before, but didn't show up before you pushed more things into the vector and caused it to resize

distant token
#

I had the same descriptor writes as before

#

but you are right in the double free thiing

#

I will look into it

wanton stirrup
#

what does the function look like? updateGeneratedImageDescriptorSets?

distant token
#

I just realized how horrid these screenshtos aqre

#

that should be better

wanton stirrup
#

strange, nothing about that seems wrong to me

#

I don't suppose you have an overridden operator new / operator delete?

distant token
#

tried converting the vectors into arrays

#

gives me this, with no call stack

distant token
#

ok, interesting

#

it doesn't have to do with me creating a new uniform buffer

#

that means it is something to do with the creation of my image view/sampler?

ripe sandal
#

use the debugger

#

and step through the code

#

check the values and return values and whatnot

#

employ error handling

#

each vkXXX returns a VkResult of sorts

#

if you use abstractions already make sure those are correct, rule of 3, 5, 0 and whatnot

distant token
#

stepping through the call stack, it is trying to deallocate garbage

wanton stirrup
#

I don't think this is necessarily a Vulkan problem, the only other thing I can think of is buffer overflow clobbering stack data

ripe sandal
#

narrow it down with break points

#

and then inspect the values

distant token
#

very very interesting

#

I started commenting out parts of my code

#

now

#

if I do this, I get the error

#

if I make setLayoutCount = 0 and pSetLayouts = nullptr, there is no deletion error

#

wtf?

distant token
#

nvm

#

that is not the reason

#

wait

#

@wanton stirrup u might be right

#

commenting otu the creation of the uniform buffer removes the issue

distant token
#

ok, getting closer

#

its the part where im updating the uniform buffer

#

it was....

#

a singular memcpy

#

wtf

wanton stirrup
#

buffer overruns can be quite destructive

distant token
#

it finally works, though

#

my matrices are a bit messed up, but thats just some stuff I need to work out