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
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Segmentation fault while creating Object for QApplication

    Do other examples work as well?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Default Re: Segmentation fault while creating Object for QApplication

    All the example having QApplication object show segmentation fault.

    But for QCoreApplication object, i can use QDateTime, QDate etc.. sub classes of QCoreApplication. It's works fine with QCoreApplication.

    Is there any other way to test QApplication object, I mean
    Can ./configure affect Qt Gui ?? I have tried with full configuration also.

    Your suggestion would be great help for me..

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

    Default Re: Segmentation fault while creating Object for QApplication

    Your problem is deployment, not compilation. Could you post a backtrace of an exemplory crash? An strace showing files being opened (and statuses of the calls) would be nice as well.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Default Re: Segmentation fault while creating Object for QApplication

    Below is my test application code

    main.cpp file

    Qt Code:
    1. #include <QtGui/QApplication>
    2. #include <QLabel>
    3. #include "widget.h"
    4.  
    5. int main(int argc, char *argv[])
    6. {
    7. printf("Inside main\n");
    8. unsigned int loop;
    9. QApplication a(argc, argv);
    10. printf("argc = %d \n",argc);
    11. for(loop=0;loop<argc;loop++)
    12. {
    13. printf("argv[%d] = %s \n",argc,argv[loop]);
    14. }
    15. Widget w;
    16. w.setFixedSize(200,200);
    17. w.show();
    18. return a.exec();
    19. }
    20.  
    21. [B][U]widget.cpp file[/U][/B]
    22.  
    23. #include "widget.h"
    24.  
    25. Widget::Widget(QWidget *parent)
    26. : QWidget(parent)
    27. {
    28. }
    29.  
    30. Widget::~Widget()
    31. {
    32.  
    33. }
    34.  
    35. [U][B]widget.h file[/B][/U]
    36.  
    37. #ifndef WIDGET_H
    38. #define WIDGET_H
    39.  
    40. #include <QtGui/QWidget>
    41.  
    42. class Widget : public QWidget
    43. {
    44. Q_OBJECT
    45.  
    46. public:
    47. Widget(QWidget *parent = 0);
    48. ~Widget();
    49. };
    50.  
    51. #endif // WIDGET_H
    To copy to clipboard, switch view to plain text mode 

    Back trace of the above code is attached - file : QApplication_backtrace.txt

    I have also attached back trace of qt's example code - framebuffer , file : QtFramebuffer_exampleCode.txt

    Your suggestion would be a great help for me..
    Attached Files Attached Files

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

    Default Re: Segmentation fault while creating Object for QApplication

    This is an strace. What about a debugger backtrace?

    The strace suggests there is a problem with mapping the framebuffer to memory.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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

    Default Re: Segmentation fault while creating Object for QApplication

    Can you post result for the following command "fbset --info" too, thx.

  7. #7
    Join Date
    Sep 2010
    Posts
    1
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Segmentation fault while creating Object for QApplication

    Hi,

    I am trying something similar on a an embedded system, albeit a different one.

    How was this resolved, if at all?

    I know that this thread is dated, but anything that can be recalled will be helpful.

    Cheers,
    --
    Vis

Similar Threads

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