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