__do_global_ctors segfault在项目中的某个地方,无法找到它 [英] __do_global_ctors segfault somewhere in project, cant locate it

查看:209
本文介绍了__do_global_ctors segfault在项目中的某个地方,无法找到它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将一个项目从Qt4迁移到Qt5,它编译,但应用程序崩溃之前,甚至到达主要功能。我知道有一个null值,在某些时候乱搞的东西,也许一个文件,不能找到或什么,但有这么多的.cpps和.h和库,它很难找到错误的来源,我不能设置任何断点。我有很多调试数据,所以也许任何你可以指导我在正确的方向。

I migrated a project from Qt4 to Qt5, and it compiles and everything but the application crashes before it even reaches the main function. I know there is a null value that fucks up something at some point, maybe a file that cant find or something, but there are so many .cpps and .h and libraries that its pretty hard to locate the source of the error plus I cant set any breakpoints. I have a lot of debugging data so maybe any of you can guide me in the right direction. I dont know what I would be doing without stack overflow honestly, so thankyou in advance.


当调试时,我得到不同的崩溃:

When debugging I get different crashes:


每种情况下的堆栈都显示不同的崩溃,但是它们都有一些共同点,这是 __ do_global_ctors thingy,我已经研究,显然它与构造函数有关,但我不知道我应该寻找什么。

如果我错过任何信息,请问。

The stack in each case shows different crashes, but all of them have something in common, which is this __do_global_ctors thingy, I have researched and apparently it has to do with constructors, but I have no idea what I should be looking for.
if I missed any info please do ask. I hope someone can enlighten me, I am so so close to get this working.

推荐答案

我成功地解决了这个问题,我希望有人能够启发我,重新编译所有的库到Qt5,并确保程序所涉及的所有cpps是Qt5太。还要仔细检查链接。我以为我做了,但显然我错过了一个图书馆。

I managed to solve the issue by thoughtfully re-compiling all the libraries to Qt5 and making sure all the cpps that the program refered were Qt5 too. Also double-checked the linkings. I thought I had done it but apparently I missed one library.

请注意,有些库需要迁移,还有其他库可以直接使用Qt5下载和编译。如果您遇到相同的问题,请确保在自己迁移之前没有该库的Qt5版本。

Mind that some libraries need to be migrated and there are others that you can download and compile directly with Qt5. If you are having this same problem make sure that there are no Qt5 versions of that library before migrating them yourself.

这篇关于__do_global_ctors segfault在项目中的某个地方,无法找到它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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