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. ASSERT: "width > 0.0" in file painting\qrasterizer.cpp, line 742

ASSERT: "width > 0.0" in file painting\qrasterizer.cpp, line 742

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 4.0k Views
  • 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.
  • AvalonA Offline
    AvalonA Offline
    Avalon
    wrote on last edited by
    #1

    Hi,
    Have used Qt on Linux for a while. I have an application that runs perfectly on Linux and now I have recompiled in Windows 7. All seems to run correct except for drawing in a scene when I call QGraphicsScene::update I get the error :

    ASSERT: "width > 0.0" in file painting\qrasterizer.cpp, line 742

    I can't find any/much info on what the issue is or how to fix it.

    Qt Version is:
    Qt Creator 3.4.2 (opensource)
    Based on Qt 5.5.0 (MSVC 2013, 32 bit)

    Any help. Thanks

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Red Baron
      wrote on last edited by
      #2

      I'm running 64bit Windows 10 and go the same error. I have followed the bread crumbs to the bug QTBUG-19929 because I was getting

      QPainterPath::moveTo: Adding point where x or y is NaN or Inf, ignoring call
      QPainterPath::lineTo: Adding point where x or y is NaN or Inf, ignoring call
      

      every once in a while when moving my QGraphicsLineItem in my scene. Sometimes it even results in a crash:

      ASSERT: "width > 0.0" in file painting\qrasterizer.cpp, line 761
      ...
      (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
      (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
      (Internal error: pc 0x1130556 in read in psymtab, but not in symtab.)
      (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
      (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
      (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
      (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
      

      I have no idea where this is coming from exactly although I have to admit that my line isn't drawn like I wanted to that is the scene gets bigger and bigger.

      kshegunovK 1 Reply Last reply
      1
      • R Red Baron

        I'm running 64bit Windows 10 and go the same error. I have followed the bread crumbs to the bug QTBUG-19929 because I was getting

        QPainterPath::moveTo: Adding point where x or y is NaN or Inf, ignoring call
        QPainterPath::lineTo: Adding point where x or y is NaN or Inf, ignoring call
        

        every once in a while when moving my QGraphicsLineItem in my scene. Sometimes it even results in a crash:

        ASSERT: "width > 0.0" in file painting\qrasterizer.cpp, line 761
        ...
        (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
        (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
        (Internal error: pc 0x1130556 in read in psymtab, but not in symtab.)
        (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
        (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
        (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
        (Internal error: pc 0x113056a in read in psymtab, but not in symtab.)
        

        I have no idea where this is coming from exactly although I have to admit that my line isn't drawn like I wanted to that is the scene gets bigger and bigger.

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by kshegunov
        #3

        @Red-Baron @Avalon

        Hi,
        When you trip the assertion do extract the stack trace, so at least we can see what chain of calls leads to the crash.

        Kind regards.

        Read and abide by the Qt Code of Conduct

        R 1 Reply Last reply
        0
        • kshegunovK kshegunov

          @Red-Baron @Avalon

          Hi,
          When you trip the assertion do extract the stack trace, so at least we can see what chain of calls leads to the crash.

          Kind regards.

          R Offline
          R Offline
          Red Baron
          wrote on last edited by
          #4

          @kshegunov If I only knew how to do that on Windows (Windows 10 in particular)...

          kshegunovK 1 Reply Last reply
          0
          • R Red Baron

            @kshegunov If I only knew how to do that on Windows (Windows 10 in particular)...

            kshegunovK Offline
            kshegunovK Offline
            kshegunov
            Moderators
            wrote on last edited by kshegunov
            #5

            @Red-Baron
            Hi,
            Are you running the code through the debugger? What IDE are you using?

            In QtCreator (I'm using gdb) after failing the assert you can click Ok (you should have, a button Ok / Continue / Ignore). After that the debugger would have stopped at the offending line:
            Assertion
            Notice the assertion message top right (I have intentionally accessed a vector element outside the allocated size).
            Going to the Stack view window and clicking with the right button you have Create full backtrace:
            Backtrace
            This should get you started. Inspecting the stack by yourself can also be helpful, as it can hint why (or how) you arrive at the problem.

            Kind regards

            Read and abide by the Qt Code of Conduct

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Red Baron
              wrote on last edited by
              #6

              Thanks. Will get to it in the next couple of days.

              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