Jump to content
microtronx

Delphi Rio IDE hangs again and again

Recommended Posts

45 minutes ago, Lorenzo B said:

... Even when working with affinity set on a single processor sometimes (about once out of 10) using debugging, the system stopped completely forcing me to forcefully turn off the PC.

...

If you had to power off the computer, I would suspect hardware. While I do see frozen IDE +- two times a week, I have never to reboot PC - it is enough to run Task Manager and kill BDS there.

 

Did you move some components from the old PC to the new one? Harddisk? Network card...?

Share this post


Link to post

I would suggest turning off features one at a time to try to isolate the issue.  It is very likely related to your code, but it doesn't mean the code is incorrect.  Cyclic references can can cause issues.  I would try  disabling error insight, and turn off code insight or increase the delay and see if that helps.

Share this post


Link to post
14 minutes ago, Vandrovnik said:

If you had to power off the computer, I would suspect hardware. While I do see frozen IDE +- two times a week, I have never to reboot PC - it is enough to run Task Manager and kill BDS there.

 

Did you move some components from the old PC to the new one? Harddisk? Network card...?

No it's a completely new laptop, it has nothing in common with the old one! However, even my colleague who works on a different laptop (also as a brand) has the same problem, the PC freezes completely during the debug initialization phase, it is not possible to use CTRL + DELETE to kill the BDS task, everything is blocked and you need to restart!

Share this post


Link to post
18 minutes ago, Larry Hengen said:

I would suggest turning off features one at a time to try to isolate the issue.  It is very likely related to your code, but it doesn't mean the code is incorrect.  Cyclic references can can cause issues.  I would try  disabling error insight, and turn off code insight or increase the delay and see if that helps.

I can also agree with you in thinking that it may depend on something in my code. I've thought about it several times, but I can't understand what it can be. Almost all of my programs are made up of a main program (EXE), a common package that is linked directly by the main program and "n" other packages, that are loaded dynamically when the program starts. So I suppose that if the problem exists, it must be looked for either in the main program or in the common package, because the other packages do not yet exist in the phase in which the debugger crashes (maybe???).
Sorry I'm not clear what you mean when you say to disable "error insight" and "code insight" and increase the delay?!

However the structure I use is the same as when I was working with Delphi 7, but with that version I have never had these problems!

Edited by Lorenzo B

Share this post


Link to post
On 3/20/2020 at 8:18 AM, microtronx said:

I have nothing special installed:

- DDevExtensions now uninstalled

- GExperts installed but using only RegEx-Search and Replace

- TSI Language

- MadExcept

 

I had some similar issues with 10.3.3 and GExperts so I uninstalled it.  I couldn't reproduce the issue but haven't after uninstalling GExperts I haven't experienced the hanging IDE.  Could be coincidental as it was seemingly random hangs.

Share this post


Link to post
1 hour ago, Lorenzo B said:

I can also agree with you in thinking that it may depend on something in my code. I've thought about it several times, but I can't understand what it can be. Almost all of my programs are made up of a main program (EXE), a common package that is linked directly by the main program and "n" other packages, that are loaded dynamically when the program starts. So I suppose that if the problem exists, it must be looked for either in the main program or in the common package, because the other packages do not yet exist in the phase in which the debugger crashes (maybe???).
Sorry I'm not clear what you mean when you say to disable "error insight" and "code insight" and increase the delay?!

However the structure I use is the same as when I was working with Delphi 7, but with that version I have never had these problems!

Go to Tools - Options - select the Editor Options - Code Insight treeview item (at least this is the path in Berlin).  You will then see the features I am referring to.

Share this post


Link to post

Try to temporarily turn off as many third-party applications and services as possible before starting Rad Studio (including antivirus, windows defender, keyboard layout switches, and anything that can work with the clipboard, if they are installed on your computer) and check the program after that

Share this post


Link to post

In my case, I try to have not more than 2-3 units/forms open at the same time and i try to restart Delphi after a debug sessions. This + disabling Livebinding helps a lot!

Share this post


Link to post
On 4/1/2020 at 8:47 AM, Lorenzo B said:

Ok I will try to follow your advice!
Thanks

I tried to leave only one unit loaded in the IDE and antivirus disabled, but Delphi blocked the system anyway.
As components in the IDE I only have CnPack and MMX, but I have the same problem even if I uninstall them.
For me perhaps my problem lies in the structure of my project that uses runtime packages.
The structure has this tree:

 

         Main (folder):

                            Prog.exe

                           Common.BPL (static link)

                           Plugins (folder):

                                                     Plugin1.BPL (loaded at runtime)

                                                     Plugin2.BPL (loaded at runtime)

                                                     PluginN.BPL (loaded at runtime)

 

Every plugin has in the "searchpath" the Main folder to see the Common.BPL (this package contains all the structures that must be accessible from all other modules).

 I have to launch the debug using the module or program that I have to debug, but problem occurs however regardless of which position I choose (whether using the Prog.Exe, the Common or a plugin package).

 

Is there anyone who uses runtime packages applications but has never had this kind of problem, what kind of structure do you use?

 

thanks

 Lorenzo

Share this post


Link to post

You can also try playing around with the setting "Link with runtime packages" in "Project options" -> "Packages" -> "Runtime Packages"

Share this post


Link to post
15 hours ago, Vandrovnik said:

Can you compile to one big .exe for debugging and to packages only for release?

 

Yes the thing is simple for the common module that is loaded statically, the problem is dynamic modules, being plug-in modules, in the code there is a particular structure to load and allocate them that would no longer work if I eliminated the "Link with Runtime packages" management and I would have to make heavy changes to the program (that at the moment I am not even clear how to do), in order to be able to work in debug.
Unfortunately it seems that there is no possibility to use the LoadPackage function if the program is not set to work in "Link with Runtime packages".

 

14 hours ago, Dinar said:

You can also try playing around with the setting "Link with runtime packages" in "Project options" -> "Packages" -> "Runtime Packages"

In this section it seems to me that I can't do much, in the list of modules I only have VCL, RTL and my common module.

Share this post


Link to post

I hate it when this happens:

Unbenannt.thumb.PNG.d84ce1905f8cd9964cc16f852fb8493c.PNG

 

Now work of 40 minutes is lost again. I realy hate it!

Share this post


Link to post
18 minutes ago, Lars Fosdal said:

Losing 40 minutes of work should be impossible in Rio.

image.png.63cc3d15dd202f46587d3cce30ff64cd.png

In last case i had no saved files ... don't know why but IDE has not asked my on restart for autorecovering files found ... Normally I click a lot to "Save All" button but in this case it was a complicated project and i forgot this.

I will try to setup the interval to 1 minute, lets see if it helps next time ... or hope 10.4 will not have these problems with such memory consumption ...

Share this post


Link to post

I press Ctrl-S waaay to often, even with the autorecover enabled.

The habit is caused by working in an IDE that has a bad tendency of locking up or suddenly go dying.

Share this post


Link to post

I always make sure the IDE AutoSave options for both Editor and Project are enabled and find that I compile often enough to validate my changes that loss of significant work is usually not a problem.

Share this post


Link to post
Guest

I do feel like Lorenzo B.

 

Seattle has been completely unusable. I went and bought some parts and put together a gaming PC two months ago and switched to Hyper-V. Much better when it comes to excessive repainting in the IDE but still it sucks to have to restart the IDE several times a day.

 

I have looked at DX skins, i have lowered the number of visual inheritance levels, i have broken huge parts out to frames, i have turned off live bindings, i have manually edited desktop setting files to reduce repainting between debug-edit cycles. And so on and so forth.

 

One part of this problem is the repainting and refreshing of forms, and it seems that DevExpress skinning and some other concepts (the ribbon with all it's collections) increases the woes.

 

I realised that upgrading to Rio would not help. Now i'm hoping for 10.4 but since IDE/RAD/Forms handling is not mentioned anywhere specifically i do not have high hopes.

 

However - there is a "Language Server" mentioned. Perhaps i can edit code in VC and do the "RAD" in the IDE. The IDE, however, is not good at loading files that changed on disk. I do like to use Visual Code though.

 

It's almost ironical to read Lars saying that he moved from "visual" to "dynamic" coding. I went the other way around actually with this new project because i wanted to benefit from all the designers and stuff VCL/DX has. Well, i'm very happy with the project per se but the IDE is killing me softly.

Share this post


Link to post

I think the most problems and hangers occur because of too much memory consumption of code-insight etc. I hope, with 10.4 and Language Server this will not happen any more. 

 

Hope dies last!

Share this post


Link to post
15 minutes ago, Vandrovnik said:

64 bit IDE would probably require all design time packages to be 64 bit, too...

Sure. But so what?

Share this post


Link to post

VS is 32-bit. I bet MS would like for it to be 64-bit as well.

We'll get there, eventually.

 

VS Code is 64-bit, but that's just an editor and it is Electron-based.

 

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

×