We often experience crashes when starting an app in the D2007 debugger, pausing it and continuing it (by pressing F9). E.g
- create a VCL app
- drop a TButton and a TEdit on the main form
-
add this OnClick handler for 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; - save and debug the app
- press Button1
- focus the IDE
- click the “Pause” button
- press F9.
Almost always we get an access violation. I tested this under Windows 7/64bit, my colleague under XP/32bit. In my colleague’s D2006 we couldn’t reproduce this error.
Can you reproduce this? Any ideas how to fix it?
We also have this now and then in D2010 (and in D2007 before), but I could not reproduce this.
(we use Win7 64bit too)
I’ll try to reproduce this with your test app, thanks! Now hope this can be solved somehow…
Edit: cannot reproduce this in D2010… will try D2007
Edit2: but I can reproduce this in D2007!
I also get some weird errors in event log:
When I use my stack viewer (http://code.google.com/p/asmprofiler/wiki/ProcessStackViewer) and raw stack tracing of the current Delphi thread (that gave the error?), I see the following stack:
I searched for “AcLayers.DLL” (because it seems a little bit strange too me) I found an article (http://www.nynaeve.net/?p=62) about Vista compatibility mode and strange crashes… Propably D2007 is not compatible with Win7?
Edit 3: when I run D2007 without compatibility mode (?, just running the exe, not using the pinned item in the taskbar!) I get the same error less frequent and the stack doesn’t show AcLayers.DLL anymore, but I can’t see what’s going wrong then (need some more investigation, don’t have more time for that now)