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. Help : Segmentation fault when using a 3rd library
Forum Updated to NodeBB v4.3 + New Features

Help : Segmentation fault when using a 3rd library

Scheduled Pinned Locked Moved General and Desktop
20 Posts 2 Posters 4.7k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Tissues
    wrote on last edited by
    #4

    Message I received:

    The inferior stopped becaquse it received a signal from the Operating System.
    Signal name: SIGSEGV
    Signal meaning: Segmentation fault

    I was using a tutorial code, trying to create a new object, but was stopped by Qt Creator.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #5

      You should run it using a debugger, this would tell you where it happens

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tissues
        wrote on last edited by
        #6

        Thany you for your reply. I'm new to Qt and I don't know what is a degubber. Now I am using Qt Creator and press F5 to debug my project. The debugging process stops at the line where I am going to declare a new object contained in the library.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #7

          Then I suppose you are also new at programming ?

          Can you show the code ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Tissues
            wrote on last edited by
            #8

            I have some basic knowledge in C++ programming and one semester's course in data structure and algorithm, but I'm ignorant in interface development.

            I downloaded my library on this website:
            http://genie.sis.pitt.edu/index.php/downloads
            followed tutorial on this website:
            http://genie.sis.pitt.edu/wiki/SMILE_Documentation
            and wrote my own code:
            @#include "widget.h"
            #include <QApplication>
            #include "smile.h"

            int main(int argc, char *argv[])
            {
            DSL_network myNetwork;
            QApplication a(argc, argv);
            Widget w;
            w.show();

            return a.exec&#40;&#41;;
            

            }
            @

            Debugging process stopped at
            @DSL_network myNetwork;@

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #9

              And what error are you getting ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • T Offline
                T Offline
                Tissues
                wrote on last edited by
                #10

                A message box with a title "Signal received", reading

                The inferior stopped because it received a signal from the Operating System.
                Signal name: SIGSEGV
                Signal meaning: Segmentatio fault

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #11

                  Since you are using MinGW, your should already have a debugger then just click on the other green arrow, then one with the little bug, you should get more information

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • T Offline
                    T Offline
                    Tissues
                    wrote on last edited by
                    #12

                    Application Output:
                    Debugging starts
                    can't find linker symbol for virtual table for 'QApplication' value

                    There are many warnings. Some read 'ignoring #pragma comment' while others 'unused parameter'. What is the problem?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #13

                      Did you download the MinGW version ? If so, it's been compiled with MinGW 4.6.2 which is not compatible with 4.8

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • T Offline
                        T Offline
                        Tissues
                        wrote on last edited by
                        #14

                        Oh, I am now using Qt creator 5.2.0 and MinGW4.8. How can I reduce MinGW to a 4.6.2 version?

                        1 Reply Last reply
                        0
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #15

                          You would need to install it by hand and also recompile Qt with it

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #16

                            However, the download page also mention that you can request a build, so you could try to ask them about a version using MinGW 4.8

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • T Offline
                              T Offline
                              Tissues
                              wrote on last edited by
                              #17

                              Thx for your reply! I have downloaded Mingw32 4.6.2, but I want to ask how to recompile Qt with it.

                              1 Reply Last reply
                              0
                              • SGaistS Offline
                                SGaistS Offline
                                SGaist
                                Lifetime Qt Champion
                                wrote on last edited by
                                #18

                                Just follow the "documentation":http://qt-project.org/doc/qt-5/windows-building.html

                                However, I would recommend trying to ask a build for MinGW 4.8

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply
                                0
                                • T Offline
                                  T Offline
                                  Tissues
                                  wrote on last edited by
                                  #19

                                  I've tried to follow the instruction, but it is complex for me. I just copied and pasted MinGW4.6.2 in the directory, and compiled the program. Now it stops at the very beginning and the Application Output window says
                                  Debugging starts
                                  (Internal error: pc 0x54f558 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f615 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f616 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f615 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f615 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406a80 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adc in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f615 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f558 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f615 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f616 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f615 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x54f615 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406a80 in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adc in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)
                                  (Internal error: pc 0x406adb in read in psymtab, but not in symtab.)

                                  1 Reply Last reply
                                  0
                                  • SGaistS Offline
                                    SGaistS Offline
                                    SGaist
                                    Lifetime Qt Champion
                                    wrote on last edited by
                                    #20

                                    Did you also compile Qt with that version of MinGW ?

                                    Interested in AI ? www.idiap.ch
                                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                    1 Reply Last reply
                                    0

                                    • Login

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