Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Ported Qt program (Windows to linux) segmentation fault
Forum Update on Monday, May 27th 2025

Ported Qt program (Windows to linux) segmentation fault

Scheduled Pinned Locked Moved General and Desktop
7 Posts 4 Posters 3.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    giriel
    wrote on 29 Jun 2012, 12:19 last edited by
    #1

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      anndro
      wrote on 29 Jun 2012, 14:07 last edited by
      #2

      which widgets you are using on your form?

      1 Reply Last reply
      0
      • G Offline
        G Offline
        giriel
        wrote on 29 Jun 2012, 14:30 last edited by
        #3

        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 :)

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on 29 Jun 2012, 18:37 last edited by
          #4

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

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giriel
            wrote on 29 Jun 2012, 18:59 last edited by
            #5

            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

            1 Reply Last reply
            0
            • G Offline
              G Offline
              giesbert
              wrote on 1 Jul 2012, 20:08 last edited by
              #6

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

              Nokia Certified Qt Specialist.
              Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

              1 Reply Last reply
              0
              • G Offline
                G Offline
                giriel
                wrote on 1 Jul 2012, 20:12 last edited by
                #7

                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 !

                1 Reply Last reply
                0

                3/7

                29 Jun 2012, 14:30

                • Login

                • Login or register to search.
                3 out of 7
                • First post
                  3/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved