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 Utils Messenger error #67

Closed
okuma10 opened this issue Aug 19, 2020 · 4 comments
Closed

Debug Utils Messenger error #67

okuma10 opened this issue Aug 19, 2020 · 4 comments

Comments

@okuma10
Copy link
Contributor

okuma10 commented Aug 19, 2020

when enabling VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT in VkDebugUtilsMessengerCreateInfoEXT

I get an error to the console. The message still prints but I get this as well:

TypeError: an integer is required
From cffi callback <function _external_vkDebugUtilsMessengerCallbackEXT at 0x000002391337DB88>:
Trying to convert the result back to C:
TypeError: an integer is required

I tried with no printing in the debug function, just a pass and with no message I still get the error.
Removing the flag removes the error.

@realitix
Copy link
Owner

Hello @okuma10, can you show me the code that create this error ?

@okuma10
Copy link
Contributor Author

okuma10 commented Aug 24, 2020

Well...I'm not sure if it is something in my code, this is the third time I make a new project and whenever I enable the INFO_BIT , I get that error

But I found I get the error when I make the logical device,
I get the messages, but then I get the same amount of lines in errors
Here is a snippet from the last message line and the first error line in the output:

16, 1, <cdata 'struct VkDebugUtilsMessengerCallbackDataEXT *' 0x000000D411DE8390>, <cdata 'void *' NULL>
From cffi callback <function _external_vkDebugUtilsMessengerCallbackEXT at 0x00000247C2C2EC18>:
Trying to convert the result back to C:
TypeError: an integer is required

but here is my debug report function:

def Debugger(*args):
    print(args)

here is the debug create info, it's a function so instance and function refer to variables passed to it. But function is basically the debug function above:

debug_create_info = VkDebugUtilsMessengerCreateInfoEXT(
            sType=VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT,
            pNext=None,
            flags=0,
            messageSeverity=VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT|
                            VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT|
                            VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT,
            messageType=VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT|
                        VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT |
                        VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT,
            pfnUserCallback=function
    )

    vkCreateDebugUtilsMessengerEXT = vkGetInstanceProcAddr(instance,"vkCreateDebugUtilsMessengerEXT")

    debug_messenger = vkCreateDebugUtilsMessengerEXT(instance,debug_create_info,None)

setting things up obviously works, because I get the message before the errors.

this is my logical device creation

      createInfo = VkDeviceCreateInfo(
                sType=VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
                pNext=None,
                flags=0,
                queueCreateInfoCount=len(queues),
                pQueueCreateInfos=queues,
                enabledLayerCount=0,
                ppEnabledLayerNames=None,
                enabledExtensionCount=0,
                ppEnabledExtensionNames=None,
                pEnabledFeatures=None
        )
        self.logical_device = vkCreateDevice(physical_device,createInfo,None)

again everything is fine in the logical device creation, since I get the handle and those messages , if I get args[2].pMessage reports loading of device extensions:

b'Device Extension: VK_KHR_driver_properties (C:\\Windows\\System32\\DriverStore\\FileRepository\\u0357776.inf_amd64_5cb88e05332b51cb\\B357669\\.\\amdvlk64.dll) version 0.0.1'

@realitix
Copy link
Owner

Hello @okuma10, Can you give me the minimum of code allowing me to reproduce your issue ?
Thanks

@okuma10
Copy link
Contributor Author

okuma10 commented Jan 11, 2022

I think I just found the reason for the error, my debug function needed to have a return True at the end.

@okuma10 okuma10 closed this as completed Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants