我的应用程序中的组件出现了非常奇怪的错误 [英] Very strange error in my app from component

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

问题描述

好的,我的应用程序完成了它应该做的所有事情,并且每次都做同样的事情,所以好像测试没有那么麻烦.

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.

它并不总是有时"崩溃.当我将鼠标悬停在我最近输出的打开文件对话框中的文件上时,它会执行此操作.它不会立即等待大约半秒到一秒,我知道那是 openfiledialog 显示文件大小、创建时间以及文档类型等数据的时间..(标准)鼠标悬停信息.. 事情这是使用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.

推荐答案

在表单上放置一个 TApplicationEvents 组件并为 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天全站免登陆