Ported Qt program (Windows to linux) segmentation fault



  • Hello fellow Qt developers,

    I am facing a problem with porting one of my applications from Windows to Linux.
    To be fair, I have already asked this question upon "stackoverflow":http://stackoverflow.com/questions/11172429/ported-qt-program-windows-to-linux-segmentation-fault

    But my problem was not solved.
    To explain it in short: I have a perfectly working Qt program in Windows that I want to use in Linux but this doesn't work for some reason.
    If you follow my link you will see all the details as well.

    Something that wasn't mentioned there: sometimes my program also has segmentation faults while initializing the ui.
    @ui->setupUi(this)@

    This crashes at times but not always.
    Could this random behavior be related to a bad version of Qt?

    I am really desperate for finding out why my program functions perfectly upon Windows but completely fails in Linux.



  • which widgets you are using on your form?



  • Quite a lot actually :
    These are the members of the ui_....h file
    @ QAction *exit_Action;
    QAction *editShortcuts_Action;
    QAction *about_Action;
    QAction *editSettings_Action;
    QWidget *centralWidget;
    QVBoxLayout *verticalLayout_2;
    QHBoxLayout *horizontalLayout_6;
    QLabel *label;
    QSpacerItem *horizontalSpacer_7;
    QLabel *nameLabel;
    QSpacerItem *verticalSpacer_4;
    QHBoxLayout *horizontalLayout_5;
    QLabel *label_2;
    QSpacerItem *horizontalSpacer_6;
    QLineEdit *ratingLineEdit;
    QSpacerItem *horizontalSpacer_5;
    QSpacerItem *verticalSpacer_3;
    QHBoxLayout *horizontalLayout_7;
    QLabel *label_3;
    QSpacerItem *horizontalSpacer_9;
    QLineEdit *skillPointsLineEdit;
    QSpacerItem *horizontalSpacer_8;
    QSpacerItem *verticalSpacer_5;
    QHBoxLayout *horizontalLayout_4;
    QSpacerItem *horizontalSpacer_3;
    QToolButton *launchETButton;
    QSpacerItem *horizontalSpacer_4;
    QSpacerItem *verticalSpacer_2;
    QHBoxLayout *horizontalLayout_3;
    QSpacerItem *horizontalSpacer;
    QGroupBox *groupBox;
    QWidget *layoutWidget;
    QVBoxLayout *verticalLayout;
    QHBoxLayout *horizontalLayout;
    QLabel *statusLabel;
    QTextBrowser *statusTextBrowser;
    QSpacerItem *verticalSpacer;
    QHBoxLayout *horizontalLayout_2;
    QLabel *lockLabel;
    QTextBrowser *lockTextBrowser;
    QSpacerItem *horizontalSpacer_2;
    QMenuBar *menuBar;
    QMenu *menuFile;
    QMenu *menuShortcuts;
    QMenu *menuHelp;
    QStatusBar *statusBar;@

    And last time it crashed at the menuBar:

    @menuBar = new QMenuBar(MainWindow);@

    Quite strange according to me :)


  • Moderators

    I doubt anybody will be able to help you without seeing the code... I certainly can not, Sorry.



  • If it could help I can post it upon git?
    It isn't such a big project but not that small either.

    Thing is those segmentation faults occur on multiple locations within the code.

    thanks already



  • without seeing mor, I guess it is a setup / initialisation problem.



  • I have finally fixed my problem !
    Just created a complete new project and copy pasted everything.

    I think it must have been something with a bad userfile?

    Thanks though !


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.