Results 1 to 6 of 6

Thread: The inferior stopped because it received signal from the Operating System

  1. #1
    Join Date
    Apr 2011
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows

    Default The inferior stopped because it received signal from the Operating System

    I create some comboBox with designer, and I append them to te comBoList (<QCombobox*>).

    comboList.append(ui->comboBox_30);
    comboList.append(ui->comboBox_19);

    but if I want use connect:

    for(int i=0; i<15; i++){ connect(comboList.at(i),SIGNAL(currentIndexChanged (int)),this,SLOT(this->comboChange()));
    }

    I get this error message:

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: The inferior stopped because it received signal from the Operating System

    What makes you think there are 15 items in the list? You don't check anywhere, or use a more sensible termination test like the list's size. Did you bother running this in a debugger, or using simple print statements, to find out exactly where in the loop the failure is occuring?

  3. #3
    Join Date
    Apr 2011
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: The inferior stopped because it received signal from the Operating System

    I have exactly 15 buttons in the list, not that's the problem

  4. #4
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: The inferior stopped because it received signal from the Operating System

    I have exactly 15 buttons in the list
    But you've hardcoded it, that's really bad habit, better use the count() method:
    Qt Code:
    1. for(int i=0; i<comboList.count(); i++){
    2. connect(comboList.at(i),SIGNAL(currentIndexChanged (int)),this,SLOT(this->comboChange()));
    3. }
    To copy to clipboard, switch view to plain text mode 
    I agree with SixDegrees, add print (qDebug()) statements to know where it fails exactly.

  5. #5
    Join Date
    Apr 2011
    Posts
    16
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: The inferior stopped because it received signal from the Operating System

    I do not know what the problem, but without designer-ui is good...
    Never mind...

  6. #6
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: The inferior stopped because it received signal from the Operating System

    The ui pointer get initialized?
    You created the design and later added to an existent project?

    You need to tell us more about what have you done, else we can't help you.

    Anyway, the segmentation fault error means some memory corruption because some misuse of pointers, so check the pointers to be initialized before you use them, check that list (so that i to be a valid index) and use the debugger to see exactly where your application is failing.

Similar Threads

  1. Replies: 8
    Last Post: 21st March 2011, 12:40
  2. Replies: 12
    Last Post: 9th January 2011, 13:51
  3. Got "the inferior stopped ..." when debug
    By hashb in forum Qt Programming
    Replies: 3
    Last Post: 25th December 2009, 03:16
  4. QMainWindow in AIX operating system
    By Vani in forum Qt Programming
    Replies: 3
    Last Post: 14th June 2008, 19:50
  5. How to know the operating system?
    By Dark_Tower in forum Newbie
    Replies: 4
    Last Post: 4th May 2006, 20:41

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.