程序冻结,但CPU利用率为零

编程入门 行业动态 更新时间:2024-10-25 18:36:53
本文介绍了程序冻结,但CPU利用率为零的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

有时我的程序死机了。如果我单击暂停程序,它将显示以下信息:

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

ntdll.RtlUserThreadStart: 773301C4 89442404 mov [esp+$04],eax 773301C8 895C2408 mov [esp+$08],ebx 773301CC E9E9960200 jmp $773598ba 773301D1 8DA42400000000 lea esp,[esp+$0000] 773301D8 8DA42400000000 lea esp,[esp+$0000] 773301DF 90 nop

调用堆栈窗口为空!

按三次F8键,程序跳转到

Pressing F8 three times, the program jumps to

ntdll.RtlInitializeExceptionChain: 7735989F 8BFF mov edi,edi

我无法按需复制它,但是每天看到一次问题(也许更少?)。 编译器/调试器以32位运行。

I cannot reproduce it on demand but I see the problem once per day (maybe less?). The compiler/debugger is running in 32 bit.

知道这是否是调试器问题吗?我过去遇到过类似的情况:有时,当您从Delphi应用程序运行外部应用程序时,调试器冻结。这是Delphi XE7的一个已记录错误。所以,我在想,也许这是一个类似/相关的错误?

Any idea if this is a debugger problem? I encountered something similar in the past: sometimes when you run an external application from your Delphi app, the debugger freezes. This is a documented bug for Delphi XE7. So, I am thinking, maybe this is a similar/related bug?

推荐答案

我在这里取得进步!我在我的程序中发现了类似的问题。由于以下代码,当我尝试在自定义列表框中加载大文本(超过100000)时,出现冻结:

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;

执行点通过LBADDSTRING每行(100000次)。因此,似乎冻结了。

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

奇怪的是,如果我暂停程序,Delphi无法准确显示程序的执行点(我检查了所有5个线程)。因此,所有这些最终都是Delphi调试程序的缺陷。

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.

更多推荐

程序冻结,但CPU利用率为零

本文发布于:2023-11-03 20:04:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1555963.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:利用率   为零   程序   CPU

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!