Delphi debugger crash (OpenDialog + compressed exe)

343 views Asked by At

A few days ago I encountered a strange bug

Whenever my program (under debugging) tries to open a savedialog Delphi 2007 IDE crashes with an external exception. I narrowed it down to any folder containing an exe compressed by upx located.

I.e. if all exe's in a folder are normal/uncompressed then all is good. But if one of exe files has been compressed with upx then IDE crashes when opendialog tries to open that folder.

I suspect that Windows shell loads the exe module (e.g. to display its icon) and IDE notices that and tries to load debugging info for that exe and crashed at that point.

Any idea on how to resolve this? My test program attached

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    SaveDialog1: TSaveDialog;
    procedure FormClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormClick(Sender: TObject);
begin
  SaveDialog1.Execute()
end;

end.

UPDATE: Added a screenshot with IDE stack trace enter image description here

0

There are 0 answers