Qt 跨线程初始化变量,程序奔溃(Error - RtlWerpReportException failed with status code :-1073741823.)
2017-05-11 09:38
831 查看
出现使用了未使用的内存问题,一般是弹出以下窗口:
![](https://oscdn.geek-share.com/Uploads/Images/Content/202009/05/870bb188ba1e4a0e3acfa576fdb8cec8)
以及输出窗口会显示以下内容:
首先可以明确出现该问题的原因是使用了未初始化的指针,应该要查找在哪里使用了野指针,然后解决即可。
而比较麻烦的情况是跨线程初始化变量问题,利用信号槽对另一个线程的变量进行初始化,而紧接着又对其进行connect,由于线程执行顺序问题,如果一个对象未被初始化而被connect,一般调试下会跳进qobject中报错,并且在报错中可以看到是关于connect的。
解决办法:
通过信号槽在A线程中对B线程的变量初始化时,在connect函数的第5个参数使用Qt::BlockingQuequeConnection 。
以及输出窗口会显示以下内容:
Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly Error - Failed to create the process C:\Windows\system32\WerFault.exe Error - StartCrashVertial failed
首先可以明确出现该问题的原因是使用了未初始化的指针,应该要查找在哪里使用了野指针,然后解决即可。
而比较麻烦的情况是跨线程初始化变量问题,利用信号槽对另一个线程的变量进行初始化,而紧接着又对其进行connect,由于线程执行顺序问题,如果一个对象未被初始化而被connect,一般调试下会跳进qobject中报错,并且在报错中可以看到是关于connect的。
解决办法:
通过信号槽在A线程中对B线程的变量初始化时,在connect函数的第5个参数使用Qt::BlockingQuequeConnection 。
相关文章推荐
- 有关Error - RtlWerpReportException failed with status code :-1073741823.的解决方法
- RtlWerpReportException failed with status code :-1073741823
- Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process
- Qt Windows 安装问题RtlWerpReportException failed with status code :-1073741823
- Qt error ------ 出现Error - RtlWerpReportException failed with status code :-1073741823. Will try to launch the process directly
- Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
- 在mac上用Xcode写程序, run的时候总是失败, 显示clang: error: linker command failed with exit code 1
- 解决Python扩展程序编译安装的error: command 'mt.exe' failed with exit status 31
- com.mongodb.MongoQueryException: Query failed with error code 13
- Jenkins 安装启动提示“iJob for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.”
- 在mac上用Xcode写程序, run的时候总是失败, 显示clang: error: linker command failed with exit code 1
- [SSIS 2005]SSIS Error The AcquireConnection method call to the connection manager failed with error code 0xC0202009
- Preverification failed with error code 1.
- Windows Server appfabric exception ErrorCode<ERRCA0016>:SubStatus<ES0001>
- error: command 'gcc' failed with exit status 1
- Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
- Qt Creator错误:“command failed with exit code 9009, 'cl' 不是内部或外部命令,也不是可运行的程序”
- 解决error: linker command failed with exit code 1类似的错误
- OCIEnvNlsCreate failed with return code -1 but error message text was not available.
- 安装了VS2010 sp1 后再安装ASP.NET MVC 3.0的问题(Final Result: Installation failed with error code: (0x80070643), "安装时发生严重错误 " (Ela)