XNA causes horrific crash

Started by
6 comments, last by Sambori 15 years, 1 month ago
Why does VS 9 crashes unexpectedly when closing my XNA application? It says that VS is unstable, and then I can do nothing but use the process manager to force terminating VS and restarting it again. Guys I'm suspecting there are issues with this .NET platform or even XNA.
Advertisement
Don't blame the tools, they've been tested by countless developpers which didn't encounter your problem. There might be something wrong with your installation of VS, XNA or the .NET Framework, bu that seems unlikely.Maybe the problem is with your application. We'll need to have more details to be able to help you but crashes in managed environments are often caused by the use of unsafe code or P/Invoke. Are you using any of those?
There are some wrapping of other native libraries and few PInvoke for Win32 API, but that's not heavily involved and never caused problem before until we used the XNA stuff. The problem occurs when I create two XNA windows and use the content builder to upload 3D models. One of them is visible at a time.
The problem occurs when existing the program, and it's unpredictable.

I'm not blaming the tools, or any, and it could be something wrong I'm doing.

But when VS crashes this is a good indication of huge memory leak or running out of memory...
I can only make a few guesses here, hopefully someone will know better how to solve your problem.

First of all, the fact that you're having problems upon termination of your program in an unpredictable manner lets me think that the problem might be with finalizers, although even if I'm right, I don't know how that can help you.

Then, you talked about having two XNA windows. If they both belong to the same process, that might be the problem because, as far as I know, XNA isn't built to support multiple windows (I'm actually surprised you managed to do that) and that could cause problems with the content manager and other parts of resource sharing. Again, I'm not well versed enough in XNA to be 100% positive about this but it might be worth looking into.

Good luck!
Well that helps alot...so having two XNA windows one visible at a time both are different instances, no sharing of resource, but being in the same process causes dead ends!!! Gotcha!
How are you creating these windows and loading the content? You're not using the Game class, are you?
Nope not the game framework because this is a custom application. I use the content builder manually, not the VS's.
Okay I think a driver update solved the problem.

This topic is closed to new replies.

Advertisement