我的32位C ++应用程序在64位Windows操作系统上崩溃。这个相同的exe在32位Win上工作正常。 [英] My 32 bit C++ application is crashing on 64 bit windows OS. This same exe works fine on 32bit Win.

查看:132
本文介绍了我的32位C ++应用程序在64位Windows操作系统上崩溃。这个相同的exe在32位Win上工作正常。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

崩溃是随机发生的。有时exe运行一天,有时只运行几分钟。应用程序生成一个迷你崩溃转储,我试图用WinDbg理解它,它给了我一个调用堆栈:

ChildEBP RetAddr Args to Child

082fc084 6f7953a2 082fc0ec 76ed6ff0 c17d5131 ntdll! ZwWaitForSingleObject + 0x15

警告:堆栈展开信息不可用。以下帧可能是错误的。

082fc09c 76f11194 000022a8 00004e20 00000000 mscorwks + 0x53a2

082fc0b4 76f11148 000022a8 00004e20 00000000 kernel32!WaitForSingleObjectExImplementation + 0x75

082fc0c8 6f99e37d 000022a8 00004e20 bf428143 kernel32!WaitForSingleObject + 0x12

082fc0f8 6f99e8c7 000022a8 00004e20 bf42840f mscorwks!LogHelp_LogAssert + 0x2ba6e

082fc5b4 6f9a1064 0000229c 000022a8 000022a0 mscorwks!LogHelp_LogAssert + 0x2bfb8

082fccf8 6f9a16a3 082fce78 00000004 00000000 mscorwks!LogHelp_LogAssert + 0x2e755

082fcd38 6f9df5f2 082fce78 00000004 082fce78 mscorwks!LogHelp_LogAssert + 0x2ed94

082fcd5c 6f9e4267 00000000 00000004 082fce78 mscorwks!GetAddrOfContractShutoffFlag + 0xa296

082fcdb4 6f9e4313 082fce78 082fce48 76f50303 mscorwks!GetAddrOfContractShutoffFlag + 0xef0b

082fcdc0 76f50303 082fce78 bfbf17f2 00000000 mscorwks!GetAddrOfContractShutoffFlag + 0xefb7

082fce48 779274ff 082fc e78 779273dc 00000000 kernel32!UnhandledExceptionFilter + 0x127

082fce4c 082fce78 779273dc 00000000 082ffa04 ntdll!__ RtlUserThreadStart + 0x62

082ffa04 778e9f45 000f3b30 00c7a4e0 ffffffff 0x82fce78

082ffa1c 00000000 000f3b30 00c7a4e0 00000000 ntdll!_RtlUserThreadStart + 0x1b



我是WinDbg的新手,任何人都可以帮我解决这个崩溃问题,或者指导我如何使用这个调用堆栈地址找出问题区域?

The crash happens randomly. sometime exe runs for a day and sometimes for few minutes only. Application generates a mini crash dump, I tried to understand it with WinDbg and it gives me a call stack:
ChildEBP RetAddr Args to Child
082fc084 6f7953a2 082fc0ec 76ed6ff0 c17d5131 ntdll!ZwWaitForSingleObject+0x15
WARNING: Stack unwind information not available. Following frames may be wrong.
082fc09c 76f11194 000022a8 00004e20 00000000 mscorwks+0x53a2
082fc0b4 76f11148 000022a8 00004e20 00000000 kernel32!WaitForSingleObjectExImplementation+0x75
082fc0c8 6f99e37d 000022a8 00004e20 bf428143 kernel32!WaitForSingleObject+0x12
082fc0f8 6f99e8c7 000022a8 00004e20 bf42840f mscorwks!LogHelp_LogAssert+0x2ba6e
082fc5b4 6f9a1064 0000229c 000022a8 000022a0 mscorwks!LogHelp_LogAssert+0x2bfb8
082fccf8 6f9a16a3 082fce78 00000004 00000000 mscorwks!LogHelp_LogAssert+0x2e755
082fcd38 6f9df5f2 082fce78 00000004 082fce78 mscorwks!LogHelp_LogAssert+0x2ed94
082fcd5c 6f9e4267 00000000 082fce78 00000004 mscorwks!GetAddrOfContractShutoffFlag+0xa296
082fcdb4 6f9e4313 082fce78 082fce48 76f50303 mscorwks!GetAddrOfContractShutoffFlag+0xef0b
082fcdc0 76f50303 082fce78 bfbf17f2 00000000 mscorwks!GetAddrOfContractShutoffFlag+0xefb7
082fce48 779274ff 082fce78 779273dc 00000000 kernel32!UnhandledExceptionFilter+0x127
082fce4c 082fce78 779273dc 00000000 082ffa04 ntdll!__RtlUserThreadStart+0x62
082ffa04 778e9f45 000f3b30 00c7a4e0 ffffffff 0x82fce78
082ffa1c 00000000 000f3b30 00c7a4e0 00000000 ntdll!_RtlUserThreadStart+0x1b

I'm new to WinDbg, can anyone help me out with this crash, or guide me how to use this call stack addresses to figure out problem areas?

推荐答案

赔率是32位的崩溃,你只是没有看到它... x64演示可能是由不同造成的堆碎片/返回/初始化方法或该操作系统中的并行执行策略更改 - 我说了很多32-> 64迁移经验



这是调试 - 要么在WinDbg中进一步向下走(也没有你的代码)或者远程使用Visual Studio来捕获崩溃 - 在这两种情况下,确保你已经加载了MS符号 - 使堆栈跟踪更有用 - Symbol Server [ ^ ]



尝试关闭优化,特别是调试,这有助于简化调试
odds are the crash IS there in 32bit, you just haven't seen it ... the x64 presentation is probably caused by different heap frag/return/initialisation methods or "parallel execution strategy" changes in that OS - i speak from a lot 32->64 migration experience

It's down to debugging - either walk the stack further down (there's none of your code on it) in WinDbg or use Visual Studio remotely to catch the crash - in both situations, ensure you've got MS Symbols loaded - makes the stack trace more useable - Symbol Server[^]

Try turning optimisation off too, specifically for debug, that helps to make the debugging easier


这篇关于我的32位C ++应用程序在64位Windows操作系统上崩溃。这个相同的exe在32位Win上工作正常。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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