Intel® Graphics Performance Analyzers (Intel® GPA)
Improve your game's performance by quickly identifying problem areas.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
440 Discussions

Access violation when creating VkImageView for the swapchain

MutateDan
Beginner
1,937 Views

Hey, I get an access violation crash in my engine with the latest GPA.

It crashes while creating the VkImageView instances for the swapchain.
It worked in previous versions of Graphics Monitor and iGPU driver.

This crash only happens when GPA is running. The engine works when GPA is fully closed.


I've attached the output of VK_LAYER_LUNARG_api_dump in the api_dump.log file.

Stacktrace for crash:

Spoiler

Exception thrown at 0x0000000000000000 in Game.exe: 0xC0000005: Access violation executing location 0x0000000000000000.

RAX = 0000000000000000 RBX = 000001FF6368F010 RCX = 000001FF45DBB0F8 RDX = 000000AE8FEFEBD0
RSI = 000000AE8FEFEBD0 RDI = 0000000000000000 R8  = 0000000000000000 R9  = 000001FF6368F010
R10 = 00007FFFE0F8BA50 R11 = 000001FF44EC4000 R12 = 000001FF636F2B50 R13 = FFFFFFFFFFFFFFFF
R14 = 0000000000000000 R15 = 000001FF6368F010 RIP = 0000000000000000 RSP = 000000AE8FEFE698
RBP = 000001FF45DBB0F8 EFL = 00010200

0000000000000000() Unknown
igpa-shim-x64.dll!00007fffe0b5fc4e() Unknown
MetricsLayer-x64.dll!00007fffe0616ef1() Unknown
capture-x64.dll!00007fffdf68e666() Unknown
capture-x64.dll!00007fffdf226be0() Unknown
igpa-shim-x64.dll!00007fffe0b46105() Unknown
> Game.dll!SwapChainCreate() C++


Probably not related to the crash. But there is also a validation error when vkCreateDevice is called:

Spoiler

VALIDATION-ERROR [VUID-vkCmdResetQueryPool-firstQuery-00797] : 0xa7c5450000000023 :
Validation Error: [ VUID-vkCmdResetQueryPool-firstQuery-00797 ]
Object 0: handle = 0xa7c5450000000023, type = VK_OBJECT_TYPE_QUERY_POOL; | MessageID = 0xd66ad571 | VkCmdResetQueryPool():
In Query VkQueryPool 0xa7c5450000000023[] the sum of firstQuery (10) + queryCount (2) is greater than the queryPool size (11).
The Vulkan spec states: The sum of firstQuery and queryCount must be less than or equal to the number of queries in queryPool
(https://vulkan.lunarg.com/doc/view/1.2.182.0/windows/1.2-extensions/vkspec.html#VUID-vkCmdResetQuery...)

Game.dll!vkdebugMessenger() C++
VkLayer_khronos_validation.dll!00007fffdcda26b8() Unknown
VkLayer_khronos_validation.dll!00007fffdcd5308a() Unknown
VkLayer_khronos_validation.dll!00007fffdcd43c9f() Unknown
VkLayer_khronos_validation.dll!00007fffdcd93599() Unknown
VkLayer_khronos_validation.dll!00007fffdcd610d2() Unknown
VkLayer_khronos_validation.dll!00007fffdcb2d94b() Unknown
VkLayer_api_dump.dll!00007fffe1a25c03() Unknown
igpa-shim-x64.dll!00007fffe0b5e61e() Unknown
MetricsLayer-x64.dll!00007fffe06433ff() Unknown
MetricsLayer-x64.dll!00007fffe0645dbe() Unknown
MetricsLayer-x64.dll!00007fffe0614ead() Unknown
MetricsLayer-x64.dll!00007fffe0616e53() Unknown
capture-x64.dll!00007fffdf68e5e6() Unknown
capture-x64.dll!00007fffdf2262e2() Unknown
igpa-shim-x64.dll!00007fffe0b3e67e() Unknown
> Game.dll!createLogicalDevice() C++

 

 

System info:

 

Spoiler

Operating System:
    Name: Windows 10 Version 2009 (OS Build 19043.1110)
    Locale: en-SE
    Windows Developer Mode is enabled
    Secure Boot/Trusted Boot is disabled

CPU Information:
    Architecture: x64
    Cores count: 12

System BIOS:
    Version: Intel Corp. FNCML357.0052.2021.0409.1144
    Date: 04/09/2021

GPU #1 Information:
    Name: Microsoft Remote Display Adapter
    Driver Version: 10.0.19041.662
    Driver Date: 6-21-2006

GPU #2 Information:
    Name: Intel(R) UHD Graphics
    Vendor id: 0x8086
    Product id: 0x9BCA
    Stepping: 4
    Driver Version: 27.20.100.9466
    Driver Date: 3-30-2021

Machine:
    Name: Win10-iGPU
    Memory: 32572 MB
    Screen: 1920x1080, 32 bit

Graphics Performance Analyzers:
    Version: 21.2.1624350604
    Commit hash: c175604e
    Installation folder: C:\Program Files\IntelSWTools\GPA\

 

Labels (3)
0 Kudos
15 Replies
Pamela_H_Intel
Moderator
1,809 Views

Hello MutateDan,

Interesting stuff.

First, I see that you have Microsoft Remote Display Adapter listed as your GPU#1 in GPA. This could mean you don't have the driver loaded for your iGPU. Based on the driver version showing for GPU#2, 27.20.100.9466, I am guessing you are running UHD Graphics 750?

So, do you have this driver installed? If not, is there a reason?

Second, the validation error shows that you are trying to allocate memory outside of your memory pool, which could indeed cause a crash if you attempt later to read or write from that memory. Did you change something in your engine that may cause an out of bounds issue?

Pamela 

MutateDan
Beginner
1,794 Views

Hey,
I'm running UHD Graphics 620 (as the processor is Intel Core i7-10710U, inside of Intel NUC BXNUC10I7FNK2).
The 27.20.100.9466 driver is installed as it was the recommended one by GPA when I updated GPA.
I just tried the latest driver (30.0.100.9864) and the problem is still there.

The Microsoft Remote Display Adapter is listed as I use "Remote Desktop" to see the NUCs display output from my development machine.
Which works when GPA isn't running.

The validation error is not part of my code, it is from somewhere inside one of the GPA dlls, as it happens when I call `vkCreateDevice`.

Sorry if any of this was confusion from the original post.

I would have reported this as a support ticket on "Online Service Center" as this problem (the vkCreateImageView crash) is a regression, but GPA is not listed there.


- Dan

Pamela_H_Intel
Moderator
1,790 Views

Dan,

Thanks for clarifying. I will look into this and update you.

Pamela

Pamela_H_Intel
Moderator
1,760 Views

Dan,

We tested as closely as possible to your config using GPA Framework and could not replicate.

  • What is your workload?
  • Were you using GPA Framework or Graphics Frame Analyzer?

Pamela

MutateDan
Beginner
1,748 Views

Hi,

My workflow is:
- Connect to the NUC via Remote Desktop.
- Start Visual Studio 2019 Remote debugging
- Start Graphics Monitor 2021 R2, and enable auto-detect launched programs.
- Change the capture mode to "Stream [VK]".

- Then on my dev machine, I start remote debugging in Visual Studio 2019

In visual studio, I continue past the "VUID-vkCmdResetQueryPool-firstQuery-00797" vulkan validation error that happens during `vkCreateDevice`.
And then it will crash while running `vkCreateImageView` for the swapchain images retrieved from vkGetSwapchainImagesKHR.

Exception thrown at 0x0000000000000000 in Game.exe: 0xC0000005: Access violation executing location 0x0000000000000000.

0000000000000000() Unknown
igpa-shim-x64.dll!00007ffec062fc4e() Unknown
MetricsLayer-x64.dll!00007ffec0106ef1() Unknown
capture-x64.dll!00007ffebd91e666() Unknown
capture-x64.dll!00007ffebd4b6be0() Unknown
igpa-shim-x64.dll!00007ffec0616105() Unknown
> MyEngine.dll!VulkanSwapChain::create() C++

 
Current system specs on the nuc:
    Driver Version: 30.0.100.9864
    Driver Date: 8-20-2021

Graphics Performance Analyzers:
    Version: 21.2.1624350604
    Commit hash: c175604e


Thanks for the quick response
- Dan

Pamela_H_Intel
Moderator
1,740 Views

Dan,

Thanks for the clarity. This may help us trace the issue.

What is your workload? . . . the application you are profiling? It will help us track the issue if we can test the same workload. If it is proprietary, you can send it to me via private message - envelope icon, top-right of this page.

Pamela

MutateDan
Beginner
1,724 Views

Hi,

Yes the program is proprietary, so I sent it to you via a private message.

Thanks,
Dan

Pamela_H_Intel
Moderator
1,721 Views

Got it. Thanks. I passed it along to my team member who started looking into the issue yesterday.

Pamela_H_Intel
Moderator
1,625 Views

MutateDan,

This issue is in our pipeline. We haven't seen it with any other workload. I'm wondering if you experience the same issue with GPA 21.3 (released 23.Sept.).

Pamela

MutateDan
Beginner
1,607 Views

Hi Pamela,

I tested GPA 21.3 and it sadly did not fix my issue.

I've tested both driver version 27.20.100.9466(Driver Date: 3-30-2021, GPA recommended) and 30.0.100.9864(Driver Date: 8-20-2021, latest driver).

0xC0000005: Access violation executing location 0x0000000000000000.
0000000000000000() Unknown
igpa-shim-x64.dll!00007ff84846168e() Unknown
MetricsLayer-x64.dll!00007ff8480671d1() Unknown
capture-x64.dll!00007ff83ecb7dd6() Unknown
capture-x64.dll!00007ff83e841457() Unknown
igpa-shim-x64.dll!00007ff8484465d5() Unknown
> Client.dll!createSwapchainImageView()

 
- Dan

Pamela_H_Intel
Moderator
1,597 Views

Well darn. I will relay this info to the dev.

Pamela_H_Intel
Moderator
1,084 Views

MutateDan,

 

I am sad to say that the fix for this got pushed out from 21.4 to 22.1.

I tried running on a pre-release 22.1 (just hoping) - no luck. The capture window crashes every time. The best I could do is run your app while I had Graphics Monitor open. I had Autodetect Launched Applications enabled, but your app is not detected.

MutateDan-script.PNG

MutateDan
Beginner
1,056 Views
MutateDan
Beginner
307 Views

Hi Pamela,
I've not heard anything here in a while. But I saw that the 22.1 update was released.
And it still doesn't really work. If I remove the vulkan-1.dll that our App provides, GPA can launch the game and take both a stream and frame capture. But neither or them can be opened. GPA just complains with "An internal error has occurred, Please contact Intel customer Support.".


Operating System:
    Name: Windows 10 Version 2009 (OS Build 19044.1706)
    Locale: en-SE
    Windows Developer Mode is enabled
    Secure Boot/Trusted Boot is disabled

CPU Information:
    Name: Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz
    Architecture: x64
    Cores count: 12

System BIOS:
    Version: Intel Corp. FNCML357.0056.2022.0223.1614
    Date: 02/23/2022

GPU Information:
    Name: Intel(R) UHD Graphics
    Vendor id: 0x8086
    Product id: 0x9BCA
    Stepping: 4
    Driver Version: 30.0.101.1660
    Driver Date: 3-18-2022

Machine:
    Name: Win10-iGPU
    Memory: 32572 MB
    Screen: 1920x1080, 32 bit

Graphics Performance Analyzers:
    Version: 22.1.1647438438
    Commit hash: 252d8e7a
    Installation folder: C:\Program Files\IntelSWTools\GPA\

 

Pamela_H_Intel
Moderator
90 Views

Hello Dan,

Until we get this resolved, what do you think of analyzing non-visual data?

We have a cli, GPA Framework, that supports Windows. It's basically the back end of Graphics Frame Analyzer. In our 22.2 release on 30.June we added a verbose logging feature which can be great for seeing what is happening during playback (or in your case, attempted playback).

If you are interested,

  • download GPA Framework from the same download page as GPA - just scroll down till you see it
  • try these basic commands (use "./gpa-injector..." if you are in Git Bash):
    • capture (you can see these in action in our 2021.3 release video at 5:14-6:53)

      gpa-injector C:\Program Files\IntelSWTools\GPA\gpasample.exe --layer capture

      gpa-injector --layer capture “C:\Program Files\IntelSWTools\GPA\gpasample.exe”

      +HUD

      gpa-injector -L hud-layer -L capture:deferred=true “C:\Program Files\IntelSWTools\GPA\gpasample.exe”

      +defer

      gpa-injector -L hud-layer -L capture:deferred=true “C:\Program Files\IntelSWTools\GPA\gpasample.exe”

      +frameCount

      gpa-injector -L hud-layer -L capture:deferred=true,fixed-frame-count=10 “C:\Program Files\IntelSWTools\GPA\gpasample.exe”

      +destination dir

      gpa-injector -L hud-layer --layer capture:directory=“C:\Users\pamelaha\GPA” “C:\Program Files\IntelSWTools\GPA\gpasample.exe”

  • then, for the logging and gpa-metrics-collector, take a look at our latest release video which you can find on our main landing page or on YouTube.
  • Docs for GPA FW are on github: https://intel.github.io/gpasdk-doc/

 

Reply