XNA Creators Club Online
Page 1 of 1 (7 items)
Sort Posts: Previous Next

Game appears to freeze on XBox

Last post 09-15-2008 10:57 AM by CaletBAK. 6 replies.
  • 05-05-2008 4:22 AM

    Game appears to freeze on XBox

    Hello i hope someone can shed some light on my weird problem. It seems that my game is freezing randomly when i deploy on the XBox, although weirdly - no exception is thrown or breakpoint reached. In fact the update logic still runs (i can still exit the game with the back button), it seems like it's just the display that has frozen.

    Is there any obvious cause for something like this to happen?


  • 05-05-2008 9:12 AM In reply to

    Re: Game appears to freeze on XBox

    When this happens, go into Visual Studio and set a breakpoint on Game.Draw() (while the game is still running) and trace through your drawing code.  Make sure the execution path is as expected.
    Microsoft DirectX/XNA MVP
  • 09-08-2008 8:57 PM In reply to

    Re: Game appears to freeze on XBox

     

    Hi Matt.

     I have the same problem and I don't know what it happens. It seems the logic runs ok but render still freeze. Have you ressolve the problem?.

    I've made what ShawMishrak says but I don't see anything's wrong.

    I have several parts of a model for rendering and the problem seems to be one of them. When I combine the render of this part with another the game freezes, but if I draw only this part the game runs all right. This part has 13820 triangles and 33280 vertexes, and is subdivided in 9 subparts of a maximum of 1700 triangles per part. Anyone knows if there are any limitation of vertexes or indexes using the DrawUserIndexedPrimitives method or general limitation in rendering?

    The same code in my Pc runs fine...

    Thanks...

     

  • 09-12-2008 7:31 PM In reply to

    Re: Game appears to freeze on XBox

    I'm getting this too every once in a while when using a lot of DrawUserPrimitives calls in consecutive frames. When I put breakpoints in the code, it seems to run fine on all threads, but the screen on the 360 is stuck on one frame and never updates.. No idea why really, maybe all those DrawUserPrimitive calls overflow the command buffer of the 360?
  • 09-12-2008 8:11 PM In reply to

    Re: Game appears to freeze on XBox

    I never got to the bottom of exactly what causes this. It does seem to have something to do with DrawUserPrimitive calls. I found that by sending my vertices in smaller chunks (from 9000 at a time to 7000), the problem went away... I thought it might have something to do with the fact that my vertex struct is quite large  at 72 bytes. Still a mystery :S
  • 09-12-2008 8:24 PM In reply to

    Re: Game appears to freeze on XBox

    This seems to happen for me as well with many DrawPrimitive calls.  It seems to happen even quicker when predicated tiling is being used, which I make sense since the runtime is just doubling some of the draw calls behind the scenes.  However I've been strictly limiting my DP calls anyway, since they're so damn expensive on the 360 to begin with.  Anything above 40 causes performance to tank.
  • 09-15-2008 10:57 AM In reply to

    Re: Game appears to freeze on XBox

     

    Hi all again.

    Well, I resolved the problem a few days ago. I don't know what was the exact reason for the improper running of the game but I can describe all I did since my anterior post.

    I made changes in the shader. Now is simplier and each pixel and vertex shader only receives the data information that they need. Otherwise, my vertex format is 100 bytes long and maybe is a lot of data to tranfer to the VRAM for each part of the model in each frame. After this, I made a vertex buffer and index buffers for each part of the model to have the vertex information always in VRAM.

    Later, I had a problem with textures because for each part of the model, the textures were cleared and updated again to the VRAM. I resolved this problem and the game went from 22fps to 55fps. Maybe, an overload of the VRAM makes the game freezes.

    But after this, I had another problem. The game was decreasing its frame rate periodically. First runs at 55fps, five seconds later at 32fps and later returns to 55fps. I searched for info and I realized that the garbage collector was the problem. My code had many dynamic memory allocations in render part, and needed from many executions of the garbage collector. Maybe, too many memory dynamic allocations overloads the GC and it can't update the memory for new render updates.

    After this problem was resolved, the scene renders always at 60fps in PC and XBOX.

    Well, I hope that this can help you in that problem.

    Greetings!!.

     

Page 1 of 1 (7 items) Previous Next