Intel® Graphics Performance Analyzers (Intel® GPA)
Improve your game's performance by quickly specifying problem areas
488 Discussions

GPA 2.1: get access violation in D3DXCompileShaderFromResource

gabest
Beginner
1,515 Views
Arethere any known issues loading shaders from resources?

When I call D3DXCompileShaderFromResource from my code shimd3d.dll tries to dereference the resource id and of course crashes with an access violation.

shimd3d.dll!10049180 (loaded at 10000000-10156000)
mov cl,byte ptr [eax]
eax = 10000 (= the resource id)

I've got nvidia, but this tool looked interestingand thought it might still show something :P

Oh and it would be nice to have a separate download with only the main application, I was surprised to see only 10 MB was neededof the 300+ MB package, developers usually have .net and the other dependencies installed already.
0 Kudos
12 Replies
Neal_Pierman
Valued Contributor I
1,515 Views

I think there are two issues that you are describing here:

1) D3DXCompileShaderFromResource crashes in your application: From what you describe, this is not something that I can help you with here. Please repost to the forum User Community for Visual Computing.

2) download size: yes, the package is 300MB, due to having to include other items such as .net; we are looking to see if these other dependencies can be removed in a later release of the program.

Regards,

Neal


0 Kudos
gabest
Beginner
1,515 Views

1. D3DXCompileShaderFromResource does not crash normally, only whenGPA is attached.
2. the call does not go through any nvidia driver dll until it reaches the crashing point in shimd3d.dll.
3. shimd3d.dll is part of GPA.

(compiling is basically turning hlsl into optimized shader assembly code, not hardware specific at all)

0 Kudos
Neal_Pierman
Valued Contributor I
1,515 Views
Hello,

Can you provide some more information on the issue you are encountering?

First of all, are you running GPA 2.0 or the 2.1 release? If 2.0, download 2.1 and let us know if this changes anything.

Next, I'm assuming that you are running GPA Frame Analyzer. Does the problem occur immediately (that is, before the application window appears), or does it only occur when performing a specific operation in GPA and/or your application?

Also, please run the gpa_system_inspector.exe utility (from the GPA install area), and post the output here; also, is GPA running with two separate systems, or is GPA and the application running on the same system?

thanks!

Neal
0 Kudos
gabest
Beginner
1,515 Views
Here is a very simple repro.

If you run it, it will display a message box first. That time you can attach the debugger.

Continuing while GPA is beingattached will result in the crash at this location:

shimd3d.dll!100490c0()
[Frames below may be incorrect and/or missing, no symbols loaded for shimd3d.dll]
shimd3d.dll!10049fdf()
shimd3d.dll!100abaf3()
igpatest.exe!wmain(int argc=1, wchar_t * * argv=0x00193248) Line 19 + 0x3d bytes C++
igpatest.exe!__tmainCRTStartup() Line 583 + 0x19 bytes C
igpatest.exe!wmainCRTStartup() Line 403 C

---

Environment:
(Intel GPA System Inspector)
Windows 7 DEP enabled
Num Processors: 2
Memory: 2046MB
Driver 0:
Device: NVIDIA GeForce 8600 GT
Provider: NVIDIA
Date: 7-14-2009
Version: 8.15.11.9038
VendorId: 10de
ProductId: 402
Stepping: a1
No support for GPA Instrumentation
GPA install directory: C:Program Files (x86)IntelGPA v2.1
GPA version: 2.1.74801 (2.1.1.9265)
0 Kudos
Neal_Pierman
Valued Contributor I
1,515 Views
Hello,

Thanks for the quick reply!

First of all, I see that you're using Microsoft Windows 7, which is not currently supported by version 2.1 of GPA. Have you tried this on Vista or XP? It's possible that the problem occurs on the supported versions as well, but if you have some info on this already this would help save me some time isolating the issue.

Also, were you running the System Analyzer application on the same system as your graphics application? If you were running on two systems, can you provide the info from the system inspector for the second system as well?

Based upon your replies to the above questions, let's figure out what the next steps should be here.

Regards,

Neal
0 Kudos
gabest
Beginner
1,515 Views
Yea, I was running both on the same machine.

But I don't think the OS or the hardware is the problem, it looks like the resource id gets interpreted as a string by the function thatchains the compiler of d3dx.

If you have the source or just the pdb for shimd3d.dll and run the repro in the debugger then you should see the problem clearly.

This was the machine closest to the recommended specs which I found, and the same thing happens.

Environment:
(Intel GPA System Inspector)
Windows XP Professional, 32-bit DEP disabled
Num Processors: 2
Memory: 1014MB
Driver 0:
Device: Mobile Intel 945 Express Chipset Family
Provider: Intel Corporation
Date: 2-15-2008
Version: 6.14.10.4926
VendorId: 8086
ProductId: 27a6
Stepping: 3
No support for GPA Instrumentation
Driver 1:
Device: Mobile Intel 945 Express Chipset Family
Provider: Intel Corporation
Date: 2-15-2008
Version: 6.14.10.4926
VendorId: 8086
ProductId: 27ae
Stepping: 3
No support for GPA Instrumentation
GPA install directory: C:Program FilesIntelGPA v2.1
GPA version: 2.1.74801 (2.1.1.9265)

0 Kudos
Neal_Pierman
Valued Contributor I
1,515 Views
Thanks,

Your response back was perfect! The info you provided should be sufficient for the development team to start looking at this.

Regards,

Neal
0 Kudos
Neal_Pierman
Valued Contributor I
1,515 Views
Hello,

Your initial hunch was correct, as the wrong datatype was being used for this routine. The development team has a fix, and they are doing some "smoke testing" of the new version.

I should have an ETA for getting this new version to you shortly.

Regards,

Neal
0 Kudos
Neal_Pierman
Valued Contributor I
1,515 Views
I have a version available that's passed SQE, and I can upload this patch to ftp.intel.com for your use. If this is ok, please let me know and I'll send you the pathname and password to decrypt it (as files only stay on that site for 24 hours before automatically being removed).

Regards,

Neal

PS--> As it's unlikely that others will encounter your specific issue, we've decided to release a simple patch and not to update the entire product at this time. However, this fix will be included in the next release of the toolset.
0 Kudos
gabest
Beginner
1,515 Views
I'd be glad to test the patched version, please send access information in a private message or email.

There are three ways to compile a shader, from file, string or resource. It's true that storing a shader in a resource is the least common way of all, but you never know what people willprefer.
0 Kudos
Neal_Pierman
Valued Contributor I
1,515 Views
Hello,

I've sent you the patch via email... did this fix the problem?

Regards,

Neal
0 Kudos
Neal_Pierman
Valued Contributor I
1,515 Views
Hello,

The fix noted here has been incorporated into GPA 2.2; please let us know if the problem re-occurs.

Regards,

Neal
0 Kudos
Reply