{"action":"created","issue":{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1145","repository_url":"https://api.github.com/repos/KhronosGroup/Vulkan-LoaderAndValidationLayers","labels_url":"https://api.github.com/repos/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1145/labels{/name}","comments_url":"https://api.github.com/repos/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1145/comments","events_url":"https://api.github.com/repos/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1145/events","html_url":"https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/pull/1145","id":188727731,"number":1145,"title":"vulkaninfo: fix segfault when DISPLAY is not set","user":{"login":"abelal","id":3183869,"avatar_url":"https://avatars.githubusercontent.com/u/3183869?v=3","gravatar_id":"","url":"https://api.github.com/users/abelal","html_url":"https://github.com/abelal","followers_url":"https://api.github.com/users/abelal/followers","following_url":"https://api.github.com/users/abelal/following{/other_user}","gists_url":"https://api.github.com/users/abelal/gists{/gist_id}","starred_url":"https://api.github.com/users/abelal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abelal/subscriptions","organizations_url":"https://api.github.com/users/abelal/orgs","repos_url":"https://api.github.com/users/abelal/repos","events_url":"https://api.github.com/users/abelal/events{/privacy}","received_events_url":"https://api.github.com/users/abelal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-11T10:16:03Z","updated_at":"2016-11-11T16:10:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-LoaderAndValidationLayers/pulls/1145","html_url":"https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/pull/1145","diff_url":"https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/pull/1145.diff","patch_url":"https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/pull/1145.patch"},"body":"Both xlib and xcb interfaces expect the DISPLAY environment\r\nvariable to be set before creation of a window and the\r\ndisplay creation mechanism would segfault if that is\r\nnot the case and won't provide the user with details on\r\nwhat has to be done to correct the problem.\r\nWe now handle such scenarios and exit cleanly after\r\nproviding the user with some details.\r\n\r\nSigned-off-by: Awais Belal <awais_belal@mentor.com>"},"comment":{"url":"https://api.github.com/repos/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/comments/259991406","html_url":"https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/pull/1145#issuecomment-259991406","issue_url":"https://api.github.com/repos/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/1145","id":259991406,"user":{"login":"karl-lunarg","id":16430219,"avatar_url":"https://avatars.githubusercontent.com/u/16430219?v=3","gravatar_id":"","url":"https://api.github.com/users/karl-lunarg","html_url":"https://github.com/karl-lunarg","followers_url":"https://api.github.com/users/karl-lunarg/followers","following_url":"https://api.github.com/users/karl-lunarg/following{/other_user}","gists_url":"https://api.github.com/users/karl-lunarg/gists{/gist_id}","starred_url":"https://api.github.com/users/karl-lunarg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karl-lunarg/subscriptions","organizations_url":"https://api.github.com/users/karl-lunarg/orgs","repos_url":"https://api.github.com/users/karl-lunarg/repos","events_url":"https://api.github.com/users/karl-lunarg/events{/privacy}","received_events_url":"https://api.github.com/users/karl-lunarg/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T16:10:20Z","updated_at":"2016-11-11T16:10:20Z","body":"Changes look useful, but on my system (Ubuntu LTS 16.04 nVidia GPU), the instance creation in app_create_instance() fails, which happens way before your changes to check the DISPLAY, etc.\r\n\r\nI didn't see a segfault.  Can you identify in what module the segfault occurred for you?  What driver are you using?\r\n\r\nFor me, app_create_instance() just says it can't create the instance and doesn't really know why, so it doesn't say much more.  The loader does throw some messages about not being able to get a proc addr for CreateInstance from the nvidia ICD, but I don't know if it can determine if the failure was due to a bad or missing DISPLAY env var or not.  So, the user really isn't being told that the problem is due to the DISPLAY variable.\r\n\r\nIt might be better to move your check for a NULL DISPLAY towards the top of main(), but this still won't help the case where DISPLAY is set, but the app can't open the display.  Perhaps try to open the display there, near the top of main(), and then bail if that fails? "}}
{"actor":{"display_login":"karl-lunarg"}}