[Qt-interest] Segmentation Fault when Program Starts
Konrad Rosenbaum
konrad at silmor.de
Sat Sep 5 09:45:36 CEST 2009
Hi,
sorry, first some remarks about netiquette:
1) please send mails as ASCII text, or at least both HTML and ASCII - your
mail client (Thunderbird) can do this. Many of us don't display HTML for
security reasons - forcing us to switch is rude.
2) if your From and Reply-To are identical, don't set Reply-To - it is
redundant and confuses some mail clients.
On Friday 04 September 2009, Karl Ruetz wrote:
> I am having a difficulty where any program I compile that contains a QT
> object produces a Segmentation Fault on a similar system that does not
> have the QT development environment installed.
>
> QT Version: 4.5.2 -static -release
Are you sure it is static? Do a ldd on it.
Even static (Qt) programs use some parts dynamically. A ldd output from both
systems would be really helpful.
I describe how to deliver dynamically linked Qt programs here:
http://silmor.de/30
> I built two simple programs:
>
> Here is the listing for Program 1 (No QT Objects):
> #include <stdio.h>
> int main()
> {
> fprintf(stderr, "Program running.\n");
> return 0;
> }
Ok, no surprise here.
> Here is the listing for Program 2:
> #include <QDebug>
> int main()
> {
> qDebug("Program running.");
> return 0;
> }
I really wonder why this runs on one of the systems. There is no
QApplication object, but then again qDebug in this form is little more than
printf.
> Both programs compile. Both run on the system where they were built.
> On an RHEL 5 system where QT has not been installed, here is the output
> (the user is root):
Why are you running anything as root?
> # ./QTTest
> Program running.
> # ./QTTest2
> Segmentation fault
Compile it again as debug version.
Set "ulimit -c unlimited", run it again and then analyse the core file with
gdb. Where does it crash?
> If figure I'm missing something simple.
> I would appreciate any input.
Probably, without more diagnosis it is hard to say what this is.
Konrad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090905/1e954fea/attachment.bin
More information about the Qt-interest-old
mailing list