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

Debug messengers not destroyed on instance destruction #29

Open
rpavlik opened this Issue Apr 4, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@rpavlik
Copy link
Contributor

rpavlik commented Apr 4, 2019

I wrote some test utilities that register a debug utils messenger to provide extra info. I don't keep it around because I was relying on the "parent handle destruction implies child handle destruction" behavior, but it appears that's not the case, at least for this handle type.

As a demonstration, I have a static uintptr_t variable in the function that creates and registers the debug messenger, which gets incremented with each call and is passed as the userData parameter. My callback then prints the userdata param (cast back to an integer) at the beginning of the line. After a few test cycles, here's some sample output showing all 21 debug messengers are still active.

1 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
2 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
3 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
4 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
5 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
6 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
7 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
8 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
9 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
10 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
11 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
12 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
13 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
14 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
15 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
16 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
17 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
18 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
19 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
20 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline
21 [G  ][Verbose][OpenXR-Loader       ][xrDestroyInstance               ] Completed loader trampoline

@daveh-lunarg daveh-lunarg self-assigned this Apr 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.