2011-03-03 6 views
9

Spesso si verificano arresti anomali all'avvio di un'app nel debugger D2007, interrompendolo e proseguendolo (premendo F9). Ad esempioDelphi2007: Arresto anomalo quando si continua l'app in pausa nel debugger

  • creare un'app VCL
  • goccia un TButton e un TEdit nella maschera principale
  • aggiungere questo gestore OnClick per Button1:

    procedure TForm1.Button1Click(Sender: TObject); 
    var 
        i: Integer; 
    begin 
        while True do 
        begin 
        for i := 0 to 9999 do 
         Edit1.Text := IntToStr(Random(i)); 
        Application.ProcessMessages; 
        end; 
    end; 
    
  • salvare ed eseguire il debug l'applicazione
  • premere il pulsante 1
  • mettere a fuoco l'IDE
  • fare clic sul pulsante Tasto "Pausa"
  • premere F9.

Quasi sempre si verifica una violazione di accesso. Ho provato questo sotto Windows 7/64bit, il mio collega sotto XP/32bit. Nel mio D2006 del mio collega non è stato possibile riprodurre questo errore.

Puoi riprodurre questo? Qualche idea su come aggiustarlo?

+0

Sto usando delphi 2007 su XP/32 bit e non riesco a riprodurre l'errore – Bharat

+0

Dai un'occhiata QC. Se non riesci a trovare qualcosa di simile, invia un rapporto. –

+0

@David: avevo già cercato QC e non ho trovato nulla di rilevante. –

risposta

2

Abbiamo anche questo di tanto in tanto in D2010 (e in D2007 prima), ma non ho potuto riprodurre questo. (usiamo anche Win7 64bit) Proverò a riprodurlo con la tua app di test, grazie! Ora spero che questo può essere risolto in qualche modo ...

Edit: non può riprodurre questo in D2010 ... cercherà D2007

Edit2: ma non posso riprodurre questo in D2007!
Ho anche alcuni errori strani nel registro eventi:

Debug Output: *** A stack buffer overrun occurred in "C:\test\Project7.exe" : Process Project7.exe (2584) 
Debug Output: This is usually the result of a memory copy to a local buffer or structure where the size is not properly calculated/checked. Process Project7.exe (2584) 
Debug Output: If this bug ends up in the shipping product, it could be a severe security hole. Process Project7.exe (2584) 
Debug Output: The stack trace should show the guilty function (the function directly above __report_gsfailure). Process Project7.exe (2584) 
Debug Output: *** enter .exr 772B43D0 for the exception record Process Project7.exe (2584) 
Debug Output: *** then kb to get the faulting stack Process Project7.exe (2584) 

Quando uso il mio spettatore pila (http://code.google.com/p/asmprofiler/wiki/ProcessStackViewer) e crudo pila tracciato della corrente filo Delphi (che ha dato l'errore?), vedo il seguente stack:

[772791B3]{ntdll.dll } RtlUnhandledExceptionFilter + $12 
[7725CDF4]{ntdll.dll } Unknown function at CsrVerifyRegion + $1B0 
[771D28A6]{ntdll.dll } memcpy + $5E6 
[7725CDE4]{ntdll.dll } Unknown function at CsrVerifyRegion + $1A0 
[7725CDF4]{ntdll.dll } Unknown function at CsrVerifyRegion + $1B0 
[77243509]{ntdll.dll } Unknown function at RtlUlonglongByteSwap + $16299 
[771F6AC9]{ntdll.dll } Unknown function at RtlDosSearchPath_Ustr + $ADA 
[771F6ADD]{ntdll.dll } Unknown function at RtlDosSearchPath_Ustr + $AEE 
[771F6A9B]{ntdll.dll } Unknown function at RtlDosSearchPath_Ustr + $AAC 
[77220AE5]{ntdll.dll } Unknown function at WinSqmSetIfMaxDWORD + $35 
[771F6A3D]{ntdll.dll } Unknown function at RtlDosSearchPath_Ustr + $A4E 
[77220AE5]{ntdll.dll } Unknown function at WinSqmSetIfMaxDWORD + $35 
[6E931AE0]{AcLayers.DLL} Unknown function at NotifyShims + $73B6 
[771C010F]{ntdll.dll } KiUserExceptionDispatcher + $F 
[6E931AE0]{AcLayers.DLL} Unknown function at NotifyShims + $73B6 
[771E9960]{ntdll.dll } Unknown function at RtlQueryEnvironmentVariable + $241 
[6E8E0000]{AcLayers.DLL} + $0 
[771EA172]{ntdll.dll } Unknown function at RtlAllocateActivationContextStack + $1CF 
[6E8E1FFF]{AcLayers.DLL} + $0 
[6E8E0000]{AcLayers.DLL} + $0 
[768F4AF9]{ole32.dll } Unknown function at ObjectStublessClient31 + $4AF6 
[772B206C]{ntdll.dll } NlsAnsiCodePage + $205C 
[771EA14C]{ntdll.dll } Unknown function at RtlAllocateActivationContextStack + $1A9 
[6E8E1FFF]{AcLayers.DLL} + $0 
[77220AE5]{ntdll.dll } Unknown function at WinSqmSetIfMaxDWORD + $35 
[771E9E5C]{ntdll.dll } Unknown function at RtlDecodePointer + $F7 
[768F4B4D]{ole32.dll } Unknown function at ObjectStublessClient31 + $4B4A 
[77220AE5]{ntdll.dll } Unknown function at WinSqmSetIfMaxDWORD + $35 
[771E9E89]{ntdll.dll } LdrInitializeThunk + $10 
[771B0000]{ntdll.dll } + $0 
[771B0000]{ntdll.dll } + $0 
[7720EAB0]{ntdll.dll } RtlExitUserThread + $0 
[771C0190]{ntdll.dll } RtlUserThreadStart + $0 

ho cercato per "Aclayers.dll" (perché sembra un po 'strano anche a me) ho trovato un articolo (http: //www.nynaeve.net/?p=62) sulla modalità di compatibilità di Vista e strani arresti anomali ... Forse D2007 non è compatibile con Win7?

Modifica 3: quando eseguo D2007 senza la modalità di compatibilità (?, Solo eseguendo l'exe, non utilizzando l'elemento appuntato nella barra delle applicazioni!) Ottengo lo stesso errore meno frequente e lo stack non mostra più AcLayers.DLL , ma non riesco a vedere cosa sta andando male allora (ho bisogno di ulteriori indagini, non ho più tempo per quello ora)

+0

Grazie per le indagini! Re Vista: il problema si verifica sulla macchina XP del mio collega. Dò un'occhiata al tuo stack viewer. –

+0

Non vedo le righe "Debug Output". Sai da dove vengono? - Non ho potuto trovare quello da googling. –