我的应用中来自组件的非常奇怪的错误 [英] Very strange error in my app from component

查看:109
本文介绍了我的应用中来自组件的非常奇怪的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我的应用程序会执行它应该做的所有事情,并且每次都执行相同的操作,因此不会像测试那样麻烦了。

Ok my application does everything that is it suppeded to do and it does the same thing every time so its not as if testing was gone be that much trouble.

它并不总是崩溃 somtimes。当我将鼠标悬停在我最近输出的打开文件对话框中的文件上时,它会执行此操作。它不会立即等待大约半秒到一秒钟,我知道那是openfile对话框何时显示诸如文件大小,何时创建以及它是什么类型的文档之类的数据。(标准)鼠标悬停信息。这是使用 opendialog,我没有写这段代码,所以这个错误不是我的意思吗?如果是这样,那么,如果不是,我该怎么做才能阻止它。.

it crashes "somtimes" not always. it does this when i hover the mouse over a file in the open file dialog i have recently outputted. not instantly it waits about half second to a second, and i know that is when the openfiledialog brings up data such as file size and when it was created and what type of document it is..(standard)mouse hover info.. the thing is this is using the "opendialog" and i didnt write this code so this error is not of my doing is it?????? if it is how,, if it is not how/what can i do to stop it..

错误的类型是访问地址处违反bla。 ..

the type of error is a "acces violation at address " bla...

打开文件对话框没有过滤器,完全与组件托盘中的内容相同,在我调用 opendialog.execute之后崩溃了。

the open file dialog has no filters and is exactly as it off compoent tray and it crashes after i call "opendialog.execute"

我最初以为它可能仍在写入该文件,但是在我停止应用程序打开任何新文件直到最后一个文件完成了保存过程之后,它继续进行。

i initialy thought that it may still be writing to it but then it continued after i stoped the app opening any new file untill the last one had compleated the save process.

正如我所说的,它一直都不会100%发生,而且不是特定于机器的..在3种不同的Win XP计算机上崩溃。

as i said it doesnt even happen 100% all the time,, and its not machine specific.. crashes on 3 different win xp pc's.

帮助!!

其他;发现我可以打开并运行该文件,并且只要我不在创建的文件上弹出提示框就可以了。

Additional; findings i can open and run the file and all is well as long as i dont make a hint box to pop up on a file i have created.

推荐答案

在表单上放置一个 TApplicationEvent 组件,并为 OnHint 事件添加一个事件处理程序。然后在该处放置一个断点,看看是否可以在它崩溃之前就将其断开(如您所说,尝试显示提示时听起来好像在崩溃)。然后,您可以使用调试DCU 进行编译并进行跟踪,看看它崩溃了。

Drop an TApplicationEvents component on your form and add an event handler for the OnHint event. Then put a break point in there and see if you can break on that before it crashes (as you said, it sounds like it is crashing when it tries to display the hint). Then you can compile with debug DCU's and trace in and see what it is crashing on.

我的猜测是您仍然有一个文件在文件上使用排他锁进行处理。检查文件句柄,并确保正确关闭它们。如果您尝试在程序运行时从记事本中打开其中一个文件,会发生什么情况?

My guess is you still have a file handle with an exclusive lock on the file maybe. Check your file handles and make sure you are properly closing them. What happens if you try to open one of those files from notepad while the program is running?

间歇性行为可能与其他情况有关错误状态下的代码路径会导致文件句柄泄漏。

The intermittent behavior might be related to a different code path on an error condition that leads to a leaked file handle.

祝您好运!

这篇关于我的应用中来自组件的非常奇怪的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆