Jump to content
Tom F

10.4.2 IDE crashes on start

Recommended Posts

I waited a long, long time to upgrade from 10.3 to 10.4.2, believing it would be stable by now. I was wrong.

I spent most of yesterday doing a totally clean ISO install of 10.4 (including the updates from GetIt) and then installing all my third-party packages and tools.

It worked, mostly. And I liked the new features. But, the IDE crashed a few times.
I've used Delphi for more than 20 years and never had the IDE crash... until now.

And now, when I start the IDE, it never gets past the splash screen before dying a silent death and disappearing. 

Report.wer file shows an exception.

Even after rebooting my machine, the IDE won't start. :classic_sad:

Like many Delphi users, I'm thoroughly disgusted with Embarcadero's failures.

I might be able to tolerate a few crashes a day. But, not being able to start the IDE means I'll have to roll back to 10.3.

And I will cancel my subscription to updates.

Any suggestions on how to narrow down the problem? I'm not a systems engineer.  I'm not familiar with how the IDE loads, where I might disable certain add-ins.

Are there any suggestions on how to get the IDE running again???

Share this post


Link to post

I would uninstall all third party, all GetIt packages, remove IDE, delete manually what is left.

Clean install, test. All GetIt packages one by one, test...

Share this post


Link to post
1 minute ago, Vandrovnik said:

I would uninstall all third party, all GetIt packages, remove IDE, delete manually what is left.

Clean install, test. All GetIt packages one by one, test...

That's a reasonable suggestion, Vandrovnik.  Except I can't uninstall any packages, because I can't run the IDE. Does uninstalling RAD Studio uninstall everything or are their folders and registry entries I have to clean.

This is an intermittent bug, so I can't just "try again" and hope it works.  I need a development environment that is stable.

 

Share this post


Link to post

Delphi 10.4 was unstable however it never failed to load. Something that you've installed made the IDE unstable. As @Vandrovnik wrote you should try bds.exe -r foo.

Share this post


Link to post

Hi, Vandrovnik

Thanks for suggesting the command-line switches.  I hid the splash screen and could see the new progress meter displaying the loading of my project's .pas source into the editor before it crashed.

So I closed the IDE, and hid my source in a different folder, and was able to start the IDE. 

I then moved my source back to its original folder and all is fine for now, including being able to start the IDE.

Somehow, the loading of one particular source file was causing a crash.  However, the file loads fine now.

I've turned off "Reopen last opened project when starting RAD Studio" 

I doubt the above steps fixed the problem.  I expect the IDE will continue to intermittently crash, but at least I'll be able to restart it.

Share this post


Link to post

Recently I noticed a freezing IDE while loading some source files. The actual cause was the internal Git client prompting for credentials in an invisible console window. Disabling that client fixed the problem.

Share this post


Link to post

Uwe: Thanks for the suggestion. I still get intermittent lockups when opening .pas files, but so far see no pattern. 

How does one disable the internal Git client?

Share this post


Link to post

Just clear the entry for the Git exe in Tools - Options - Version Control - Git

Share this post


Link to post
On 5/31/2021 at 11:48 PM, Uwe Raabe said:

Just clear the entry for the Git exe in Tools - Options - Version Control - Git

Darn, I was afraid that's where you were referring to.

Unfortunately, I don't have any of the git entries filled in. 😞 So that's not where my problem is headed.

What bothers me is that the crash is so hard. There's no message or anything. The IDE just disappears.  Most programs pop up a message box with exception errors. The Windows error log shows the crash, so perhaps somehow the IDE or my machine are now configured in some way to not show any crash messages. Or perhaps this particular crash is just too deep.

Although the problem has been intermittent, at the current time I have a reliable way to make it crash. i.e. There is one particular.pas file that crashes every time I try to load it.  I am making a VM backup of my development environment and noted in a comment in the RSP, hoping that EMB will ask for me to provide it.
 

Share this post


Link to post

Check your memory. For me, Delphi 10.4.2 consumes more and more memory. Often sitting at 3.2GB. Then it just dissapears.

Share this post


Link to post

I find that loading extra copy of 10.4 prevents the disappearing act.  It prevents recompiling packages though.

My vcl custom components when installed show only the non-visual components on the palette when making fmx application.  But after making a fmx app switching to vcl  app then a message box may appear stating that my components refer to Teechartxxx.  

 

Here's output of a component that runs in IDE as well as runtime.  Using this in an app with timer.interval  at 10 shows more stuff.

// win32 works
// in create of custom component
if (csDesigning in ComponentState) then
    ticker.Enabled := true;


//Tip by Delphian | 2014-08-13 at 17:05
function GetTitleOfActiveWindow: string;
var
  AHandle: THandle;
  ATitle: string;
  ALen: Integer;
begin
  Result := '';
  AHandle := GetForegroundWindow;

  if AHandle <> 0 then begin
    ALen := GetWindowTextLength(AHandle) + 1;
    SetLength(ATitle, ALen);
    GetWindowText(AHandle, PChar(ATitle), ALen);
    result := Trim(ATitle);
  end;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
var
  awn: HWND;
  buf: array[0..1024] of Char;
  lng:           longint;
  WinInstance:   Thandle;
  WinModuleName: string;

begin
  SetLength(WinModuleName,251);
  WinInstance := GetWindowLong(GetForegroundWindow(), GWL_hInstance);
  if WinInstance <> 0 then
  begin
    lng := GetModuleFileName(WinInstance,
                             PChar(WinModuleName),
                            Length(WinModuleName));
                         SetLength(WinModuleName, lng);
  end;

  awn := GetForegroundWindow;
  if awn <> 0 then
  begin
    GetClassName(awn, @buf, Length(buf));
    if buf <> cacheAwn then
    begin
      Edit3.Text := buf;
      cacheAwn := buf;
      memo1.Lines.Add(cacheAwn);
    end;
  end
  else
    Edit3.Text := '';
  Edit2.Text := GetTitleOfActiveWindow + ' ' + WinModuleName;
end;

 

 

clock..png

Share this post


Link to post
Posted (edited)

Pat, loading an extra IDE doesn't solve this problem, which isn't a "disappearing act." The application bde.exe actually terminates and Windows generates a crash report. 

Dave, I've got 8 of 16 gigs of memory free, so a shortage of memory is not the problem.  Thanks for the good suggestion though. I hadn't thought of that...

I've discovered through a lot of trial and error that when I encounter a unit that when opening a file crashes the IDE, if I restart the IDE and toggle CodeInsight between LSP, Classic, and None, (sometimes a few times) I can usually load the problem .pas file.

I haven't found any predictable sequence of toggling. Sometimes (but not always) I can load the .pas file into the IDE without a crash, regardless of whether CodeInsight is configured to LSP, classic, or None...  😞

This toggling procedure is not a fix, of course. It may simply be that there's some uninitialized memory that the above workaround leaves in a better state.

The toggling procedure isn't even a reliable workaround since it apparently has to be done after the crash. All of this means I'm probably going to leave all my large forms and frames open in the IDE and not shut down the IDE for weeks at a time in an effort to avoid the problem. :classic_mellow:

But at least I'm not stopped dead in my tracks.  

I also had a graceful crash in the IDE occur while I was testing this. I grabbed the call stack and other recommended files (like the DxDiag output) and appended them to the original RSP https://quality.embarcadero.com/browse/RSP-34109

Edited by Tom F

Share this post


Link to post
8 hours ago, Tom F said:

Dave, I've got 8 of 16 gigs of memory free, so a shortage of memory is not the problem.  Thanks for the good suggestion though. I hadn't thought of that...

I do hope that you're aware that the IDE is still a 32 bit application and can't use additional memory.

Share this post


Link to post

@Tom F I see such crashes almost on daily basis, i don't open files but when i am working on something and as always another project jumps in to join the party in my brain, i stop and open another IDE then drag and drop the jumping file into it and it does crash most the times, the workaround is to do this

1) open IDE

2) create new VCL project 

3) close it

 

and that is it, after than you can open any file or drop any file and it will not crash, please share if that did work for you.

 

 

 

off the topic and about your crash report and its stack 

it is clearly that Xml.XMLDoc.TXMLDocument in xmlrtl270.rtl is buggy or wrongly abused by multithreading use, all start from 

[514F360C]{xmlrtl270.bpl} Xml.XMLDoc.TXMLDocument._Release (Line 2427, "Xml.XMLDoc.pas" + 6) + $4

 

and it is continue till this very interesting part, the end (aka top the file) before the crash

[500685AA]{rtl270.bpl  } System.@IntfClear (Line 38797, "System.pas" + 9) + $0
[5005FD59]{rtl270.bpl  } System.TObject.CleanupInstance (Line 18181, "System.pas" + 23) + $0
[5006063C]{rtl270.bpl  } System.TMonitor.Destroy (Line 19528, "System.pas" + 0) + $0
[5005FD59]{rtl270.bpl  } System.TObject.CleanupInstance (Line 18181, "System.pas" + 23) + $0
[5005A25C]{rtl270.bpl  } System.@FreeMem (Line 4891, "System.pas" + 20) + $0
[5006063C]{rtl270.bpl  } System.TMonitor.Destroy (Line 19528, "System.pas" + 0) + $0
[5005FD59]{rtl270.bpl  } System.TObject.CleanupInstance (Line 18181, "System.pas" + 23) + $0
[500685AC]{rtl270.bpl  } System.@IntfClear (Line 38798, "System.pas" + 10) + $0

the exitance of TMonitor.Destory twice is wrong specially if you notice the line number is different means the it is trying to destroy already nil'ed object ! and the AV raised when it tried to dereference the object.

 

off topic 

this part in the stack dump is making me thinking what is going on there, but this is irrelevant to the crash 

[004B0F4F]{bds.exe     } AppMain.TAppBuilder.DestroyProjectGroup (Line 2761, "AppMain.pas" + 21) + $9
[004B46EC]{bds.exe     } AppMain.TAppBuilder.WindowCloseQuery (Line 4008, "AppMain.pas" + 51) + $3
[50E56EEC]{vcl270.bpl  } Vcl.Forms.TCustomForm.CloseQuery (Line 7466, "Vcl.Forms.pas" + 8) + $14
[50E56E15]{vcl270.bpl  } Vcl.Forms.TCustomForm.Close (Line 7438, "Vcl.Forms.pas" + 4) + $4
[0170477F]{vclwinx270.bpl} Vcl.TitleBarCtrls.TCustomTitleBarPanel.TitleButtonCloseClick (Line 1434, "Vcl.TitleBarCtrls.pas" + 2) + $7
[50CF76CB]{vcl270.bpl  } Vcl.Controls.TControl.Click (Line 7596, "Vcl.Controls.pas" + 9) + $8
[50EA8BC8]{vcl270.bpl  } Vcl.Buttons.TCustomSpeedButton.Click (Line 1964, "Vcl.Buttons.pas" + 0) + $4
[50EA8BB2]{vcl270.bpl  } Vcl.Buttons.TCustomSpeedButton.MouseUp (Line 1957, "Vcl.Buttons.pas" + 25) + $10
[50CF7AFC]{vcl270.bpl  } Vcl.Controls.TControl.DoMouseUp (Line 7724, "Vcl.Controls.pas" + 2) + $25

I don't know and never seen winx library but assuming it is Windows 10 controls, with the new Delphi IDE's, what caught my eye is the series of these actions

MouseUp->TCustomSpeedButton.Click->TControl.Click->TitleBarCtrls.TCustomTitleBarPanel.TitleButtonCloseClick->TCustomForm.Close->..

Is the design that bad that it is a simple overlay and delegating events, or it does use hooking, in both cases that is fragile and bad overlay design? i thnik it will always cause troubles to draw.

Share this post


Link to post
5 hours ago, Kas Ob. said:

I don't know and never seen winx library but assuming it is Windows 10 controls, with the new Delphi IDE's, what caught my eye is the series of these actions

MouseUp->TCustomSpeedButton.Click->TControl.Click->TitleBarCtrls.TCustomTitleBarPanel.TitleButtonCloseClick->TCustomForm.Close->..

It is probably a button somewhere on the new CustomTitleBar control that is clicked. It can as well be that just the event of that button is wired also to some other button and no titlebar control is directly involved.

Share this post


Link to post
8 hours ago, Kas Ob. said:

@Tom F I see such crashes almost on daily basis, i don't open files but when i am working on something and as always another project jumps in to join the party in my brain, i stop and open another IDE then drag and drop the jumping file into it and it does crash most the times, the workaround is to do this

1) open IDE

2) create a new VCL project 

3) close it

 

and that is it, after that you can open any file or drop any file and it will not crash, please share if that did work for you.

 

Your workaround above did not work for me. The only work-around I've found is to restart the IDE, select "None" for Code insight manager , then open the .pas file that was causing the crash.  If I want, I can then re-enable LSP and it works fine in all files, including the one that was causing difficulties.

The above doesn't always work for me but usually playing around with the Code Insight manager setting for a few times after a few crashes finally lets me load the file.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×