Results 1 to 5 of 5

Thread: Segmentation Fault error on all Qt examples/demos

  1. #1
    Join Date
    Apr 2010
    Location
    Bahamas
    Posts
    29
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Segmentation Fault error on all Qt examples/demos

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Segmentation Fault error on all Qt examples/demos

    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.

  3. #3
    Join Date
    Apr 2010
    Location
    Bahamas
    Posts
    29
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Segmentation Fault error on all Qt examples/demos

    Quote Originally Posted by wysota View Post
    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?

    Thanks again for your help.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,014 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Segmentation Fault error on all Qt examples/demos

    Quote Originally Posted by slscripters View Post
    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?
    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.

  5. #5
    Join Date
    Apr 2010
    Location
    Bahamas
    Posts
    29
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Segmentation Fault error on all Qt examples/demos

    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.

Similar Threads

  1. segmentation fault!!
    By Yayati.Ekbote in forum Qt Programming
    Replies: 4
    Last Post: 24th March 2010, 15:10
  2. Installing examples/demos for QT4
    By steak-sandwich in forum Installation and Deployment
    Replies: 2
    Last Post: 8th January 2010, 12:57
  3. how can i don't compile qt demos and examples?
    By rainspider in forum Installation and Deployment
    Replies: 4
    Last Post: 7th November 2009, 16:58
  4. segmentation fault error
    By sagi in forum Installation and Deployment
    Replies: 2
    Last Post: 25th July 2008, 05:37
  5. segmentation fault
    By shamik in forum Qt Programming
    Replies: 3
    Last Post: 24th November 2006, 07:33

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.