Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. SIGSEGV Error when debugging with Qt creator.
Forum Updated to NodeBB v4.3 + New Features

SIGSEGV Error when debugging with Qt creator.

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 5 Posters 41.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.
  • J Offline
    J Offline
    jiapei100
    wrote on 21 Jul 2012, 13:19 last edited by
    #1

    A related discuss can be found at
    [url]http://www.qtforum.org/article/31937/error-when-debugging-with-qt-creator.html#post119880[/url]

    First of all, my environment:
    [quote]Ubuntu 12.04
    C++ gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
    Qt Creator 2.4.1 Based on Qt 4.8.0 (32 bit) Built on Mar 21 2012 at 23:05:03
    Eclipse IDE for C/C++ Linux Developers Version: Indigo Service Release 2 Build id: 20120216-1857[/quote]

    I tried both Eclipse and QtCreator. Under Eclipse, my application runs fine, but under QtCreator, the application always got the SIGSEGV error:

    [quote]The inferior stopped because it received a signal from the Operating System.

    Signal name :
    SIGSEGV
    Signal meaning :
    Segmentation fault[/quote]

    Why the same code passed one IDE, but failed the other????weird...

    Cheers
    Pei

    Welcome to Longer Vision
    https://www.longervision.com

    1 Reply Last reply
    0
    • D Offline
      D Offline
      Duck
      wrote on 1 Aug 2012, 22:00 last edited by
      #2

      The SIGSEGV is a problem in your code, an indication that something is wrong.

      Different behavior may have all kind of reasons, ranging from different builds, different environments, diffferent execution order (including some introduced by the debugging itself) to different timing etc.

      1 Reply Last reply
      0
      • U Offline
        U Offline
        unai_i
        wrote on 2 Aug 2012, 07:01 last edited by
        #3

        To add an hint to the previous reply, try to check your code at locations where you use pointers (if you do so).

        1 Reply Last reply
        1
        • J Offline
          J Offline
          JKSH
          Moderators
          wrote on 2 Aug 2012, 07:22 last edited by
          #4

          You get a SIGSEGV if your application tries to access memory illegally. Some examples are here: http://en.wikipedia.org/wiki/Segmentation_fault#Segmentation.2C_page_fault.2C_and_access_violation

          In QtCreator, run the debugger (gdb). When you get the SIGSEGV signal, the debugger will show you where the error is, so you can fix it.

          From your description, my best guess is that your program uses uninitialized pointers, which is dangerous, and sometimes causes SIGSEGV.

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          0
          • F Offline
            F Offline
            franku
            wrote on 2 Aug 2012, 12:57 last edited by
            #5

            When you got the SIGSEGV while debugging, click away the debugger message box and look at the stack with the call history. There you'll find the procedure that was last called (as JKSH wrote).

            This, Jen, is the internet.

            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