Source Code Issues

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Source Code Issues

      Just wondering if anyone else has these 2 issues and if they have corrected them, I'm using the current version of the source code on google svn.

      Editor:

      Source Code

      1. Error in ComponentName LightRenderComponent
      2. System.NullRefrenceException: Object reference not set to an instance of an object.
      3. at EditorApp.EditorForm.ActorComponentEditor.AddVec3(XmlNodeactorvalues, String xpath, Int32 lineNum) in
      4. H:\gamecode4\Source\GCC4Editor\EditorApp\ActorComponentEditor.cs:line 416
      5. at EditorApp.EditorForm.ActorComponentValues, Int32 lineNum) in
      6. H:\gamecode4\Source\GCC4Editor\EditorApp\ActorComponentEditor.cs: line 178

      Game:
      The Direct3D device has a non-zero reference count, meaning some objects were not released. When trying to switch to full screen or toggle the REF.

      I do have a dual monitor setup, my graphics card supports DX11.
      You may call me char 71 97 100 100 97 109.
    • Bleh I hate those non-zero ref count errors. They are such a pain to track down. I'll have to see if the most recent code can repro that problem here, perhaps a bug was created when another was fixed!
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • If anyone figures out what this is, feel free to submit the fix to us. We'll review it and, assuming it's good, check it in.

      -Rez
    • Yeah that would be nice - right now I'm up to my eyeballs in work stuff, so I won't be able to dig into that lovely DirectX exit chain for a bit...
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Does Direct3D not have a cool debugger tool? I use gDEBugger with OpenGL which lets you analyze the entire openGL context, I imagine microsoft would have there own built in one with DirectX.

      It may help debugging these kinds of issues.

      Just took a quick look and apparently PIX is the Direct 3D Equivelent, not sure if it would do the same thing as gDEBugger
      PC - Custom Built
      CPU: 3rd Gen. Intel i7 3770 3.4Ghz
      GPU: ATI Radeon HD 7959 3GB
      RAM: 16GB

      Laptop - Alienware M17x
      CPU: 3rd Gen. Intel i7 - Ivy Bridge
      GPU: NVIDIA GeForce GTX 660M - 2GB GDDR5
      RAM: 8GB Dual Channel DDR3 @ 1600mhz
    • Running the game under PIX should do the trick, that should tell you what object isn't being released.

      Also, you can use the D3DXBreakOnAllocId setting described here in the debugger, and when DirectX allocates the object that is leaking it will trigger a breakpoint.

      At least that will tell you what is leaking, then you have to figure out WHY it is leaking. Most likely some oddity with the full screen, multiple monitor setup that GCC4 hasn't really been tested against that rigorously.
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • I looked at this a little while ago and found some things out, but must have been distracted by something shiny as I never got around to actually fixing it!

      I believe that this may be due to the fact that the device destruction (release, destroy, lost) callbacks from DXUT, particularly for directx11, don't call into the human view to traverse the scene and call VOnDeviceLost for all scene nodes.

      Secondly, if I remember correctly, some scene nodes don't have overridden VOnDeviceLost functions and therefore don't release their resources.

      Thirdly (and I think finally!), I don't remember seeing any way to restore/tear down directx resources in the resource cache other than at destruction time. So as far as I can see, any resource that contains a directx object (such as the sdk mesh extra data for dx11) will be left dangling too.

      Most of this is from memory as I dont have the code in front of me at the moment, but this might give someone some pointers at least! I may take another look at it when I have some free time.