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. QtApp Segmentation Fault [SOLVED]
Forum Updated to NodeBB v4.3 + New Features

QtApp Segmentation Fault [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 830 Views 2 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.
  • Lays147L Offline
    Lays147L Offline
    Lays147
    wrote on last edited by Lays147
    #1

    Hi folks,
    There are 15 minutes ago my application was running smoothly and now she does not perform at all, the first line of running it gives segmentation fault and does not run. Be in Debug or Release mode, all return me segmentation. I have not changed the code, why is not working anymore?
    Help!

    Lays Rodrigues
    Newby on Qt - Learning always!
    Using QT 5.7
    ArchLinux

    JKSHJ 1 Reply Last reply
    0
    • Lays147L Lays147

      Hi folks,
      There are 15 minutes ago my application was running smoothly and now she does not perform at all, the first line of running it gives segmentation fault and does not run. Be in Debug or Release mode, all return me segmentation. I have not changed the code, why is not working anymore?
      Help!

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi @Lays147,

      A segmentation fault is caused by a memory bug in your program. For example, you used an uninitialized pointer.

      Sometimes, the bug doesn't cause crashes, but sometimes it does.

      Use a Debugger to help you find the bug.

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

      1 Reply Last reply
      2
      • T Offline
        T Offline
        TheHawk
        wrote on last edited by
        #3

        As @JKSH sais, a segmentation fault is caused by a memory bug in the program.

        For instance, the cause can be something like this:

        std::vector<double> myvector;
        myvector[2] = 22; //will cause segmentation fault since myvector[2] does not exist!
        

        running it with the Debugger causes the program to halt at the line which causes the segmentation fault, so in my example at myvector[2]=22;. This will help you solve your problem.

        1 Reply Last reply
        1

        • Login

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