Sign in to follow this  

Heap Error if I declare an shader resource array

This topic is 3594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have a strange error in my application: I created a terrain class, which loads a .fx shader file in the constructor and has a render method which sets a texture, a matrix and then renders the technique in the .fx file (so nothing special and everything works). Now I wanted to add 5 textures to my terrain class, so I added this line in my class declaration:
class Terrain {
public:
   ID3D10EffectShaderResourceVariable* textureLayersSC[5]; // I only added THIS line
...
};
I dont do anything with textureLayerSC in the Terrain methods! If I start the application now everything works again but if I close the application I get an error popup window:
Quote:
Windows has triggered a breakpoint in SkyRendering.exe. This may be due to a corruption of the heap, and indicates a bug in SkyRendering.exe or any of the DLLs it has loaded.
I have no idea what causes this since I dont allocte anything new on the heap! I thought about that I miss to clean up something in the destructor but the array gets destroyed automatically, so there shouldnt be anything I have to do. Anyone has an idea what causes this error?

Share this post


Link to post
Share on other sites

This topic is 3594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this