调试时如何在线程退出时闯入代码

调试时如何在线程退出时闯入代码

本文介绍了调试时如何在线程退出时闯入代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello

由于这些错误存在令人讨厌的错误,我的服务正在终止:

My service is terminating due to a nasty bug with these errors:

线程0x588已退出,代码为0 (0x0)。

线程'Win32 Thread'(0x588)已退出,代码为0(0x0)。

线程'Win32 Thread'(0xa78)已退出代码-1073740791(0xc0000409)。

线程'Win32 Thread'(0xfd0)已退出,代码为-1073740791(0xc0000409)。

// etc

The thread 0x588 has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x588) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xa78) has exited with code -1073740791 (0xc0000409).
The thread 'Win32 Thread' (0xfd0) has exited with code -1073740791 (0xc0000409).
//etc

程序'[2584] MyService.exe:Native'已退出,代码为-1073740791(0xc0000409)。

程序'[2584] MyService.exe:Managed'已退出代码为-1073740791(0xc0000409)。

The program '[2584] MyService.exe: Native' has exited with code -1073740791 (0xc0000409).
The program '[2584] MyService.exe: Managed' has exited with code -1073740791 (0xc0000409).

我可以进入第一个以某种方式退出的线程吗?调试会话即将退出。

Can I break into the first thread that quits somehow? The debugging session just quits.

 

TIA

 

 

 

推荐答案

感谢你的帖子!

如果你的项目是多线程的,你可以打开Threads窗口(Debug - > Windows - > Threads)并切换在你的线程中。但我怀疑如果这些线程不是由我们创建的,您可以查看源代码。幸运的是,您可以从Visual Studio IDE中显示反汇编
和View Register值。

If your project is multi-threaded, you could open the Threads window (Debug -> Windows -> Threads) and switch among your threads. But I doubt you could view the source code if those threads are not created by us. Fortunately, you could show the disassembly and View Register value from Visual Studio IDE.

我可以问是否有任何错误消息?为什么你认为这些线程中存在错误? Basicaly,错误代码0xc0000409表示系统检测到应用程序中基于堆栈的缓冲区溢出。为了解决问题并找到根本原因,你可以生成一个小项目或代码片段来重现问题吗?这对我们很重要。

Could I ask is there any error message? Why do you think it's a bug in those threads? Basicaly, error code 0xc0000409 indicates the system detects an overrun of a stack-based buffer in the application. To trouble shoot the issue and find the root cause, can you please generate a small project or a code snippet to reproduce the issue? This is important for us.

祝福


这篇关于调试时如何在线程退出时闯入代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 05:23