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
I've found a rather odd bug in which the delegate used for DebugReportCallback is garbage collected, thus causing a random crash when the native handler calls it during the next vulkan call.
Fortunately, I believe this should be easily fixed by simply adding the delegate as a member to DebugReportCallback
My temporary solution was to simply preserve the delegate by keeping a reference to it bound to my window. It works well enough.
The text was updated successfully, but these errors were encountered:
You'll see in the samples that your workaround is the approach I've taken so far - hold a reference to the delegate in the calling code because the unmanaged function pointer passed to Vulkan isn't tracked by the garbage collector. Adding a reference to the DebugReportCallback handle adds some complexity to the generator, as it'll need to have a concept of reference lifetimes to understand which passed-in references are now owned by the returned/created handle, and I need to check where else in the API are callbacks being used this way.
I'll likely add this as part of the rework I'm doing for Vulkan 1.1 - I'm going to have to add more scope for manual overrides to the generator, and I expect this change will fit in there.
I've found a rather odd bug in which the delegate used for DebugReportCallback is garbage collected, thus causing a random crash when the native handler calls it during the next vulkan call.
Fortunately, I believe this should be easily fixed by simply adding the delegate as a member to DebugReportCallback
My temporary solution was to simply preserve the delegate by keeping a reference to it bound to my window. It works well enough.
The text was updated successfully, but these errors were encountered: