使用 TSQLConnection.SetTraceEvent 时堆栈损坏?
我有一个多线程应用程序,其中为每个线程创建新的 TSQLConnection 。如果我尝试使用跟踪(TSQLConnection.SetTraceEvent 或 TSQLMonitoring),我会按预期获得跟踪结果,但之后当我尝试使用任何数据库功能时,主线程似乎会陷入困境。应用程序抛出异常“0x004dffcf 处的访问冲突:写入地址 0xffffffff2”,IDE 中的调用堆栈显示重复的行“7c90327a ntdll.RlConvertUlongToLargerInteger + 0x3c”和“7c90e48a ntdll.KiUserExceptionDispatcher + 0xe”,最上面一行是“Controls.读取控件名称(???)”。
那么,跟踪功能是否有错误并且不适用于多线程应用程序,或者我的应用程序中是否存在隐藏的错误?如何找出?
我正在使用 Delphi 2007。
编辑 看起来即使在主线程中有两个单独的连接也会引发异常。我将尝试创建测试应用程序。
I've multithreaded application where new TSQLConnection is created for each thread. If I try to use tracing (TSQLConnection.SetTraceEvent or TSQLMonitoring) I get the trace results as expected, but after that the main thread seems to beserk when I try to use any database functionality. Application throws excpetion "access violation at 0x004dffcf: write of address 0xfffffff2" and the call stack in IDE shows repeating lines of "7c90327a ntdll.RlConvertUlongToLargerInteger + 0x3c" and "7c90e48a ntdll.KiUserExceptionDispatcher + 0xe", and the top line is "Controls.ReadControlName(???)".
So, is the tracing function buggy and doesn't work with multithreaded application or is there hidden bug in my application? How to find out?
I'm using Delphi 2007.
Edit It looks like the exception is raised even with two separate connection in main thread. I'll try to create test application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题解决了,我加载了旧版(显然有缺陷的)InterXpress 驱动程序,我只是没有意识到这是问题的一部分。
Problem solved, I had old (and apparently buggy) version of InterXpress driver loaded, I just didn't realize that it is part of the problem.