以下代码导致 Vista 机器上的间歇性崩溃。
using (SoundPlayer myPlayer = new SoundPlayer(Properties.Resources.BEEPPURE))
myPlayer.Play();
我高度怀疑是这段代码,因为程序在哔哔声中或每次播放哔哔声之前崩溃。我的应用程序域中的 all 和ThreadExceptions
around都有顶级陷阱,但没有一个会导致此崩溃。UnhandledExceptions
try-catch
Application.Run
有任何想法吗?
编辑:
事件查看器具有以下信息:
错误应用程序 [xyz].exe,版本 4.0.0.0,时间戳 0x48ce5a74,错误模块 msvcrt.dll,版本 7.0.6001.18000,时间戳 0x4791a727,异常代码 0xc0000005,错误偏移量 0x00009b30,进程 ID 0x%9,应用程序启动时间 0x %10。
有趣的是,HRESULT 0xc0000005
有这样的信息:
“读取或写入不可访问的内存位置。” (STATUS_ACCESS_VIOLATION)