Program freezes but the CPU utilization is zero

三世轮回 提交于 2019-12-01 02:38:37

I am making progress here! I have found a similar issue in a program of mine. The freeze appears when I try to load a large text (over 100000) in a custom list box because of this code:

MyListBox.Items.Text:= xxx;


procedure TMyListBox.LBADDSTRING(var M: TMessage);   { This makes the control slow when I work with 100000 lines }
begin
 inherited;
 if Assigned(FOnChange)
 then FOnChange(Self, lbAdded);
end;

The execution point runs through LBADDSTRING for every line (100000 times). So, it seems frozen.

Odd is also the fact, that if I pause the program, Delphi cannot accurately show the execution point for my program (I checked all 5 threads). So, all this is in the end a Delphi debugger flaw.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!