日期:2014-05-19  浏览次数:21103 次

System.AccessViolationException的问题,高分求解
使用Adobe   Acrobat   SDK开发的应用程序,在我得机器上运行的正常,但在客户的机器上出现下面的错误,这有可能是什么原因引起的,应该怎样去查原因
System.AccessViolationException:   Attempted   to   read   or   write   protected   memory.   This   is   often   an   indication   that   other   memory   is   corrupt.
      at   Acrobat.AcroAVDocClass.Open(String   szFullPath,   String   szTempTitle)
      at   pdf.MainForm.BtnSelect_Click(Object   sender,   EventArgs   e)
      at   System.Windows.Forms.Control.OnClick(EventArgs   e)
      at   System.Windows.Forms.Button.OnClick(EventArgs   e)
      at   System.Windows.Forms.Button.OnMouseUp(MouseEventArgs   mevent)
      at   System.Windows.Forms.Control.WmMouseUp(Message&   m,   MouseButtons   button,   Int32   clicks)
      at   System.Windows.Forms.Control.WndProc(Message&   m)
      at
  System.Windows.Forms.ButtonBase.WndProc(Message&   m)
      at   System.Windows.Forms.Button.WndProc(Message&   m)
      at   System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&   m)
      at   System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&   m)
      at   System.Windows.Forms.NativeWindow.Callback(IntPtr   hWnd,   Int32   msg,   IntPtr   wparam,   IntPtr   lparam)

------解决方案--------------------
Acrobat.AcroAVDocClass.Open

这个函数是SDK里面的还是你自己的?

如果是SDK里面的,试试Adobe提供的Sample程序是不是在客户那边可以跑吧
------解决方案--------------------
有没有测试其他机器
------解决方案--------------------
你在多一台机测试一下,如果还是这样,那建议你在主要的Function中的每行加个输出,看看是哪一行出错,输出一些重要的变量,看看是否是你所预期的结果。