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. Problem with disassembler and SIGILL signal
Forum Update on Monday, May 27th 2025

Problem with disassembler and SIGILL signal

Scheduled Pinned Locked Moved Solved General and Desktop
59 Posts 4 Posters 21.6k 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.
  • A Offline
    A Offline
    Amaury
    wrote on 19 Dec 2016, 10:29 last edited by Amaury
    #1

    Hi there ,

    I'm coming here for some help since I saw that my programm is stopping in the middle of it's execution .
    Then I saw a SIGILL error just when I start my application .

    I was thinking that I could find where my problem is but I can't because it's openning the disassembler only and not my cpp or header file.

    How can I translate the disassembler language to find where is my corruption error ?

    thanks by advance.

    BTW I'm in debug mode.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 19 Dec 2016, 11:11 last edited by mrjj
      #2

      HI and welcome
      Did you compile the app as debug?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Amaury
        wrote on 19 Dec 2016, 11:13 last edited by
        #3

        Yes i'm in debug mode

        M 1 Reply Last reply 19 Dec 2016, 11:17
        0
        • A Amaury
          19 Dec 2016, 11:13

          Yes i'm in debug mode

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 19 Dec 2016, 11:17 last edited by mrjj
          #4

          @Amaury
          So app should be compiled in debug mode and hence have debug information?
          You are seeing assembly as source is not there.
          That is often due to debugging a released version.

          To verify your debugger is working set a break point in your source and see it stop.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Amaury
            wrote on 19 Dec 2016, 12:54 last edited by
            #5

            well when I'm using abreak point in my main.cpp I see my app stopping when clicking on the play buton with the bug ( i'm on QT creator). I also see that my app is in debug and not in release mode.

            M 1 Reply Last reply 19 Dec 2016, 13:00
            0
            • A Amaury
              19 Dec 2016, 12:54

              well when I'm using abreak point in my main.cpp I see my app stopping when clicking on the play buton with the bug ( i'm on QT creator). I also see that my app is in debug and not in release mode.

              M Offline
              M Offline
              mrjj
              Lifetime Qt Champion
              wrote on 19 Dec 2016, 13:00 last edited by
              #6

              @Amaury

              And in this case the/your code is shown ?

              1 Reply Last reply
              0
              • A Offline
                A Offline
                Amaury
                wrote on 19 Dec 2016, 13:03 last edited by
                #7

                Yes it's popping on the break point and not showing me the disassembler again.

                M 1 Reply Last reply 19 Dec 2016, 13:04
                0
                • A Amaury
                  19 Dec 2016, 13:03

                  Yes it's popping on the break point and not showing me the disassembler again.

                  M Offline
                  M Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on 19 Dec 2016, 13:04 last edited by
                  #8

                  @Amaury

                  So it sounds like where ever it crashes its not in
                  your code and it shows assem as it have no source ?

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    Amaury
                    wrote on 19 Dec 2016, 13:08 last edited by
                    #9

                    I don't know it sound like this yes , but it crashes at the starting point of my app, just showing my first window and then crashing.
                    But when I just run my app it's starting normally and then crashing after a couple of minutes without any explications .
                    That's why I need to debug, but if the problem is something out of the app I don't know how to deal with it.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on 19 Dec 2016, 13:09 last edited by mrjj
                      #10

                      Hi
                      Dont you have idea in where in the app it could be ?
                      Or what action or processing that is going on when crashing.

                      When it crash, did the call stack showed more info on where it was?
                      http://doc.qt.io/qtcreator/creator-debug-mode.html
                      "Viewing Call Stack Trace"

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Amaury
                        wrote on 19 Dec 2016, 13:13 last edited by Amaury
                        #11

                        Alright after setting a break point as you recommended I was using F10 to check if there's some code that was walling the SIGILL signal , I think I found where my problem is .

                        That's my main :

                        int main(int argc, char *argv[])
                        {
                            //QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
                            //QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));
                        
                            QApplication a(argc, argv);
                        
                            QTranslator qtTranslator;
                               qtTranslator.load(
                                       "qt_" + QLocale::system().name(),
                                       QLibraryInfo::location(QLibraryInfo::TranslationsPath)
                                       );
                               a.installTranslator(&qtTranslator);
                        
                            MainWindow w;
                            w.show();
                        
                            MemTampon::Db.aff_Temperature();
                            MemTampon::Db.aff_Humidite();
                            MemTampon::Db.aff_Puissance();
                            MemTampon::Db.aff_Nom_SD();
                        
                        
                            return a.exec();
                        
                        

                        All of this is running nice except when I'm trying to run (with F11 or f10 key ) the return a.exec() which giving the SIGILL signal

                        Ps : I set the breakpoint first on w.show and then on the line bfore the return function.

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on 19 Dec 2016, 13:27 last edited by mrjj
                          #12

                          Hi
                          I dont like the look of
                          a.installTranslator(&qtTranslator);
                          Since you give it address of a local variable.
                          So if it thinks it owns the translator ( as expects a pointer) then it will be double deleted by
                          "a" and by running out of scope. (after .exe())

                          Could you try to new it and see if it still crashes?

                          update:
                          Hmm Docs dont say it owns it.

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            Amaury
                            wrote on 19 Dec 2016, 13:33 last edited by
                            #13

                            I have to say that I found this piece of code and just add it to my program since I had some pop-ups written in english ( I'm french).

                            So is something like this that you mean by new it ? :

                            QTranslator *qtTranslator = new QTranslator;
                                  qtTranslator.load(
                                          "qt_" + QLocale::system().name(),
                                          QLibraryInfo::location(QLibraryInfo::TranslationsPath)
                                          );
                                  a.installTranslator(&qtTranslator);
                            
                               return a.exec();
                            
                            

                            because I can't even copile like this ...

                            M kshegunovK 2 Replies Last reply 19 Dec 2016, 13:42
                            0
                            • A Amaury
                              19 Dec 2016, 13:33

                              I have to say that I found this piece of code and just add it to my program since I had some pop-ups written in english ( I'm french).

                              So is something like this that you mean by new it ? :

                              QTranslator *qtTranslator = new QTranslator;
                                    qtTranslator.load(
                                            "qt_" + QLocale::system().name(),
                                            QLibraryInfo::location(QLibraryInfo::TranslationsPath)
                                            );
                                    a.installTranslator(&qtTranslator);
                              
                                 return a.exec();
                              
                              

                              because I can't even copile like this ...

                              M Offline
                              M Offline
                              mrjj
                              Lifetime Qt Champion
                              wrote on 19 Dec 2016, 13:42 last edited by
                              #14

                              hi
                              yes
                              except now its pointer, u must get rid of &
                              a.installTranslator(qtTranslator);

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                Amaury
                                wrote on 19 Dec 2016, 13:53 last edited by
                                #15

                                That's compiling but when I'm debugging it's still crashing at the same point ...

                                M 1 Reply Last reply 19 Dec 2016, 14:02
                                0
                                • A Amaury
                                  19 Dec 2016, 13:33

                                  I have to say that I found this piece of code and just add it to my program since I had some pop-ups written in english ( I'm french).

                                  So is something like this that you mean by new it ? :

                                  QTranslator *qtTranslator = new QTranslator;
                                        qtTranslator.load(
                                                "qt_" + QLocale::system().name(),
                                                QLibraryInfo::location(QLibraryInfo::TranslationsPath)
                                                );
                                        a.installTranslator(&qtTranslator);
                                  
                                     return a.exec();
                                  
                                  

                                  because I can't even copile like this ...

                                  kshegunovK Away
                                  kshegunovK Away
                                  kshegunov
                                  Moderators
                                  wrote on 19 Dec 2016, 13:55 last edited by
                                  #16

                                  SIGILL is very unusual, it often means the binary is corrupt (it's the illegal instruction signal). What compiler are you using?
                                  As for @mrjj's suggestion, you can still create on the stack, but do unregister the translator before returning from main(), e.g.:

                                  int main()
                                  {
                                      // ...
                                      QTranslator qtTranslator;
                                      qtTranslator.load("qt_" + QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath));
                                      a.installTranslator(&qtTranslator);
                                  
                                      int retcode = a.exec();
                                      a.removeTranslator(&qtTranslator);
                                  
                                      return retcode;
                                  }
                                  

                                  Read and abide by the Qt Code of Conduct

                                  1 Reply Last reply
                                  0
                                  • A Offline
                                    A Offline
                                    Amaury
                                    wrote on 19 Dec 2016, 14:02 last edited by
                                    #17

                                    I am using Gdb as debugger and Gcc as a compiler , I forget to precise that I was on a raspberry Pi 3.
                                    I would try your way and come back again.

                                    kshegunovK 1 Reply Last reply 19 Dec 2016, 14:07
                                    0
                                    • A Amaury
                                      19 Dec 2016, 13:53

                                      That's compiling but when I'm debugging it's still crashing at the same point ...

                                      M Offline
                                      M Offline
                                      mrjj
                                      Lifetime Qt Champion
                                      wrote on 19 Dec 2016, 14:02 last edited by mrjj
                                      #18

                                      @Amaury
                                      Hi
                                      Ok. it was not the translator it seems.

                                      Do you have global object or anything else that might run out of scope and be deleted twice?
                                      You should try putting break point in mainwindow destructor and see if it gets to that part.

                                      1 Reply Last reply
                                      0
                                      • A Offline
                                        A Offline
                                        Amaury
                                        wrote on 19 Dec 2016, 14:06 last edited by
                                        #19

                                        I have a .h and .cpp named global Where I put 2 global variables as extern. Maybe it's the problem I'm Setting a point break on the Main window and sending you my global.h and global .cpp

                                        Global.h

                                        #ifndef GLOBAL_H
                                        #define GLOBAL_H
                                        
                                        #include <QString>
                                        
                                        QT_BEGIN_NAMESPACE
                                        class QString;
                                        QT_END_NAMESPACE
                                        
                                        extern QString OnlinePath;
                                        extern int Var;
                                        
                                        
                                        #endif // GLOBAL_H
                                        

                                        Global.cpp

                                        `#include "global.h"
                                        #include <QString>
                                        
                                        
                                        QString OnlinePath= "http://192.168.1.242/app.php/api/smartdevice";
                                        int Var = 0;
                                        
                                        
                                        ``
                                        1 Reply Last reply
                                        0
                                        • A Amaury
                                          19 Dec 2016, 14:02

                                          I am using Gdb as debugger and Gcc as a compiler , I forget to precise that I was on a raspberry Pi 3.
                                          I would try your way and come back again.

                                          kshegunovK Away
                                          kshegunovK Away
                                          kshegunov
                                          Moderators
                                          wrote on 19 Dec 2016, 14:07 last edited by
                                          #20

                                          Are you sure that this compiler produces binaries for that particular instruction set? Look up the compatibility of your gcc version with the instruction set of that particular Pi.

                                          Read and abide by the Qt Code of Conduct

                                          1 Reply Last reply
                                          0

                                          1/59

                                          19 Dec 2016, 10:29

                                          • Login

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