2011-03-03 8 views
9

A menudo experimentamos bloqueos al iniciar una aplicación en el depurador D2007, detenerla y continuarla (presionando F9). Por ejemploDelphi2007: bloqueo al continuar la aplicación detenida en el depurador

  • crear una aplicación VCL
  • gota una TButton y una TEdit en el formulario principal
  • añadir este controlador OnClick de 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; 
    
  • guardar y depurar la aplicación
  • presione Button1
  • enfoque el IDE
  • haga clic en el Botón "Pausa"
  • Presione F9.

Casi siempre tenemos una infracción de acceso. Probé esto en Windows 7/64 bits, mi colega en XP/32 bits. En el D2006 de mi colega no pudimos reproducir este error.

¿Puedes reproducir esto? ¿Alguna idea para solucionarlo?

+0

Estoy usando delphi 2007 en XP/32 bit y no puedo reproducir el error – Bharat

+0

Eche un vistazo a QC. Si no puede encontrar algo similar, envíe un informe. –

+0

@David: Ya había buscado QC y no encontré nada relevante. –

Respuesta

2

También tenemos esto de vez en cuando en D2010 (y en D2007 antes), pero no pude reproducir esto. (también utilizo Win7 64 bit) Intentaré reproducir esto con su aplicación de prueba, ¡gracias! Ahora espero que esto se puede resolver de alguna manera ...

Editar: no se puede reproducir esto en D2010 ... intentará D2007

Edit2: pero puedo reproducir esto en D2007!
también consigo algunos errores extraños en el registro de eventos:

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) 

Cuando uso mi visor de pila (http://code.google.com/p/asmprofiler/wiki/ProcessStackViewer) y el rastreo de pila de la prima hilo actual Delphi (que dio el error?), veo la pila siguiente:

[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 

busqué "aclayers.dll" (ya que parece un poco extraño yo también) me encontré con un artículo (http: //www.nynaeve.net/?p=62) sobre el modo de compatibilidad Vista y bloqueos extraños ... Propably D2007 no es compatible con Win7?

Editar 3: cuando ejecuto D2007 sin modo de compatibilidad (?, Simplemente ejecutando el archivo exe, no utilizando el elemento anclado en la barra de tareas!) Obtengo el mismo error menos frecuente y la pila ya no muestra AcLayers.DLL , pero no puedo ver qué está pasando mal entonces (necesito más investigación, no tengo más tiempo para eso ahora)

+0

¡Gracias por investigar! Re Vista: El problema también ocurre en la máquina XP de mi colega. Echaré un vistazo a tu visualizador de pila. –

+0

No veo las líneas de "Salida de depuración". ¿Sabes de dónde vienen? - No pude encontrar eso en Google. –

Cuestiones relacionadas