主题 : Qt-embedded 4.xx 运行出现 Segmentation Fault 段错误的解决办法 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 4162
精华: 2
发帖: 41
金钱: 320 两
威望: 122 点
贡献值: 11 点
综合积分: 122 分
注册时间: 2009-03-01
最后登录: 2015-09-12
楼主  发表于: 2009-09-11 22:50

 Qt-embedded 4.xx 运行出现 Segmentation Fault 段错误的解决办法

管理提醒: 本帖被 kasim 执行加亮操作(2009-10-15)
很多朋友在移植Qt-embedded 4.xx的时候都使用了友善之臂公司提供的交叉编译器,

虽然Qt与Qt应用程序都编译成功,但运行Qt应用程序时却经常会出现段错误(Segmentation Fault),

可以尝试使用openmoko(一个开源手机项目)提供的编译器,同样是EABI,版本为4.1.2

http://www.qtopia.net/modules/mydownloads/singlefile.php?lid=38

经测试,运行Qt应用程序时不会出现段错误(Segmentation Fault)

详细的移植步骤见本人的博客:
移植Qt-embedded 4.5.2 for mini2440

good luck!
[ 此帖被风城少主在2010-05-26 11:50重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2009-09-12 08:04
经典的Segmentation Fault
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 8508
精华: 0
发帖: 3
金钱: 30 两
威望: 15 点
贡献值: 0 点
综合积分: 6 分
注册时间: 2009-08-26
最后登录: 2009-09-30
2楼  发表于: 2009-09-15 16:58
   希望 能行 试试看! 被段错误困扰多日!
级别: 新手上路
UID: 1303
精华: 0
发帖: 35
金钱: 220 两
威望: 60 点
贡献值: 0 点
综合积分: 70 分
注册时间: 2008-08-14
最后登录: 2020-09-30
3楼  发表于: 2009-09-17 08:51
LZ 你的Qt/E-4.5.2 有编译过吗,我编译时出现下列错误,望指点指点,谢谢
<built-in>:0: note: candidates are: void* operator new(unsigned int)
make[1]: *** [.pch/release-shared-emb-arm/QtCore.gch/c++] 错误 1
make[1]: Leaving directory `/opt/qte-4.5.2/src/corelib'
make: *** [sub-corelib-make_default-ordered] 错误 2
级别: 侠客
UID: 4162
精华: 2
发帖: 41
金钱: 320 两
威望: 122 点
贡献值: 11 点
综合积分: 122 分
注册时间: 2009-03-01
最后登录: 2015-09-12
4楼  发表于: 2009-09-17 12:23
编译通过啦!今晚再贴我的配置参数出来~~
级别: 新手上路
UID: 1303
精华: 0
发帖: 35
金钱: 220 两
威望: 60 点
贡献值: 0 点
综合积分: 70 分
注册时间: 2008-08-14
最后登录: 2020-09-30
5楼  发表于: 2009-09-17 14:10
期待中
级别: 新手上路
UID: 5828
精华: 0
发帖: 34
金钱: 250 两
威望: 158 点
贡献值: 0 点
综合积分: 68 分
注册时间: 2009-05-10
最后登录: 2013-06-28
6楼  发表于: 2009-10-18 07:38
不错,试一试!Thanks
级别: 新手上路
UID: 5828
精华: 0
发帖: 34
金钱: 250 两
威望: 158 点
贡献值: 0 点
综合积分: 68 分
注册时间: 2009-05-10
最后登录: 2013-06-28
7楼  发表于: 2009-10-18 21:34

 (未解决)移植QT4.5出现错误"Segmentation fault",请问是什么原因?

../../include/QtCore/../../src/corelib/tools/qlist.h:54:15: error: new: 没有那个文件或目录
../../include/QtCore/../../src/corelib/tools/qlist.h: In member function ‘void QList<T>::node_construct(QList<T>::Node*, const T&) [with T = QString]’:
../../include/QtCore/../../src/corelib/tools/qlist.h:426:   instantiated from ‘void QList<T>::append(const T&) [with T = QString]’
../../include/QtCore/../../src/corelib/tools/qstringlist.h:70:   instantiated from here
../../include/QtCore/../../src/corelib/tools/qlist.h:341: error: no matching function for call to ‘operator new(unsigned int, QList<QString>::Node*&)’
<built-in>:0: note: candidates are: void* operator new(unsigned int)
../../include/QtCore/../../src/corelib/tools/qlist.h: In member function ‘void QList<T>::node_copy(QList<T>::Node*, QList<T>::Node*, QList<T>::Node*) [with T = QString]’:
../../include/QtCore/../../src/corelib/tools/qlist.h:618:   instantiated from ‘QList<T>& QList<T>::operator+=(const QList<T>&) [with T = QString]’
../../include/QtCore/../../src/corelib/tools/qstringlist.h:85:   instantiated from here
../../include/QtCore/../../src/corelib/tools/qlist.h:360: error: no matching function for call to ‘operator new(unsigned int, QList<QString>::Node*)’
<built-in>:0: note: candidates are: void* operator new(unsigned int)
make[1]: *** [.pch/release-shared-emb-arm/QtCore.gch/c++] 错误 1
make[1]: Leaving directory `/root/work/qt-embedded-linux-opensource-src-4.5.2-arm/src/corelib'
make: *** [sub-corelib-make_default-ordered] 错误 2
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2009-10-19 11:37
../../include/QtCore/../../src/corelib/tools/qlist.h:54:15: error: new: 没有那个文件或目录

去看这个文件的这一行,为什么编译器跟你说"没有那个文件或目录"
顺便说一句,不要用中文的编译器信息输出,不伦不类的
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 8622
精华: 0
发帖: 34
金钱: 215 两
威望: 67 点
贡献值: 0 点
综合积分: 68 分
注册时间: 2009-08-30
最后登录: 2017-09-13
9楼  发表于: 2009-10-19 22:08
应该是QWS_SIZE设置的问题,我有一个程序QWS_SIZE=320x240的时候可以运行,然后设置为QWS_SIZE=320x480就报段错误了