andyhebear1
22-03-2012 09:59:25
i run my application about 3 hours and then i reload some scene objects,my applicatin is beto crash
my application loop in main thread like:
somebody has idea? How to avoid this problem?AccessViolationException
my application loop in main thread like:
private static void Application_Idle(object sender, EventArgs e) {
// ...
while (AppStillIdle) {
//...
OgreSystem.Singleton.RenderRoot.RenderOneFrame();
}
}
2012-03-22 17:24:21.546+08:00 System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory has been corrupted
at Ogre.Root.renderOneFrame(Root* )
at Mogre.Root.RenderOneFrame()
at IRobotQHostEdit.IRQ_App.Application_Idle(Object sender, EventArgs e)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FDoIdle(Int32 grfidlef)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at IRobotQHostEdit.IRQ_App.InitAppSystem()
at IRobotQHostEdit.Program.Main(String[] args)NULL
somebody has idea? How to avoid this problem?AccessViolationException