There is uncertain, probabilistic situation when my Delphi application stops and enters into endless loop of generating and presenting Access Violation exceptions - the exception dialogs just pops up one over another. When I have compiled application with madExcept on, then exception messages are not show, of course, but the madExcept progress dialogs for generating bug report is being shown again and again. I have no chance to see any single report.
My question is - how can I configure madExcept or somehow other trace this situation.
I tried madExcept check-out "on exception auto actions - various actions - automatically save bug report - only if bug report doesn'g get sent" or "on exception auto actions - application control - automatically continue application" but without result. I didn't managed to find such automatically saved buf reports on my disk (where are they saved?) and the application continued to run.
What else can I do?
My exception is generated probabilistically in the event code which works quite good the first 10-20 seconds after trying it. Here is the code (it is Delphi 6 application, from around millenium age):
procedure TInvoiceForm.DataGridHotTrackNode(Sender: TObject;
AHotTrackInfo: TdxTreeListHotTrackInfo; var ACursor: TCursor);
var
HitInfo: TdxTreeListHitInfo;
GridPoint: TPoint;
AColumn: TdxDBTreeListColumn;
ARow: Integer;
Tmp: String;
begin
if IsPopupShowing then Exit;
IsPopupShowing := True;
try
GridPoint := DataGrid.ScreenToClient(Mouse.CursorPos);
HitInfo:=DataGrid.GetHitInfo(GridPoint);
if ( (HitInfo.hitType = htColumn) or (HitInfo.hitType = htLabel) ) then begin
if Assigned(HitInfo.Node) then
if {Assigned(HitInfo.Node.Values[HitInfo.Column])} (1=1) then begin
try
if HitInfo.Column<HitInfo.Node.CountValues then
if not VarIsNull(HitInfo.Node.Values[HitInfo.Column]) then
Tmp:=HitInfo.Node.Values[HitInfo.Column]
else
Tmp:=''
else
Tmp:='';
except
on E: Exception do begin
Tmp:='';
end;
end;
if PopupForm <> nil then
FreeAndNil(PopupForm);
PopupForm := TForm.Create(nil);
try
// Configure PopupForm based on the Node information
// ...
if Assigned(PopupForm) then
PopupForm.Caption:=Tmp;
if Assigned(PopupForm) then
PopupForm.Position := poDesigned;
if Assigned(PopupForm) then
PopupForm.Left := Mouse.CursorPos.X; // Adjust as needed
if Assigned(PopupForm) then
PopupForm.Top := Mouse.CursorPos.Y; // Adjust as needed
if Assigned(PopupForm) then
PopupForm.Show;
except
FreeAndNil(PopupForm);
end;
end;
end else begin
if Assigned(PopupForm) then
FreeAndNil(PopupForm);
end;
finally
IsPopupShowing := False;
end;
end;
It seems to me that all the guards are here. I have made even the guard against concurrent running of events, although it should never happen anyway because Delphi applications have just one main UI thread.
p.s. I am trying to create popup window for the cells of TdxDBGrid, this popup dialog should popup and close automatically when the user moves the mouse inside/outside the particular cells.
The documentation even clearly says:
By default the file created/continued is named
bugreport.txtand it resides at the same place where your.exeruns. It can't be easier.