迷失在这个c ++ Builder 2010 Stack Trace中

时间:2010-04-09 12:57:51

标签: c++builder stack-trace c++builder-2010

我在C ++ Builder 2010项目中低于EAccessViolation异常 StackTrace没有显示我的任何项目文件。如何找到错误的位置?此应用程序使用TIdTCPServer组件。

Call Stack Information:
-----------------------------------------------------------------------------------------------------
|Address |Module      |Unit                    |Class         |Procedure/Method           |Line     |
-----------------------------------------------------------------------------------------------------
|*Exception Thread: ID=44100; Priority=0; Class=TIdThreadWithTask                                   |
|---------------------------------------------------------------------------------------------------|
|004E17AC|Desktop.exe |System.pas              |TObject       |Free                       |9458[2]  |
|004E226E|Desktop.exe |System.pas              |              |_HandleFinallyInternal     |11939[16]|
|7D4D936A|kernel32.dll|                        |              |MultiByteToWideChar        |         |
|7D4DCD06|kernel32.dll|                        |              |VirtualQueryEx             |         |
|7D4D920B|kernel32.dll|                        |              |MultiByteToWideChar        |         |
|004E7034|Desktop.exe |System.pas              |              |Utf8ToUnicode              |22264[5] |
|004E0601|Desktop.exe |System.pas              |              |_ReallocMem                |3097[9]  |
|004E05F4|Desktop.exe |System.pas              |              |_ReallocMem                |3089[1]  |
|004E4129|Desktop.exe |System.pas              |              |_UStrSetLength             |17365[37]|
|004E3D5C|Desktop.exe |System.pas              |              |_UStrAsg                   |16893[1] |
|004E737F|Desktop.exe |System.pas              |              |UTF8ToUnicodeString        |22433[11]|
|004E3D4C|Desktop.exe |System.pas              |              |_UStrClr                   |16849[1] |
|004E7394|Desktop.exe |System.pas              |              |UTF8ToUnicodeString        |22434[12]|
|004E1FBA|Desktop.exe |System.pas              |              |_HandleAnyException        |11315[84]|
|7D4D936A|kernel32.dll|                        |              |MultiByteToWideChar        |         |
|004E05E0|Desktop.exe |System.pas              |              |_FreeMem                   |3030[6]  |
|004E05DC|Desktop.exe |System.pas              |              |_FreeMem                   |3025[1]  |
|004E2AB4|Desktop.exe |System.pas              |              |_LStrClr                   |13683[12]|
|004E2A98|Desktop.exe |System.pas              |              |_LStrClr                   |13672[1] |
|004E3EBD|Desktop.exe |System.pas              |              |_UStrFromPWCharLen         |17101[28]|
|7D620341|ntdll.dll   |                        |              |RtlNtStatusToDosErrorNoTeb |         |
|7D62031F|ntdll.dll   |                        |              |RtlNtStatusToDosError      |         |
|7D620324|ntdll.dll   |                        |              |RtlNtStatusToDosError      |         |
|7D620341|ntdll.dll   |                        |              |RtlNtStatusToDosErrorNoTeb |         |
|7D62031F|ntdll.dll   |                        |              |RtlNtStatusToDosError      |         |
|7D620324|ntdll.dll   |                        |              |RtlNtStatusToDosError      |         |
|7D4DCCEF|kernel32.dll|                        |              |VirtualQueryEx             |         |
|7D4DCCE1|kernel32.dll|                        |              |VirtualQuery               |         |
|004E1FBA|Desktop.exe |System.pas              |              |_HandleAnyException        |11315[84]|
|7D61EA51|ntdll.dll   |                        |              |KiUserExceptionDispatcher  |         |
|004E21F6|Desktop.exe |System.pas              |              |_HandleFinally             |11872[39]|
|7D61F1D7|ntdll.dll   |                        |              |RtlLeaveCriticalSection    |         |
|7D6251EB|ntdll.dll   |                        |              |LdrUnlockLoaderLock        |         |
|7D6251F2|ntdll.dll   |                        |              |LdrUnlockLoaderLock        |         |
|7D4D936A|kernel32.dll|                        |              |MultiByteToWideChar        |         |
|7D4DCD06|kernel32.dll|                        |              |VirtualQueryEx             |         |
|7D4D920B|kernel32.dll|                        |              |MultiByteToWideChar        |         |
|004E7034|Desktop.exe |System.pas              |              |Utf8ToUnicode              |22264[5] |
|004E0601|Desktop.exe |System.pas              |              |_ReallocMem                |3097[9]  |
|004E05F4|Desktop.exe |System.pas              |              |_ReallocMem                |3089[1]  |
|004E4129|Desktop.exe |System.pas              |              |_UStrSetLength             |17365[37]|
|004E3D5C|Desktop.exe |System.pas              |              |_UStrAsg                   |16893[1] |
|004E737F|Desktop.exe |System.pas              |              |UTF8ToUnicodeString        |22433[11]|
|004E3D4C|Desktop.exe |System.pas              |              |_UStrClr                   |16849[1] |
|004E7394|Desktop.exe |System.pas              |              |UTF8ToUnicodeString        |22434[12]|
|004E1FBA|Desktop.exe |System.pas              |              |_HandleAnyException        |11315[84]|
|7D4D936A|kernel32.dll|                        |              |MultiByteToWideChar        |         |
|004E05E0|Desktop.exe |System.pas              |              |_FreeMem                   |3030[6]  |
|004E05DC|Desktop.exe |System.pas              |              |_FreeMem                   |3025[1]  |
|004E2AB4|Desktop.exe |System.pas              |              |_LStrClr                   |13683[12]|
|004E2A98|Desktop.exe |System.pas              |              |_LStrClr                   |13672[1] |
|004E3EBD|Desktop.exe |System.pas              |              |_UStrFromPWCharLen         |17101[28]|
|7D620341|ntdll.dll   |                        |              |RtlNtStatusToDosErrorNoTeb |         |
|7D62031F|ntdll.dll   |                        |              |RtlNtStatusToDosError      |         |
|7D620324|ntdll.dll   |                        |              |RtlNtStatusToDosError      |         |
|7D620341|ntdll.dll   |                        |              |RtlNtStatusToDosErrorNoTeb |         |
|7D62031F|ntdll.dll   |                        |              |RtlNtStatusToDosError      |         |
|7D620324|ntdll.dll   |                        |              |RtlNtStatusToDosError      |         |
|7D4DCCEF|kernel32.dll|                        |              |VirtualQueryEx             |         |
|7D4DCCE1|kernel32.dll|                        |              |VirtualQuery               |         |
|7D61F1D7|ntdll.dll   |                        |              |RtlLeaveCriticalSection    |         |
|004E1FBA|Desktop.exe |System.pas              |              |_HandleAnyException        |11315[84]|
|7D61EA51|ntdll.dll   |                        |              |KiUserExceptionDispatcher  |         |
|004B120E|Desktop.exe |Classes.pas             |              |ThreadProc                 |11018[8] |
|004E2A0C|Desktop.exe |System.pas              |              |ThreadWrapper              |13579[33]|
|---------------------------------------------------------------------------------------------------|
|Calling Thread: ID=68288; Priority=2; Class=TIdListenerThread                                      |
|---------------------------------------------------------------------------------------------------|
|004B1ED0|Desktop.exe |Classes.pas             |TThread       |Resume                     |11558[1] |
|004B1EC8|Desktop.exe |Classes.pas             |TThread       |Resume                     |11557[0] |
|004B120E|Desktop.exe |Classes.pas             |              |ThreadProc                 |11018[8] |
|004E2A0C|Desktop.exe |System.pas              |              |ThreadWrapper              |13579[33]|
|---------------------------------------------------------------------------------------------------|
|                                                                                                   |

2 个答案:

答案 0 :(得分:0)

这应该是损坏的内存或指针。 这不是很容易调试,你需要验证你使用的所有指针都有正确的值,你不会在任何地方出界。

答案 1 :(得分:0)

http://sourceforge.net/projects/fastmm/files/FastMM%204.x%20Stable%20Releases/

下载最新版本的FastMM

在c ++ builder中安装它 阅读文档如何在FastMM中设置调试模式 如果您有悬空指针或写入禁忌位置,FastMM应该很快找到它们。

祝你好运。

(请注意,包含了更简单版本的FastMM ,但此版本更深入了)