← Back to team overview

touch-packages team mailing list archive

[Bug 1368492] Re: crash opening image file

 

The real reason for this bug has been hiding in plain sight on this page
all the time. Note the backtrace above:

#5 0xacf9b466 in ThumbnailGenerator::requestImage(QString const&, QSize*, QSize const&) ()
   from /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/libUbuntuComponents.so

This means that the thumbnailer plugin is invoked from
libUbuntuComponents.so, which is provided by ubuntu-ui-toolkit and *not*
from the plugin provided by thumbnailer. And, sure enough, in
modules/Ubuntu/Components/plugin/plugin.cp we find this:

    try {
        engine->addImageProvider(QLatin1String("thumbnailer"), new ThumbnailGenerator);
    } catch(std::runtime_error &e) {
        qDebug() << "Could not create thumbnailer: " << e.what();
    }

This same piece of code can also be found in
plugins/Ubuntu/Thumbnailer/plugin.cpp (along with the other two
generators it provides.

A quick test shows that removing the registration code from thumbnailer
makes these threading bugs disappear. Apparently what happens is that if
you register the same image provider into Qt twice, it gets confused and
starts corrupting its own data structures.

A side effect of this fix is that when you tap on a picture in the
gallery app to bring it full screen, pinch-to-zoom no longer works and
there is other weirdness (sometimes the image goes fully black). (As an
aside, why is gallery even using the thumbnailer for this? You need the
entire image for proper zooming so why not just open it directly?)

To get this fixed we need to do the following:

- decide with UI toolkit people on where the correct place for thumbnail image provider is
- once done we need to verify if the pinching bug still happens and fix it
- land all MRs dealing with the above as one clump


** Also affects: ubuntu-ui-toolkit
   Importance: Undecided
       Status: New

** Changed in: ubuntu-ui-toolkit
       Status: New => Confirmed

** Changed in: ubuntu-ui-toolkit
   Importance: Undecided => Critical

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to thumbnailer in Ubuntu.
https://bugs.launchpad.net/bugs/1368492

Title:
  crash opening image file

Status in Ubuntu UI Toolkit:
  Confirmed
Status in “thumbnailer” package in Ubuntu:
  Confirmed

Bug description:
  krillin image 25
  libthumbailer version 1.2+14.10.20140814-0ubuntu1

  - take a picture with the camera
  - open the gallery app
  - click on the thumbnail of the photo just taken
  - boom, crash happens

  Here is the stack trace. Core file and picture used are attached

  [Thread debugging using libthread_db enabled]
  Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
  Core was generated by `./gallery-app'.
  Program terminated with signal SIGSEGV, Segmentation fault.
  #0  0xb5b2201c in std::string::assign(std::string const&) ()
     from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
  (gdb) bt
  #0  0xb5b2201c in std::string::assign(std::string const&) ()
     from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6
  #1  0xacebe712 in ?? () from /usr/lib/arm-linux-gnueabihf/libthumbnailer.so.0
  #2  0xacebec62 in ?? () from /usr/lib/arm-linux-gnueabihf/libthumbnailer.so.0
  #3  0xacebff34 in Thumbnailer::get_thumbnail(std::string const&, ThumbnailSize, ThumbnailPolicy) () from /usr/lib/arm-linux-gnueabihf/libthumbnailer.so.0
  #4  0xacec00ae in Thumbnailer::get_thumbnail(std::string const&, ThumbnailSize)
      () from /usr/lib/arm-linux-gnueabihf/libthumbnailer.so.0
  #5  0xacf7b70e in ThumbnailGenerator::requestImage(QString const&, QSize*, QSize const&) ()
     from /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/libUbuntuComponents.so
  #6  0xb640acfa in ?? () from /usr/lib/arm-linux-gnueabihf/libQt5Quick.so.5
  Backtrace stopped: previous frame identical to this frame (corrupt stack?)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1368492/+subscriptions


References