#1 2024-05-11 22:18:26

Lauri
Member
From: Under a rock
Registered: 2020-12-05
Posts: 25

Delphi debugger crash when inspecting DocVariant

Hi!

Moving another subject from e-mail to here.

ab wrote:

Delphi 7 debugger should work with a DocVariant, but it is likely to be a Delphi bug, not a mORMot issue. The Delphi 7 IDE has already troubles with our units, and is crashing for now reason. Lazarus is very stable, but the Delphi IDE is not stable. Even the latest versions of Delphi are crashing on a regular basis.

Hmm.. for mORMot v1, this was the case for me as well. The main unit was just too big.
However, mORMot v2 was much better in early versions and at least v2.2 has not caused *any* out-of-the-blue crashes. Perhaps this is because i have put all mormot.* units into one runtime package and removed any source files from compile path. I do this way for all components because it helps make builds much faster.

But there is a sure way to crash (and the reason for this posting) -- each time i (often accidentally) move cursor over a variant that contains a DocVariant, the IDE tries to get it's current value but instead hangs and crashes.

I was wondering, it this caused by something in my specific configuration or is this the case for everyone who is still using Delphi version 7?
Does someone here know of a workaround perhaps?
Can newer versions of Delphi inspect a DocVariant value?

Offline

#2 2024-05-12 13:50:27

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Delphi debugger crash when inspecting DocVariant

Since Delphi 2007, the IDE stability did increase, from my tests.
If you can, you may try to switch from Delphi 7 to Delphi 2007.
You will also gain function inlining, which is the greatest performance boost in Delphi since decades.

But Lazarus is the kind of stability for sure. It can run for days with no issue.

Offline

#3 2024-05-18 08:40:28

flydev
Member
From: France
Registered: 2020-11-27
Posts: 73
Website

Re: Delphi debugger crash when inspecting DocVariant

@Lauri I didn't tested on Delphi 2007, but the bugs are still there in Delphi 10, 11 and 12, and only if an invalid variant value exist.

If the variant is valid, you can inspect it and move your mouse hover it, but if you are stepping through code and move cursor hover an invalid variant, the IDE hang and you have to kill it; Killing LSP process only do not work.

The only way I found to avoid the crash, is to move the cursor out of the IDE and starting debugging using keyboard's shortcuts, inspector will show variant (valid/invalid) values. Also, when an AV is triggered, use the keyboard, not the mouse.

That doesn't happen in Lazarus. Years of frustration yes, but if there was only this issue, we could live with it **clown emoji here**

Last edited by flydev (2024-05-18 13:37:51)

Offline

Board footer

Powered by FluxBB