Home > Software engineering >  Delphi freezing instead of throwing Access violation exception
Delphi freezing instead of throwing Access violation exception

Time:02-04

I'm facing an issue where instead of Dephi 11 generate Access violation when it should, it's freezing with high CPU usage and the only thing i can do is to force close the app process.

To simulate this issue i can use this code :

var test : array[1..2] of tstringlist;
begin
showmessage(test[2].Text);
end;

Of course i know this is a bugged code and it should thrown an Access violation as test[2] does not exists. But what happens is a freeze and here is what task manager shows : Delphi's process hangs on 100% of one core cpu.

Why this happens ? Is it a Delphi bug ?

enter image description here

CodePudding user response:

I could find out what is happening. On 'Native OS Exceptions', i don't know why, the Access violation was configured like this :

enter image description here

Once i change like the below image, the issue is fixed.

enter image description here

  •  Tags:  
  • Related