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

Incorrect libraryPaths priorities when loading platform/plugins

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Out of scope
    • Affects Version/s: 5.3.1, 5.3.2
    • Fix Version/s: None
    • Component/s: Core: Plugins
    • Labels:
      None
    • Environment:
      Visual studio 2010 on one computer and Visual Studio 2013 on second computer. One with Qt 5.3.1 and one with Qt 5.3.2.

      Description

      There is a problem when release version of application is executed on another computer with the same Qt path but with different compiler/Qt version.

      Application instead of loading "app.exe\platforms\qwindows.dll" loads "QT\qtbase\bin\platforms\qwindows.dll" because this path has higher priority than executable path.

      Because of that application will silently crashes and it's very difficult to find reason for this.

      The solution would be to set application executable path as first to search for plugins. It would be sufficient to rename/update method

      QCoreApplicationPrivate::appendApplicationPathToLibraryPaths()

      to

      QCoreApplicationPrivate::prependApplicationPathToLibraryPaths()

      and update

      app_libpaths->append(app_location);

      to

      app_libpaths->preppend(app_location);

      I prepared blogpost how to detect this problem and how to fix it on my blog:
      http://blog.inventic.eu/2014/08/qt5-application-crashed-with-error-0xc0000005/

      Please let me know if you will need any more info from me.

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            kleint Friedemann Kleint
            Reporter:
            ludek.vodicka Ludek Vodicka
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes