作者k0122k (厚嫩)
看板Visual_Basic
标题[VB2008]AccessViolationException 未处理
时间Sat Nov 7 01:09:56 2009
小弟是新手
请教各位一个问题
小弟目前在写一个地图导航的程式 有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