PDA

View Full Version : Segmentation Fault error on all Qt examples/demos



slscripters
18th April 2010, 09:49
Hello,

I'm a newbie in Qt and I've successfully build and installed 2 Qt distributions. I've exactly followed the instructions here,

http://thelins.se/learnqt/category/embedded-linux/

because this is the most comprehensive one. To summarize I've 2 Qt installations, one for QT Embedded with qvfb option and the other is Qt/X11. The main goal I want to achieve by the way is to successfully use the Virtual Framebuffer provided by Qt.

My complete understanding is that I need to have these 2 Qt installations to display Qt embedded applications(e.g. in [Qt Embedded]/examples/widgets/) in qvfb which requires Qt/X11 installation. Please correct me if I'm wrong.

Now my problem is that after all these flawless build/installations I have successfully run qvfb but all the examples provided by Qt for the QT embedded throws a Segementation Fault error when run.

These examples by the way are located at [Qt Embedded]/examples/widgets/

Does anybody know how to fix this problem? :(

OS: Ubuntu 9.1 (Running on top of VirtualBox)
Qt Embedded distro ver.: 4.6.2
Qt/X11 ver.: 4.5.2

P.S. I've also tried to explicity build the examples using differnt "qmake"s, from Qt embedded, Qt/X11 and the ones in /usr/bin/. But still the problem exists. :(

wysota
18th April 2010, 12:14
Make sure you are linking (runtime) to the proper versions of Qt libs. But in general you need the embedded release built for your desktop platform - maybe that's the problem in your case. Then you need to build the application with the embedded version and link it against embedded libs. Runtime you need it ran with embedded libs linked in with qfvb display enabled. Of course prior to that you need to have the fb emulator running.

slscripters
19th April 2010, 02:13
Make sure you are linking (runtime) to the proper versions of Qt libs. But in general you need the embedded release built for your desktop platform - maybe that's the problem in your case. Then you need to build the application with the embedded version and link it against embedded libs. Runtime you need it ran with embedded libs linked in with qfvb display enabled. Of course prior to that you need to have the fb emulator running.

Thanks you've given me another angle to investigate from :). But I still have some questions, hope you could answer these too.

1. Should the Qt Embedded compilation suppose to take care of the correct linking of libraries?
2. I've used the Embedded release with the ff. configure options,
* -qt-gfx-qvfb, the graphics driver will be for QVFb, i.e. the virtual framebuffer.
* -qt-kbd-qvfb, the keyboard input will come from the QVFb.
* -qt-mouse-qvfb, the mouse input will come from the QVFb.
* -prefix /usr/local/Trolltech/Qt-qvfb-version, the prefix is used to separate the QVFb version of embedded Qt from the target version.

Did I miss something?

3. How should I make sure Qt Embedded is linking to the correct embedded libs? :confused:

Thanks again for your help. :confused:

wysota
19th April 2010, 10:01
1. Should the Qt Embedded compilation suppose to take care of the correct linking of libraries?
Build time linking - yes. Runtime linking - no.


2. I've used the Embedded release with the ff. configure options,
* -qt-gfx-qvfb, the graphics driver will be for QVFb, i.e. the virtual framebuffer.
* -qt-kbd-qvfb, the keyboard input will come from the QVFb.
* -qt-mouse-qvfb, the mouse input will come from the QVFb.
* -prefix /usr/local/Trolltech/Qt-qvfb-version, the prefix is used to separate the QVFb version of embedded Qt from the target version.

Did I miss something?
I don't know what you want so it's hard to say if you missed something ;) In general you could have run configure without parameters and all would be well too.


3. How should I make sure Qt Embedded is linking to the correct embedded libs? :confused:
It's not embedded you should worry about. It's the runtime dynamic linker on your system. "ldd" is a helpful command to use here.

slscripters
26th April 2010, 12:00
Hi thanks for your help. I will put this in mind the next time I'll install Qt in other workstations. I added the "-embedded" option and it has fixed the problem. ;)