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. Debugging paint event = segmentation fault?
Forum Updated to NodeBB v4.3 + New Features

Debugging paint event = segmentation fault?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.0k 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.
  • ? This user is from outside of this forum
    ? This user is from outside of this forum
    Guest
    wrote on last edited by
    #1

    I've been trying to debug a QWidget paint event, nothing too fancy, just a rectangle being filled, and I keep on getting segmentation fault errors. I am using Creator and Qt 4.8.0. Any ideas?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      I would not expect that the paint event while debugging is the source of your problem. It is more likely that there has been something messed up before the actual paint event. Some kind of a pointer error. Certainly something you need to worry about.
      If the paint event is at the beginning, there could be something with the initialization of some static classes.
      If the fault comes up later during execution, you may want to move it forward. Unfortunately, you may not see a fault, but the source of the problem is still before this execution step.
      Using different tools, such as profilers, may help or provide a hint.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • ? This user is from outside of this forum
        ? This user is from outside of this forum
        Guest
        wrote on last edited by
        #3

        It is not even a project, it is just a single widget with nothing but a paint event that fills a rectangle. The widget itself runs just fine, but any attempt to debug it ends up in a segmentation fault signal from the OS.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          miroslav
          wrote on last edited by
          #4

          Still sounds strange. Setting a breakpoint in the paint event may cause the program to stop a lot and not update, but not to crash.

          Maybe you can post a backtrace along with some snippets of your code?

          Mirko Boehm | mirko@kde.org | KDE e.V.
          FSFE Fellow
          Qt Certified Specialist

          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