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

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
Guest

@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

I am using Delphi 10.4 Community Edition and having the same issues as Tom F with the IDE closing... I tried all of the suggestions given to Tom and at one point was able to work with my VCL project, compile and run the application... Other older projects of mine, and samples run fine without an IDE closure... After closing Delphi (after my successful project load and run), I restarted and did not Reopen but selected Open Project. I am back to the same IDE problem where the project loads (a little different than Toms initial problem), the main form is displayed but the cursor disappears and after around 10 seconds, the program/IDE quits... I am a long term Delphi programmer and almost purchased the 11.1 version last week, at a significant discount, but am glad I didn't... The Community Edition idea is great and up until 10.3 I was able to utilize the IDE and develop programs without a problem (other than my own!). My last Professional purchase was 10 (Seattle) and that has been very stable for my needs.... I am now retired and have been looking for a reason to upgrade but now will stay with the older version... I have been a Microsoft Visual Studio user for years with no hassle and its always been reliable as I have upgraded versions... I was cutoff from Delphi Community Edition for a while, after having PC problems and reinstalling 3 times... Guess what, Embarcadero support told me via email that I was out of luck... License terms only allow 3 installs! I would also have preferred to stay with older Delphi Community editions but you have no choice and I have been burnt with suddenly having components that I purchased becoming outdated and would need to upgrade! I've had enough and hope someone at Embarcadero reads this... Back to my original problem: On this PC, I had Delphi 10.3 running for the year allowed, with no IDE problems and similar (personal) projects... Any advise is appreciated!   

Share this post


Link to post
On 4/9/2022 at 4:04 PM, Jim C said:

Other older projects of mine, and samples run fine without an IDE closure

 

You could try this:  Open new app and open a unit of the code hanging the IDE.  The IDE code window draws red squiggly and warning mark where the defects are.  If the units DFM is flawed that should turn up. 

 

Or top down approach is start the project with projx.dpr not projx.dproj.  In case they are out of step.                   

  

Share this post


Link to post

Thanks Pat for the suggestions. First I tried starting with the .dpr and same 10-15 seconds of IDE freezing and then closing. Second: I created a new project and slowly added each unit, one at a time to the new project and except for a splash screen unit and 3 units with classes (in their own units), all additions immediately freeze and close the IDE within the 10-15 seconds, after they are added. I can't switch screens or view code, since the IDE is frozen (program has 8 units, so 5 fail). Included in the failing units is one with a single memo component and labels and it shuts down the IDE.  After I added a unit, I didn't save the project and worked my way through one unit at a time. Please keep in mind that this program utilizes no components from external libraries and compiles/builds without even a warning when I load it up under Delphi 10 Professional (Seattle), which is where I developed it. As part of the development process, I also checked for memory leaks and minimized all that I could. I wanted to work on the same program on my laptop and at the same time test the newer Community version of Delphi, so that's when my latest problems started. I didn't expect to have this problem and it appears to be the Delphi 10.4 IDE (with patch installed). I had no problem with Delphi 10.3 but was forced to uninstall/install version 10.4 because the 1 year Community license expired. It has been nothing but problems since then and I am starting to believe that I won't be able to use this newer version but am lucky to have the older pro version with a perpetual license. I might just give up on Delphi. I've  programmed in Delphi (since version 5) and it has been a pleasure until now.  I will try any other suggestions from you or others before I give up. This is a new laptop with Windows 10 (Intel i5 and 8Gbyte Ram) and it could be an OS problem but I will use up my temporary licenses again, if I start from scratch and reinstall the OS and then Delphi! 

Share this post


Link to post
14 hours ago, Jim C said:

First I tried starting with the .dpr and same 10-15 seconds of IDE freezing and then closing. Second: I created a new project and slowly added each unit, one at a time to the new project and except for a splash screen unit and 3 units with classes (in their own units), all additions immediately freeze and close the IDE within the 10-15 seconds, after they are added. I can't switch screens or view code, since the IDE is frozen (program has 8 units, so 5 fail). Included in the failing units is one with a single memo component and labels and it shuts down the IDE. 

 

  Try this in the new test project put in the code units and dfms that are not loading yet.  you are already 3/8 done. This may find path error caused by code squished into small laptop. 🙂 

 

implementation

uses 
  frmMemUnit;// put not in dpr or project 
var
  frmMemoTest: TffrmMemo;

frmMainTester.btnClick(Sender: TObject);

begin
  frmMemoTest:= TffrmMemo.create(application); // set break here or memoforms.create;
  frmmemoTest.Show; 
end;

  

 

 

Share this post


Link to post

Thanks again Pat for the suggestion and I am appreciative of you offers to assist....  I can't navigate the IDE, immediately after adding the unit and dfm to the test project. At that point, I get a wait cursor and the IDE crashes/closes. Unless I am misunderstanding your latest suggestion... When I load the current implementation of all the units and forms in Seattle, I have no highlighted code and no warnings and no errors when compiling. I will uninstall 10.4 and either try out the Delphi 11.1 trial version or install my Seattle version on this laptop. Either way, if it fails, I will assume it's the Win 10 OS that is corrupted. Again, same laptop and a less completed program, and Delphi 10.3 had no problems, Embarcadero won't let me reinstall the 10.3 version, since it's no longer supported as a Community edition...  I didn't want to go through all of the work of starting from scratch and hoped for an easy solution but have given up on this for now. I will post a reply if I isolate the problem after installing a clean OS, installing the Trial or Seattle (haven't decide yet) version of Delphi and see what works. I won't waste my time with 10.4 which appears to be very buggy, based on other posts. By the way, my program is a weather program (using openweather.org Jason data), using the MS Speech SDK and an Access database to quickly select weather favorites in different cities throughout the US and world and then speak the current and forecasted reports. 

Share this post


Link to post

Sorry the tips didn't work. The 11.1 works very well on my laptop as did 10.4.1 and 10.3.  Each one is always an improvement.  Does the app made on Seattle machine run on the laptop that may check if the anti-virus and Access like what you are doing. 

 

The tip about loading the form in runtime is to allow not loading the suspect form dfm into design window. just have in same directory.  Sometimes the IDE's browsing path gets out of sync with the compiler path. 

 

Edited by Pat Foley
typo

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

×