[Qt-interest] Why all my program run with error which compiled by qtopia-phone-4.2.1?

Kermit Mei kermit.mei at gmail.com
Wed Nov 11 07:14:21 CET 2009


On Wed, 2009-11-11 at 13:59 +0800, Kermit Mei wrote:
> Hello, I compiled qtopia-phone-4.2.1 on ubuntu9.04 with gcc/g++4.1.3.
> I compile my program like this:
> 
> $ qtopiamake -project
> Created Calendar.pro
> $ qtopiamake
> Cleaning out stale build files...
> Finding project files...
>   1 projects found.
> $ make
> ... (everything goes well) ...
> 
> Then I setup qvfb:
> kermit at kermit-desktop:~$ qvfb 
> Using display 0
> 
> After that, I run my program with the argument '-qws' like this:
> /****** show files ******/
> $ ls
> Calendar      Calendar.pro        dayview.h  Makefile.target
> calendar.cpp  Calendar.pro.cache  main.cpp   monthview.cpp
> calendar.h    dayview.cpp         Makefile   monthview.h
> 
> /****** Errors ******/
> $ ./Calendar -qws
> Connected to VFB server :0: 320 x 240 x 32 113x85mm (71x71dpi)
> Segmentation fault
> 
> /****** detect the file ******/
> $ file Calendar
> Calendar: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
> dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not
> stripped
> 
> /****** find out its library ******/
> $ ldd Calendar
> 	linux-gate.so.1 =>  (0xb7fd3000)
> 	libQtSvg.so.4 => /opt/qtopia/lib/libQtSvg.so.4 (0xb7f8a000)
> 	libQtSql.so.4 => /opt/qtopia/lib/libQtSql.so.4 (0xb7f00000)
> 	libQtXml.so.4 => /opt/qtopia/lib/libQtXml.so.4 (0xb7eb8000)
> 	libQtGui.so.4 => /opt/qtopia/lib/libQtGui.so.4 (0xb78c8000)
> 	libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7894000)
> 	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb781d000)
> 	libQtNetwork.so.4 => /opt/qtopia/lib/libQtNetwork.so.4 (0xb77cd000)
> 	libQtCore.so.4 => /opt/qtopia/lib/libQtCore.so.4 (0xb75db000)
> 	libz.so.1 => /lib/libz.so.1 (0xb75c5000)
> 	libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb75c1000)
> 	libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb75a8000)
> 	libqtopiabase.so.4 => /opt/qtopia/lib/libqtopiabase.so.4 (0xb74f8000)
> 	libqtopia.so.4 => /opt/qtopia/lib/libqtopia.so.4 (0xb723d000)
> 	libmd5.so.1 => /opt/qtopia/lib/libmd5.so.1 (0xb723a000)
> 	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb714b000)
> 	libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7125000)
> 	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7116000)
> 	libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb6fb3000)
> 	/lib/ld-linux.so.2 (0xb7fd4000)
> 
> 

And some Debug Information:
$ gdb ./uTest 
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) r -qws
Starting program: /home/kermit/uTest/uTest -qws
[Thread debugging using libthread_db enabled]
Connected to VFB server :0: 320 x 240 x 32 113x85mm (71x71dpi)
[New Thread 0xb6ecf6d0 (LWP 12998)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6ecf6d0 (LWP 12998)]
0xb7900797 in QWSMouseHandler::setScreen ()
from /opt/qtopia/lib/libQtGui.so.4
(gdb) bt
#0  0xb7900797 in QWSMouseHandler::setScreen ()
   from /opt/qtopia/lib/libQtGui.so.4
#1  0xb7907059 in QVFbScreen::connect ()
from /opt/qtopia/lib/libQtGui.so.4
#2  0xb78dc500 in qt_get_screen () from /opt/qtopia/lib/libQtGui.so.4
#3  0xb7958ae2 in ?? () from /opt/qtopia/lib/libQtGui.so.4
#4  0xb7958de0 in ?? () from /opt/qtopia/lib/libQtGui.so.4
#5  0xb7958ec3 in QWSDisplay::QWSDisplay ()
from /opt/qtopia/lib/libQtGui.so.4
#6  0xb7958f36 in ?? () from /opt/qtopia/lib/libQtGui.so.4
#7  0xb78e0b30 in ?? () from /opt/qtopia/lib/libQtGui.so.4
#8  0xb78e3b2c in ?? () from /opt/qtopia/lib/libQtGui.so.4
#9  0xb78e3ef0 in QWSServer::QWSServer ()
from /opt/qtopia/lib/libQtGui.so.4
#10 0xb78e3ffd in QWSServer::startup ()
from /opt/qtopia/lib/libQtGui.so.4
#11 0xb795a3f3 in ?? () from /opt/qtopia/lib/libQtGui.so.4
#12 0xb79154c8 in QApplicationPrivate::construct ()
   from /opt/qtopia/lib/libQtGui.so.4
#13 0xb7915afb in QApplication::QApplication ()
   from /opt/qtopia/lib/libQtGui.so.4
#14 0x080488ba in main ()
(gdb) 

Thanks again!

Kermit Mei












> All of the executable program compiled with qtopia run with this error,
> included the qtopia's example. I don't know what's wrong.
> 
> Can anyone help me,plseas?
> 
> 
> Thank you.
> Kermit Mei
> 




More information about the Qt-interest-old mailing list