











0x7c92e4ff 处最可能的异常: 0xC0000008: An invalid handle was specified
遇到一个纠结的问题,先贴代码。
void mainwindow::browseNvFile() { QString fileName; fileName =QFileDialog::getSaveFileName(NULL,tr("Save File"), "E:/", tr("Exp Files (*.bin)")); fileName.trimmed(); if (!fileName.isEmpty()) { ui.ReadBtn->setEnabled(true); strBinFile = fileName; ui.NvLineEdit->setText(strBinFile); } }
每次运行到fileName =QFileDialog::getSaveFileName(NULL,tr("Save File"), "E:/", tr("Exp Files (*.bin)"));时就出现:0x7c92e4ff处最可能的异常:0xC0000008:An invalid handle。之后无论是点击“继续”或者“忽略”都能运行,直接找到工程目录下的exe文件也能正常运行,也就是说只在调试的时候才会出现这个错误。代码看来看去都没觉得有问题,然后找了两个人帮忙,都没找到原因,而且奇怪的是之前没问题的代码现在调试都有这个问题了。晕啊!!后来在别的机器上运行发现没有这个问题,于是“找到”了原因:我的Qt库有问题。于是换个Qt的库试试。
换了Qt的库之后又出现了一个问题:单独执行qmake时没有问题,但是编译程序执行qmake时就出现:系统无法找到指定的程序,可能调用的某个命令出问题了。继续换Qt的库。。。
换好之后,第二个问题解决了,第一个仍然存在,重装IDE。。。装完了,问题依旧存在。跟系统有关??换到我的笔记本上现在也存在这个问题了,而之前的都是没问题,很奇怪,问题依旧没有得到解决。先记录下来,找到了原因再更新。或者哪位可以帮忙解决。。。
有时候还真的老遇到一些奇怪的问题,qt用着用着就来句“qmake不是内部或外部命令”,环境变量并没有改变。但是重新设置一下环境变量就又好了。
续:
今天问题终于解决了,好吧,就满足下某人,“感谢高手--李亚科的帮助”,^_^。
后来用其他程序测试了下,排除了Qt的问题,也曾怀疑过360私自改了系统文件,不过这个后来也被排除了。调试代码,发现调用了Overlaycon.dll,而正是在该处抛出异常。话说,Overlaycon.dll是个神马东东呢?原来是装了wuala之后出现的,仔细想想,这个问题也确实是在装wuala之后才有的。于是卸载了wuala,意料之中,问题得到了解决。其实也用不着卸载wuala,只要卸载掉Wuala OverlayIcons就可以了。应该是wuala为了把自己的软件整合到 explorer中,而 GetSaveFileName 需要调用explorer,所以加载了 overlayicon.dll。 而这个dll竟然存在bug,所以就出现问题了。呃,回家整笔记本去。。。
- 无匹配