Program freezes but the CPU utilization is zero

后端 未结 1 707
忘掉有多难
忘掉有多难 2021-01-07 15:50

Sometimes my program freezes. If i click \'Pause program\' it shows me this:

ntdll.RtlUserThreadStart:
773301C4 89442404         mov [esp+$04],eax
773301C8 8         


        
1条回答
  •  悲哀的现实
    2021-01-07 16:25

    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.

    0 讨论(0)
提交回复
热议问题