Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


DX textureattachment memleak&freeze bug

This topic is 5869 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. Recently I got this strange bug; well at first it acted some differently than now. It''s a case with directX8. Well I have a soup of polygons, they have many different types of shades & textures attached in different passes. In this particulary test mesh I''m working with now there is 107 different textures(lightmaps, normalmaps, diffusemaps..). The faces are sorted to what type of shading and then to wich textures, to reduce the number of render&texturestagestates + texture assigning. However the strangest thing happens; without me even changing the drawloop all off sudden the app started to totally freeze and it instantly leaked about 260mb of ram(!!!). In the beginning I didn''t figure where it happened, but I found that it happened at the part where I assign my textures. If I remove the code where they are attached neither the leak of mem nor the freeze does occur... from the sdk: Remarks This method increments the reference count of the texture surface being assigned and decrements the reference count of the previously selected texture if there is one. When the texture is no longer needed, set the texture at the appropriate stage to NULL. Failure to do this results in a memory leak This maybe my problem, allthough I don''t quite understand what there is to do here. Is the meaning that you must set the textures at the passes to NULL when not used? Because this I''ve tried and it doesn''t at all help. Besides this I just simply attach my textures to the pass they are recuired to be with d3ddevice->SetTexture(); oh! In the beginning the bug occured as a leak of framerate, and not a totally freeze of it. If someone could help me with this pi** anoying problem, I would be forever greatfull to that person =D regards, Stian Farstad.

Share this post

Link to post
Share on other sites
I came to take the conclusion that this might have been
some driver related bug. I''ve only got to tested this at
my GF4TI4400, but attempted it with several different drivers.

Yet the same bug occurs when doing all these texture attachment

If some of you have had simular experiences before, and know
howto resolve this problem, it would be real great if you
could tell me.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!