[英]Thread locked in Delphi XE5 app
I have some random locks of my app apparently without a reason. 我的应用程序有一些随机锁,显然没有原因。
As I found on the embarcadero website I found some documentation that maybe was some thread waiting to be ended. 正如我在embarcadero网站上发现的那样,我找到了一些文档,也许是一些等待结束的话题。
When this happened I paused program execution from the IDE and went to the thread list. 发生这种情况时,我从IDE暂停了程序执行,然后转到线程列表。
I'm quite stuck on this. 我对此很困惑。 How can I move further?
我该如何进一步?
How can I move further?
我该如何进一步?
If your application is built with debug info, then you can double-click any thread and you'll be taken to the line of source with the problem. 如果您的应用程序是使用调试信息构建的,则可以双击任何线程,然后将您带到有问题的源代码行。 You'll also get a call stack telling you the chain of calls leading to the 'current line' in each thread.
您还将获得一个调用堆栈,告诉您导致每个线程中“当前行”的调用链。
Of course in your case, the Wait Chain provides excellent clues where to start investigating the problem. 当然,在您的情况下,“等待链”提供了从哪里开始调查问题的绝妙线索。 This is where things get tricky, and only you will be able to debug further, because only you have all the source code.
这是事情变得棘手的地方,只有您才能进一步调试,因为只有您拥有所有源代码。
But as an overview: 但作为概述:
WaitForSingleObject
or TEvent.Wait
or TThread.WaitFor
. WaitForSingleObject
或TEvent.Wait
或TThread.WaitFor
。
Likely problems include: 可能的问题包括:
try..finally
's correctly.) try..finally
。) In all the above cases, you need to understand your bug so that you can fix it. 在上述所有情况下,您都需要了解您的错误,才能对其进行修复。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.