Geeks With Blogs

News

Series

Add to Technorati Favorites


An Archived Managed World This blog has moved to http://www.managed-world.com/blog

[Crosspost from Managed World]

When an exception occurs while running the sample framework, even if it is handled in a global exception try-catch block, the sample framework will throw an unhandled exception on Dispose. To replicate this issue, simply open up the empty project template and change line 238 in EmptyProject.cs from:

effect.SetValue("appTime", (float)appTime);

to (in order to force an exception):

effect.SetValue("appTm", (float)appTime);

Although it perhaps is not the best fix, the quick and dirty fix for this is to change lines 3948-3957 in the Dispose method in Common\dxmut.cs from:

if (Window != null)
{
// If we have a window, use BeginInvoke to start shutdown
Window.BeginInvoke(new DisposeDelegate(this.Shutdown));
}
else
{
// Otherwise, call it directly
Shutdown();
}

to just:

Shutdown();

Happy Programming!

Posted on Monday, July 4, 2005 10:37 PM Game Development | Back to top


Comments on this post: BUG: Sample Framework, Unhandled Exception on Dispose

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Jason Olson | Powered by: GeeksWithBlogs.net