[VB2008]AccessViolationException 未處理

看板Visual_Basic作者 (厚嫩)時間16年前 (2009/11/07 01:10), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
小弟是新手 請教各位一個問題 小弟目前在寫一個地圖導航的程式 有Server端跟Client端 一開始先兩端連線 連線後 在Server上標示航點 因為地圖必須隨著client移動而更新 所以 標示航點的圖也必須要一直呼叫 但是現在問題出現了 就是執行一段時間後他就會出現狀況 他會顯示說:AccessViolationException未處理嘗試讀取或寫? 受保護的記憶體。這通常表示其他記憶體已損毀 有可能是因為一直重複呼叫航點圖示而出現錯誤的嗎?? 而且出現錯誤的時間都不一定 有時候20幾分鐘有時候7.8分鐘 以下是他給的錯誤訊息 System.AccessViolationException 未處理 Message="嘗試讀取或寫入受保護的記憶體。這通常表示其他記憶體已損毀。" Source="Interop.BMPSDKV5Lib" StackTrace: 於 BMPSDKV5Lib.DrawObjectClass.DrawBitmap_Mask(Int32 ValXCenter, Int32 ValYCenter, String bstrBmpFile, String bstrMaskBmpFile) 於 Server1.Form1.clic() 於 C:\Users\user\Desktop\tmp3\CH11\Server1\server1.vb: 行 598 於 Server1.Form1.Timer4_Tick(Object sender, EventArgs e) 於 C:\Users\user\Desktop\tmp3\CH11\Server1\server1.vb: 行 530 於 System.Windows.Forms.Timer.OnTick(EventArgs e) 於 System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m) 於 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) 於 System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) 於 System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.Unsafe\ NativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) 於 System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) 於 System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) 於 System.Windows.Forms.Application.Run(ApplicationContext context) 於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() 於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoAppli\ cationModel() 於 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(Str\ ing[] commandLine) 於 Server1.My.MyApplication.Main(String[] Args) 於 17d14f5c-a337-4978-8281-53493378c1071.vb: 行 81 於 System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) 於 System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) 於 Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() 於 System.Threading.ThreadHelper.ThreadStart_Context(Object state) 於 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) 於 System.Threading.ThreadHelper.ThreadStart() InnerException: -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.39.186.150
文章代碼(AID): #1Az5Xf97 (Visual_Basic)