IDE freezes with background compile

delphi package - automated exception handling
Post Reply
rsassen
Posts: 24
Joined: Fri Jun 20, 2014 2:41 pm

IDE freezes with background compile

Post by rsassen »

Hello,

When I enable madExcept for my C++ VCL Forms project and run a background compile, the IDE freezes when the Messages window is not already open in the IDE. The only way to close the IDE is by killing it the Windows task manager.

I have a special setup for my project which causes madExcept to produce some warnings (e.g. [madExcept Warning] Please add "madListModules" to the project file) in the Messages Build window when starting the background compile. I suspect this may be causing the IDE to freeze when the Messages window is not already open.

It only seems to happen if the Messages window (menu View - Tool Windows - Messages) has not been opened at all since the starting of the IDE. If the Message window was open and is closed before the start of the background compile, the problem does not appear.
So to reproduce, in the default saved desktop for the IDE make sure the Messages window is closed and restart the IDE before doing the background compile.
The problem does not appear with a normal compile (e.g. the compile that is triggered when trying to run an changed project).

I'm currently using the latest madExcept (madCollection 2.8.9.1) in C++ Builder Sydney R1 patch 1, but also encountered it in older versions of madExcept and RadStudio (e.g. Tokyo).

FYI, before I found out enabling madExcept was the trigger for the freeze, I reported this with Embarcadero: https://quality.embarcadero.com/browse/RSP-31303.

If you need any more info, please let me know.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: IDE freezes with background compile

Post by madshi »

This very much sounds like a bug in the IDE, where when madExcept calls an API to add a message to the "Messages" window, the IDE freezes/crashes.

Of course we can try to find a workaround. One option would be to tell madExcept to no longer add messages to the "Messages" window at all. But they might be useful in certain situations to notify you about real problems, no? So a better workaround might be to try to properly solve those "Please add "madListModules"" warnings?

Do you happen to know why madExcept thinks that it should post a warning about "madListModules"?
rsassen
Posts: 24
Joined: Fri Jun 20, 2014 2:41 pm

Re: IDE freezes with background compile

Post by rsassen »

I've not had a response on the ticket with Embarcadero yet, so I suggest to wait a bit for their response.
Have you tried this in a sample project and can you reproduce this, or might this be specific to my setup?

The reason I get these warning messages from madExcept is probably due to the way I include madExcept in my projects. I've created an MSBuild option set for madExcept with the include- and library paths for madExcept the project needs, and the madExcept libraries it needs to link. To add madExcept to a project, I now only have to include this option set in the project. We build our software using Jenkins, which does not have RadStudio or madExcept installed. Instead it finds the RadStudio and madExcept files it needs from an external system. We have many projects, and we don't update them all to a newer Rad Studio or madExcept version at the same time. This way our build server can build any of them. If you are interested, I can show you an example of our option set for madExcept. I suspect madExcept does not detect the madExcept libraries have already been added to the project, and thus issues a warning.
rsassen
Posts: 24
Joined: Fri Jun 20, 2014 2:41 pm

Re: IDE freezes with background compile

Post by rsassen »

FYI, I have updated the Embarcadero ticket RSP-31303 with a sample project, including my IDE settings, desktop settings and madExcept settings.

Edit: Embarcadero was able to reproduce it using this sample project, I'm awaiting further info.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Re: IDE freezes with background compile

Post by madshi »

Sounds good, hopefully they can provide an easy fix?
Post Reply