當我從IDE運行它時,我的應用報告退出時出現此錯誤。對於在程序運行時創建的線程的每個實例,我通常會得到一個FastMM障礙,但它不足以描述此行爲。問題是我無法理解報告。Delphi,FastMM - 塊被釋放後被修改 - 需要幫助解釋此FastMM報告
---------------------------
APP.exe: Memory Error Detected
---------------------------
FastMM has detected an error during a free block scan operation. FastMM detected that a block has been modified after being freed.
The previous block size was: 40
Stack trace of when this block was previously allocated (return addresses):
403052 [APPHardwareDeclarations.pas][System][[email protected]][645]
405F0D [UFlxNumberFormat.pas][System][[email protected]][956]
4065E1 [APPGlobalDeclarations.pas][System][[email protected]][3356]
411AF7 [madStrings][madStrings.WideToAnsiEx]
41ACE8 [madTools][madTools.FindModule]
720074 [RpRenderCanvas][RpRenderCanvas.TRvRenderCanvas.FloodFill]
720074 [RpRenderCanvas][RpRenderCanvas.TRvRenderCanvas.FloodFill]
780065 [UXlsReferences][UXlsReferences.TReferences.SaveToStream]
4AAB2E [ExtCtrls][ExtCtrls.TTimer.Timer]
Stack trace of when the block was previously freed (return addresses):
405E59 [APPSendEmailSMTPQueue.pas][System][[email protected]][494]
406DD3 [APPGlobalDeclarations.pas][System][[email protected]][3584]
406D5D [APPGlobalDeclarations.pas][System][[email protected]][3560]
406E38 [APPGlobalDeclarations.pas][System][[email protected]][3602]
47B6F2 [Classes][Classes.TStringList.Destroy]
404DFF [GIFImage.pas][System][System.TObject.Free][12891]
468741 [SysUtils][SysUtils.FreeAndNil]
506600 [StringUtilities][StringUtilities.AddCommaTextPair]
85C738 [APPLogWebTransactionsQueue][APPLogWebTransactionsQueue.ServiceWebTransactionQueue]
The current stack trace leading to this error (return addresses):
40D04C [FastMM4][FastMM4.CheckBlocksOnShutdown]
40DE88 [FastMM4][FastMM4.Finalization]
4059F3 [GraphicEx.pas][System][System.FinalizeUnits][8123]
458CAA [madExcept][madExcept.InterceptFinalizeUnits]
405CCB [IdCoderXXE.pas][System][[email protected]][85]
924868
7C90DCBA [ZwSetInformationThread]
7C81776F [RegisterWaitForInputIdle]
7C817778 [RegisterWaitForInputIdle]
Current memory dump of 256 bytes starting at pointer address 16902788:
6C 6A 95 00 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
80 80 80 80 80 80 80 80 D7 D8 6F E9 80 80 80 80 80 80 00 00 41 1E 90 16 00 00 00 00 00 00 00 00
00 00 00 00 52 30 40 00 9B 4D 40 00 11 82 40 00 62 51 40 00 E2 5B 64 00 21 76 64 00 68 77 64 00
12 B0 64 00 AD D6 64 00 6E 30 40 00 B9 4D 40 00 AD 51 40 00 6A 5C 64 00 78 82 40 00 78 35 64 00
83 81 40 00 48 6E 40 00 5D 6D 40 00 28 00 00 00 04 44 64 00 C0 27 90 16 6C 6A 95 00 80 80 80 80
80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80
3F D8 6F E9 80 80 80 80 00 00 00 00 40 FF 8F 16 00 00 00 00 00 00 00 00 00 00 00 00 52 30 40 00
0D 5F 40 00 E1 65 40 00 F7 1A 41 00 E8 AC 41 00 74 00 72 00 74 00 72 00 65 00 78 00 2E AB 4A 00
l j • . € € € € € € € € € € € € € € € € € € € € € € € € € € € €
€ € € € € € € € × Ø o é € € € € € € . . A . . . . . . . . . .
. . . . R 0 @ . › M @ . . ‚ @ . b Q @ . â [ d . ! v d . h w d .
. ° d . Ö d . n 0 @ . ¹ M @ . Q @ . j \ d . x ‚ @ . x 5 d .
ƒ @ . H n @ . ] m @ . ( . . . . D d . À ' . l j • . € € € €
€ € € € € € € € € € € € € € € € € € € € € € € € € € € € € € € €
? Ø o é € € € € . . . . @ ÿ . . . . . . . . . . . . . R 0 @ .
. _ @ . á e @ . ÷ . A . è ¬ A . t . r . t . r . e . x . . « J .
獲取項目先前被釋放時的堆棧跟蹤。
468741 [SysUtils][SysUtils.FreeAndNil]
506600 [StringUtilities][StringUtilities.AddCommaTextPair]
85C738 [APPLogWebTransactionsQueue][APPLogWebTransactionsQueue.ServiceWebTransactionQueue]
都是明智的,但下一行: 404DFF [GIFImage.pas] [系統] [System.TObject.Free] [12891] 我感到困惑。我期望Free在這一點上被稱爲,但GIFImage.pas
在那裏做什麼?以前分配塊的跟蹤完全是隨機的。沒有任何項目是有道理的。 我感覺FastMM設置有些不對,或者FastMM從垃圾內存中獲取堆棧跟蹤。
我原本在使用Delphi 2006進行編譯後遇到了這個問題。Delphi 2007的全新安裝具有相同的行爲。誰能告訴我發生了什麼事? TIA [R
出於好奇。如果從項目中刪除madExcept,會發生同樣的情況嗎? – TLama
發生什麼事是您釋放了一塊內存,然後再訪問它。 –
我意識到 - 我的問題是FastMM提供的轉儲不會給我任何明智的信息,我可能會使用它來找出原因。 – rossmcm