Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    What's is problem? "the inferior stopped because it recieved a signal from operating system"

    Mobile and Embedded
    3
    5
    10250
    Loading More Posts
    • 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.
    • H
      hungchuviet last edited by

      I have 1 class (SmsParser)
      In main() function, I put some code:
      @SmsParser * smsParser = new SmsParser();
      QString smsParsed = smsParser->parseSMS("This is SMS parser.");
      @
      It work OK.
      //Next I put above code into a SLOT named callSMSParser in mainWindow.cpp
      //Next, I place a push button named btn_ParseSMS on MainWindow.ui
      //next:
      @QObject::connect(btn_ParseSMS, SIGNAL(clicked()), kqxsMainWindow, SLOT(callSMSParser()));@
      When I start debug the code above work fine, but when I clicked on btn_ParseSMS push button, this error happened:"the inferior stopped because it recieved a signal from operating system".
      At last, if i change type of varible smsParser (Do not use pointer):
      @SmsParser smsParser;
      QString smsParsed = smsParser.parseSMS("This is SMS parser.");@
      It work ok.
      I don't know why? and how to fix this?
      Help me!
      thanks a lot!

      1 Reply Last reply Reply Quote 0
      • T
        tobias.hunger last edited by

        The message means that the operating system send a signal to the process, asking it to terminate. These signals are a asynchronous communication mechanism of the OS and not the signals you know from Qt. They get raised when the OS sees a reason (like out of memory conditions, etc.). You should investigate which signal was received and under which conditions that is raised.

        In this case you might try to increase the heap space available for your application.

        1 Reply Last reply Reply Quote 0
        • S
          sriky27 last edited by

          Hi,
          Firstly I am assuming you are working on Mobile platform like symbian or Maemo.
          Well try making smsParser a member variable of the mainWindow class and allocate memory in the constructor of the mainWindow.

          @
          MainWindow::MainWindow()
          {
          smsParser = new SmsParser();
          }

          MainWindow::Slot()
          {
          QString smsParsed = smsParser->parseSMS("This is SMS parser.");
          }
          @

          Give it a shot.
          [edit: marked code / chetankjain]

          1 Reply Last reply Reply Quote 0
          • H
            hungchuviet last edited by

            Thanks you very much!
            I'll try it.

            1 Reply Last reply Reply Quote 0
            • ?
              Guest last edited by

              sriky27, enclosed the code with @ tag

              1 Reply Last reply Reply Quote 0
              • First post
                Last post