Jump to content
  • Advertisement
Sign in to follow this  
juergen1969

SlimDX LockRectangle crashes sometimes

This topic is 3624 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

Hi all, I have a texture which I want to fill with a calculated bitmap. To fill it is normally no problem. But I have to change the size of the texture sometimes very often. First my code: texture = new Texture(device, texWidth, texHeight, 0, Usage.Dynamic, Format.A8R8G8B8, Pool.Default); SurfaceDescription descr = texture.GetLevelDescription(0); DataRectangle dataRect = texture.LockRectangle(0, LockFlags.None); if (dataRect != null) { //Generate From Bitmap texture.UnlockRectangle(0); } Everything works fine, but after 3 or 4 size-changes of the texture I get an "Internal Error" and the PC reboots after a few seconds. It fails at the LockRectangle command, that's the only thing I can check. After that I can do nothing else than wait. I use SlimDX but I think it's not a problem of that library. Any idea? Best regards, Jürgen

Share this post


Link to post
Share on other sites
Advertisement
Anything that goes so spectacularly wrong that it crashes the PC (It'll be doing a blue screen of death but immediately rebooting probably) is almost certainly a driver bug. No user-mode code should be capable of doing anything like that.

Make sure you have the latest graphics drivers for your card.

Why you say "after 3 or 4 size-changes of the texture", do you mean after releasing and re-creating the texture with a different size?

Share this post


Link to post
Share on other sites

I release the texture with

texture.Dispose();
texture = null;

I hope this is the correct way.

After that I recreate it with the new size.

I will check it with a new driver ...

Share this post


Link to post
Share on other sites
@Steve
I changed to the actual driver and use the newest SlimDx. The one in my project was not the actual one.
I checked it several times and it seems that it's working.

@GoodFun
Yes, I have some Threads.
The first one to measure the data from a CCD-camera and another one for displaying the data

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!