Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-34714

Crash when drawing wrong initializated image on canvas



    • 8ae390e75bf589b1591cdf5caa77b254b9ac0d8a


      If image is wrong initialized (bad image URL) drawing it on canvas gives a crash. Inspired by http://stackoverflow.com/questions/19795992/qml-app-chrashes-after-user-triggered-drawimage-call

      GDB says:

      Starting program: /home/kakadu/mand/prog/qt/qt5/qtbase/bin/qmlscene /tmp/a.qml
      warning: Could not load shared library symbols for linux-vdso.so.1.
      Do you need "set solib-search-path" or "set sysroot"?
      [Thread debugging using libthread_db enabled]
      Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
      [New Thread 0x7fffeb267700 (LWP 6128)]
      Qt: gdb: -nograb added to command-line options.
      Use the -dograb option to enforce grabbing.
      [New Thread 0x7fffea446700 (LWP 6129)]
      [New Thread 0x7fffe8971700 (LWP 6130)]
      [New Thread 0x7fffdbe61700 (LWP 6131)]

      Program received signal SIGSEGV, Segmentation fault.
      0x00007ffff781c3bb in QQuickPixmap::status (this=0xe3d290) at util/qquickpixmapcache.cpp:1130
      1130 return d->pixmapStatus;
      (gdb) bt
      #0 0x00007ffff781c3bb in QQuickPixmap::status (this=0xe3d290) at util/qquickpixmapcache.cpp:1130
      #1 0x00007ffff781c30e in QQuickPixmap::isReady (this=0xe3d290) at util/qquickpixmapcache.cpp:1106
      #2 0x00007ffff79effbf in QQuickCanvasPixmap::isValid (this=0xe69500)
      at items/context2d/qquickcanvasitem.cpp:104
      #3 0x00007ffff7a0829b in QQuickJSContext2DPrototype::method_drawImage (ctx=0x7fffffffbe90)
      at items/context2d/qquickcontext2d.cpp:3009
      #4 0x00007ffff713b471 in QV4::BuiltinFunction::call (that=0x7ffff7f7a040, callData=0x7fffe9446360)
      at jsruntime/qv4functionobject.cpp:618
      #5 0x00007ffff70fa40d in QV4::FunctionObject::call (this=0x7ffff7f7a040, callData=0x7fffe9446360)
      at jsruntime/qv4functionobject_p.h:130
      #6 0x00007ffff710c9aa in QV4::__qmljs_call_property (context=0x7fffffffc150, name=..., callData=...)
      at jsruntime/qv4runtime.cpp:830
      #7 0x00007ffff7fc31f7 in ?? ()
      #8 0x00007fffe9446060 in ?? ()
      #9 0x00007fffe9446058 in ?? ()
      #10 0x0000800000000000 in ?? ()
      #11 0x00007ffff7f8ce40 in ?? ()
      #12 0x00007fffffffc140 in ?? ()
      #13 0x00007ffff71054fb in QV4::ExecutionContext::newCallContext (this=0x7ffff7f8ce40,
      stackSpace=0x800000000000, locals=0x7fffe9446058, function=0x7fffe9446060,
      callData=0x7ffff7fc31f7) at jsruntime/qv4context.cpp:86
      #14 0x00007ffff713c09d in QV4::Function::code (this=0xdba9d0, ctx=0x7fffffffc150, data=0x0)
      at jsruntime/qv4function_p.h:106
      #15 0x00007ffff713b2dc in QV4::SimpleScriptFunction::call (that=0x7ffff7f8ce40,
      callData=0x7fffe9446008) at jsruntime/qv4functionobject.cpp:581
      #16 0x00007ffff70fa40d in QV4::FunctionObject::call (this=0x7ffff7f8ce40, callData=0x7fffe9446008)
      at jsruntime/qv4functionobject_p.h:130
      #17 0x00007ffff7296998 in QQmlJavaScriptExpression::evaluate (this=0xdbbd40, context=0xdbac90,
      --Type <return> to continue, or q <return> to quit--q
      (gdb) q
      A debugging session is active.

      Inferior 1 [process 6124] will be killed.

      Quit anyway? (y or n) y


        1. a.qml
          0.6 kB
          Dmitrii Kosarev
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            sletta Gunnar Sletta
            kakadu Dmitrii Kosarev
            0 Vote for this issue
            4 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes