Bug 97229 - [IVB] Vkquake segment fault when change resolution in the menu
Summary: [IVB] Vkquake segment fault when change resolution in the menu
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
Depends on:
Reported: 2016-08-06 18:36 UTC by mrc_munir
Modified: 2019-05-31 08:48 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Backtrace vulkan_intel.so (23.10 KB, patch)
2016-08-06 18:36 UTC, mrc_munir
Details | Splinter Review

Description mrc_munir 2016-08-06 18:36:31 UTC
Created attachment 125578 [details] [review]
Backtrace vulkan_intel.so

I reported in the author https://github.com/Novum/vkQuake/issues/46

He said is very likely intel driver bug 

Code source from 
git clone https://github.com/Novum/vkQuake.git

Dependences gcc libsdl2-dev libvulkan-dev libvorbis-dev libmad0-dev

Make file is in Quake/

cd Quake/


Run ./quakespasm (Need files pak0.pak and pak01.pak in Quake/id1/ directory.

Running fine but has some problem when change choose resolution or any option in the menu and click in test or apply options segment fault

With old xcb has problem with xcb_wait_for_special_event 

With latest xcb code reported 

quakespasm" received signal SIGSEGV, Segmentation fault.
get_special_event (c=0x19d4c70, se=0x1da0340) at xcb_in.c:755
755 if (!(se->events = events->next))

Or Backtrace added in attachment related with vulkan_intel.so /usr/lib/libvulkan_intel.so(+0x5d4d8)[0x7fffdfff74d8]

And rarely case backtrace report ..

cmd_buffer_emit_depth_stencil (cmd_buffer=cmd_buffer@entry=0x1e63400)
    at genX_cmd_buffer.c:1102
1102	genX_cmd_buffer.c: the file or directory not found.
Comment 1 Bas Nieuwenhuizen 2016-08-06 19:51:57 UTC
What vkQuake commit are you using? For commit 82a45f684525a588654f1a8b2dc3f9af0ed045d0 and later I don't expect anv (or radv) to work as the game uses input attachments, which are not yet to be working. 

In radv I diagnosed a bug in an earlier vkquake with the resize where vkquake doesn't seem to allocate the new swapchain. This may be resolved with

commit c1390d7bfe967928cc383fbd3dbbc7a0668eb3f4
Author: Axel Gneiting <mail@axelgneiting.de>
Date:   Fri Jul 29 14:38:09 2016 -0500

    - Fix resolution changes

It probably is the same problem for anv.
Comment 2 mrc_munir 2016-08-06 21:17:57 UTC
Ops In the latest changes are change binary to ./vkquake I'm miss that part so no running anymore some Validation errors and Miss Input support.

For Other hand You sugerence the Commit Fix resolution rarely working very Unstable  

ERROR Surface doesn't match video width or height

In the code use

if (vulkan_surface_capabilities.currentExtent.width != vid.width || vulkan_surface_capabilities.currentExtent.height != vid.height)
Sys_Error("Surface doesn't match video width or height");


 Couldn't acquire next image error

In the code Use

if (err != VK_SUCCESS)
		Sys_Error("Couldn't acquire next image");

In the gl_videsdl.c file

Comment 3 Jason Ekstrand 2017-02-18 06:11:09 UTC
Is this still an issue?
Comment 4 mrc_munir 2017-02-18 10:37:23 UTC
Hello Jason is working better than in the pass I Reported but 

but it's not fixed returned when change resolution in Menu options (tested 640x480 , 800x600 and 1024x756 , 1024x768 , 1366x768) 

Working better with 1024x768 or native 1366x768 but no 100% will crash returned Surface doesn't match video width or height

Passes in Windowed mode or Full screen.

Also I can't screenshot crash game

Couldn't acquire next image 

How Debug or enable VK logging?
Comment 5 Marina Chernish 2018-11-14 11:28:03 UTC
I faced similar issues while playing this game. I looked through available resolutions and modes and have following results:

issues with resolution changing:
resolution 1600*1200; fullscreen on -> apply changes- bottom edge of screen is blinking with some random content and game won't start after reentering;
resolution 800*600, fullscreen on -> apply changes, exit game - sometimes changes user settings resolution of the screen when game is exited and also crashes the game after restart;
resolution 680*400; fullscreen on -> apply changes and restart the game - game crashes on start showing its console or just black screen. 

Fullscreen OFF mode is working much more better for mentioned resolutions. 

No game or other dmesg message while it's happening. Also tried to launch it using gdb but also no error messages.

So I suppose it's game bug. Created an issue for it: https://github.com/Novum/vkQuake/issues/153

also screen is blinking while game is starting and while entering Options menu - probably should be investigated additionally - this one also observed on KBL;

Environment: Linux Manjaro; kernel 4.18.12-1-MANJARO; IvyBridge CPU: Intel Core i5-3470; GPU: Intel® HD Graphics 2500; Vulkan 1.1.80
Comment 6 Marina Chernish 2018-11-14 11:31:36 UTC
Here is gdb output:

[test@test-pc Quake]$ gdb vkquake
GNU gdb (GDB) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from vkquake...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/test/Work/vkQuake/Quake/vkquake 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Command line: /home/test/Work/vkQuake/Quake/vkquake
Found SDL version 2.0.8
Detected 4 CPUs.
Quake 1.09 (c) id Software
GLQuake 1.00 (c) id Software
FitzQuake 0.85 (c) John Fitzgibbons
FitzQuake SDL port (c) SleepwalkR, Baker
QuakeSpasm 0.93.0 (c) Ozkan Sezer, Eric Wasylishen & others
vkQuake 1.00.0 (c) Axel Gneiting & others
Playing registered version.
Console initialized.
UDP Initialized
Server using protocol 666 (FitzQuake)
Exe: 11:07:02 Nov 13 2018
256.0 megabyte heap
[New Thread 0x7fffe2dfb700 (LWP 21618)]

Vulkan Initialization
INTEL-MESA: warning: Ivy Bridge Vulkan support is incomplete
[New Thread 0x7fffe14e1700 (LWP 21619)]
Vendor: Intel
Device: Intel(R) Ivybridge Desktop
Using A2B10G10R10 color buffer format
Using X8_D24 depth buffer format
Creating command buffers
Initializing staging
Creating descriptor set layouts
Initializing dynamic vertex buffers
Initializing dynamic index buffers
Initializing dynamic uniform buffers
Initializing samplers
Creating pipeline layouts
Using IMMEDIATE present mode
Creating color buffer
AA disabled
Creating depth buffer
Creating render passes
Creating frame buffers
Creating pipelines

Sound Initialization
[New Thread 0x7fffbf3dd700 (LWP 21621)]
[New Thread 0x7fffbf39c700 (LWP 21622)]
SDL audio spec : 44100 Hz, 1024 samples, 2 channels
SDL audio driver: pulseaudio - Built-in Audio Analog Stereo, 65536 bytes buffer
Audio: 16 bit, stereo, 44100 Hz
CDAudio disabled at compile time

========= Quake Initialized =========

execing quake.rc
execing default.cfg
execing config.cfg
couldn't exec autoexec.cfg
3 demo(s) in loop
Shutting down SDL sound
[Thread 0x7fffbf39c700 (LWP 21622) exited]
[Thread 0x7fffbf3dd700 (LWP 21621) exited]
[Thread 0x7fffe2dfb700 (LWP 21618) exited]
[Thread 0x7fffe14e1700 (LWP 21619) exited]
[Inferior 1 (process 21612) exited normally]
Comment 7 Paul 2019-05-31 08:48:11 UTC
Hi guys
I've tested the issue on the latest master version of the game and of the Mesa - all looks good.
As I understand, crashes caused by changing video options were resolved on the game side via this commit - 
commit aedf275d709980220616581aaba4e0ced101b832
Author: Ricardo Garcia <47594367+rg3igalia@users.noreply.github.com>
Date: Sat May 11 22:32:24 2019 +0200

Fix MSAA Intel crash (#163)

* Use actual image usage flags when querying format properties

When deciding whether to activate FSAA or not and the number of
supported samples, call vkGetPhysicalDeviceImageFormatProperties with
the actual image usage flags that will be used later to create the

This fixes a crash with Intel under mesa master as of the time this
commit is being created because Intel does not support supersampling for

The game isn't crashed at making screenshots.
Flickers in the game are also absent for now.
Feel free to reopen the issue, if you find any related problem.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.