Developing Games on Intel Graphics
If you are gaming on graphics integrated in your Intel Processor, this is the place for you! Find answers to your questions or post your issues with PC games
491 Discussions

ShaderCache::ShaderCacheFileBackedEmptyCacheFileException after driver update

TiredDeveloper
Beginner
1,363 Views

Hello, 

First time poster. I chose this forum because I have seen similar queries here before, even though I am not developing games, and I'm not a "graphics" guy.

We have a Windows application that creates a window and uses it as a target for OpenGL directives. We use the open source GLFW library to help us do that.

We are running machines with the Iris XE device.

The problem is, whenever we update or change the Intel Iris driver (the specific version doesn't appear to matter), our application hits an exception in the GLFW library, on a call to ChoosePixelFormat. Specifically ShaderCache::ShaderCacheFileBackedEmptyCacheFileException. 

Our application traps exceptions with AddVectoredExceptionHandler and thus we stop.

What we have observed is that in the cache directory:

C:\Users\<userid>\AppData\LocalLow\Intel\ShaderCache

a cache file with 0 bytes is generated. This appears to correlate with the exception name. It seems that the cache is no longer valid for the driver.

I have tried deleting the cache files (those that are not locked by other programs) and that doesn't help. 

The only way we can make the software run again, is to comment out the call to AddVectoredExceptionHandler and let the software continue regardless. The driver then seems to sort itself out and the cache is, from then on, valid again, until the next driver update.

Is there some way we can invalidate this cache properly, such that we don't receive the exception? Preferably programmatically, but if not, a manual procedure will do.

Many thanks,
Chris.

0 Kudos
8 Replies
karen_intel
Moderator
1,329 Views

Heey @TiredDeveloper welcome to our Game Developer Support forum

A few questions: 
1. Can you share your whole system specs? You can use SSU for that and attach the .txt file. Also, if you have tested prior driver versions and it works for you, please let us know.

2. Is there a way you can isolate this behavior in a small code? 

We don't need the whole program but we need a way to reproduce it in our own systems.

This is required as if we find out this behavior needs a fix, we need to share that small program to our development team.

Otherwise, if there are coding modifications needed, we will provide information that will help you shape your code better.

Sounds good? We'll be waiting for your reply

Have a great weekend

Karen

0 Kudos
TiredDeveloper
Beginner
1,261 Views

Hi Karen,

Sure. Is there a way to upload the SSU output securely, without publishing it on this forum (having looked through the data it collects, ip addresses and such)?

With regards to to a reproducer, I can try, but it may take me a while.

Thanks.

0 Kudos
karen_intel
Moderator
1,253 Views

Hi @TiredDeveloper yeah we can get in touch through Discord

You can find me by my name (Karen Gtz [ICS]) in the members list so you can send me the reproducer and the SSU

Thanks, talk to you soon

Karen

 

 

0 Kudos
TiredDeveloper
Beginner
1,224 Views

Hi Karen,

I'm afraid Discord is blocked by our corporate IT, so I can't use that mechanism.

However, I can at least share with you a reproducer program here. Please find attached. You can use any Iris XE driver from the last few months.

Steps to reproduce:

1. Unzip and build solution.

2. Either:

2.a. Update the Iris XE driver; or

2.b. Delete all files not currently in use in the C:\Users\<userid>\AppData\LocalLow\Intel\ShaderCache directory.

3. Execute the reproducer in the Visual Studio debugger (it is easier to see the exceptions raised this way).

4. The debugger should stop on line 354 in driver_exception\GLFW\src\wgl_context.c:

      if (!SetPixelFormat(dc, ChoosePixelFormat(dc, &pfd), &pfd))

In the output window you should see:

Exception thrown at 0x7722FA72 in driver_exception.exe: Microsoft C++ exception: ShaderCache::ShaderCacheFileBackedEmptyCacheFileException at memory location 0x0078E49C.

Thanks.

0 Kudos
karen_intel
Moderator
1,200 Views

@TiredDeveloper appreciate the fast response.
I think I have been able to see the exception (pointing out to a different memory location) and create the 0 bytes ShaderCache files.
Repro was done on a newer system (ARC A750 + driver v.5382) so to get a solution for you (find out if there's some way we can invalidate this cache properly), I'll have to ask the development team, which means I will create an internal report for it. 

A couple questions I need for my report
Can you provide an example of a similar application we can find in the wild? Just to provide the whole context
How many users (on average) are or can be impacted?
My system even froze leaving the system in idle after running the local debugger, has this happened to you too?

Thanks. I'll wait for your response

Karen

0 Kudos
TiredDeveloper
Beginner
1,120 Views

Hi Karen,

That's good news.

Re: your questions:

- We tried numerous OpenGL example programs and they all seemed to work fine. So we don't have any similar applications that we can share with you. My suspicion is that none of those example programs attempted to attach an exception handler with AddVectoredExceptionHandler.

- around 13 or 14 in our development department, when a driver update is scheduled by our IT department.

- I didn't see anything freeze. I can stop the debugger with no problems, once the exception has occurred. 

I can't upload the SSU information, but I've added some summary information below:

Operating System: Microsoft Windows 10 Enterprise(10.0.19044 Build 19044)
Physical Memory (Installed): 32 GB
Processor: 12th Gen Intel(R) Core(TM) i7-12800H
System Type: x64-based PC
Display Adapter(s):
DameWare Development Mirror Driver 64-bit 1.1.0.0
Intel(R) Iris(R) Xe Graphics 31.0.101.4887
NVIDIA RTX A2000 8GB Laptop GPU 31.0.15.3770
System Manufacturer: HP
System Model: 89C3


 

0 Kudos
TiredDeveloper
Beginner
375 Views

Hi Karen,

Is there any further feedback on this issue so far?

Many thanks.

0 Kudos
karen_intel
Moderator
310 Views

Hii @TiredDeveloper ty for your patience

Our debug team is still working on this report, next week I expect to get more news for you

If I need anything else I'll let you know

Karen

0 Kudos
Reply