各位, 
  小弟有一程序, 報地址錯誤,   報錯信息為 : 
      "0x6c1b7faf"指令參考的"0xfffffff4"內存,不能為read.
  應如何獲得保存的代碼是哪一行呢?現已經使用 http://ta.uuzone.com/blog/DDGG/6061.htm 中的方法, 無法找出代碼,我用的基地址為0x00400000, 是否基地址錯誤呢??謝謝.

解决方案 »

  1.   

    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=203929
      

  2.   

    安装这个吧,EurekaLog
    EurekaLog 4.5.7Application:
    -------------------------------------------------------
      1.1 Start Date      : Fri, 10 Jun 2005 10:57:37 +0800
      1.2 Name/Description: Project1.exe
      1.3 Version Number  : 
      1.4 Parameters      : Exception:
    --------------------------------------------------------------------------------------------------------
      2.1 Date   : Fri, 10 Jun 2005 10:57:39 +0800
      2.2 Address: 0046F1DE
      2.3 Module : Project1.exe
      2.4 Type   : EAccessViolation
      2.5 Message: Access violation at address 0046F1DE in module 'Project1.exe'. Write of address 00000000.Active Controls:
    ----------------------------
      3.1 Form Class   : TForm1
      3.2 Form Text    : Form1
      3.3 Control Class: TButton
      3.4 Control Text : Button1Computer:
    ---------------------------------
      4.1 Name        : LONGER1
      4.2 User        : Administrator
      4.3 Total Memory: 511 Mb
      4.4 Free Memory : 74 Mb
      4.5 Total Disk  : 19.53 Gb
      4.6 Free Disk   : 8.4 GbOperating System:
    --------------------------------------
      5.1 Type    : Microsoft Windows 2000
      5.2 Build # : 2195
      5.3 Update  : Service Pack 4
      5.4 Language: 中文(中国)Call Stack Information:
    -----------------------------------------------------------------------------
    |Address |Module      |Unit        |Class |Procedure/Method            |Line|
    -----------------------------------------------------------------------------
    |0046F1DE|Project1.exe|Unit1.pas   |TForm1|Button1Click                |38  |
    |65D2F332|USP10.dll   |            |      |ScriptStringAnalyse         |    |
    |65D2DF8D|USP10.dll   |            |      |UspFreeMem                  |    |
    |77F825C0|ntdll.dll   |            |      |RtlMultiByteToUnicodeN      |    |
    |77F83559|ntdll.dll   |            |      |RtlAnsiStringToUnicodeString|    |
    |77DFBB6C|user32.dll  |            |      |DrawFocusRect               |    |
    |77F5EDF5|GDI32.dll   |            |      |GdiReleaseDC                |    |
    |77DF5608|user32.dll  |            |      |ReleaseDC                   |    |
    |77E3078C|user32.dll  |            |      |NotifyWinEvent              |    |
    |77E307A7|user32.dll  |            |      |NotifyWinEvent              |    |
    |77E3078C|user32.dll  |            |      |NotifyWinEvent              |    |
    |77E0500E|user32.dll  |            |      |CallWindowProcW             |    |
    |77DF735C|user32.dll  |            |      |SendMessageW                |    |
    |77DF731D|user32.dll  |            |      |SendMessageW                |    |
    |77DF6B5F|user32.dll  |            |      |CallWindowProcA             |    |
    |77DF6B4B|user32.dll  |            |      |CallWindowProcA             |    |
    |77DF84CA|user32.dll  |            |      |GetCapture                  |    |
    |77F82091|ntdll.dll   |            |      |RtlLeaveCriticalSection     |    |
    |77DF56F5|user32.dll  |            |      |PeekMessageA                |    |
    |77DF5B72|user32.dll  |            |      |DispatchMessageA            |    |
    |77DF5B6C|user32.dll  |            |      |DispatchMessageA            |    |
    |0046F4A7|Project1.exe|Project1.dpr|      |                            |13  |
    -----------------------------------------------------------------------------
      

  3.   

    lw549(那个孩子他爹) :  我參考的與你說的是同一文章. 
    但如何確定程序的基地址.http://community.csdn.net/Expert/topic/4073/4073848.xml?temp=.4981806
      

  4.   

    我用的是前面一個 : 0x6c1b7faf, 但是就是找不出來 崩溃行偏移  
    各位幫幫忙