Results 1 to 20 of 22

Thread: Segmentation fault while creating Object for QApplication

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2008
    Posts
    58
    Thanks
    11
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Segmentation fault while creating Object for QApplication

    no I am not linking qtgui library in my project. Is it required ??
    I have cross compiled and placed the qt library in my file system. when i run its getting the shared Library information from that lib. I have copied core.so qui.so and network.so files.

    You suggestion would be a great help for me.

  2. #2
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Thanks
    8
    Thanked 133 Times in 128 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Segmentation fault while creating Object for QApplication

    QApplication is in qtgui library.. so you need that...

  3. The following user says thank you to nish for this useful post:

    nrabara (25th August 2009)

  4. #3
    Join Date
    Sep 2008
    Posts
    58
    Thanks
    11
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Segmentation fault while creating Object for QApplication

    Mr Death, I am using arm-linux-gcc for cross compiling and its support rpath, so i dont need to set LD_LIBRARY_PATH ??
    When i run qt application its able to get shared lib info....
    but show segmentation fault while creating QApplication object....

    if it dont get the shared lib info, it wont create QCoreApplication object also..

    I am wrong? or missing something ??

    your suggestion would be great help for me..

  5. #4
    Join Date
    Dec 2008
    Location
    France
    Posts
    93
    Thanked 23 Times in 22 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: Segmentation fault while creating Object for QApplication

    Hi,

    If you program crash when you try to use QApplication, it can be because you don't have the appropriate lib in your target.

    Qt works with modules, GUI module and Core module are two of them.

    QCoreApplication is part of the Core module (you need the libQtCore.so in your target).
    QApplication is part of the GUI module ( you need the libQtGui.so in your target).
    Of course you can check for dependency with ldd command.

    QApplication is for app with GUI.
    QCoreApplication if for app without GUI.

    So, use the one that fit for your project.

  6. The following user says thank you to nix for this useful post:

    nrabara (25th August 2009)

  7. #5
    Join Date
    Sep 2008
    Posts
    58
    Thanks
    11
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Segmentation fault while creating Object for QApplication

    I have installed libQtGui.so , libQtCore.so and libQtNetwork.so files in my target board.

    I have back traced with arm-linux-strace utility, its showing segmentation fault while trying to mmap() for fb0.;.
    It not a problem with directory path... I have traced out that qt application is able to find libQtGui.so , libQtCore.so and libQtNetwork.so.

    my
    libQtGui.so = 11 MB
    libQtCore.so = 3.2 MB and
    libQtNetwork.so = 1.1 MB

    I have 32 MB of FLASH and 32MB SDRAM. whether it's problem with memory??

Similar Threads

  1. Replies: 2
    Last Post: 16th June 2010, 23:58
  2. segmentation fault for no apparent reason
    By rishiraj in forum Newbie
    Replies: 1
    Last Post: 12th February 2009, 11:13
  3. segmentation fault
    By uchennaanyanwu in forum Newbie
    Replies: 3
    Last Post: 31st July 2008, 16:52
  4. Segmentation fault running any QT4 executables
    By jellis in forum Installation and Deployment
    Replies: 7
    Last Post: 19th May 2007, 16:35
  5. Icons missing => segmentation fault
    By antonio.r.tome in forum Qt Programming
    Replies: 4
    Last Post: 8th March 2006, 16:30

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
  •  
Qt is a trademark of The Qt Company.