Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-14399

Crash on any help access when building 3.4.0 without qt web kit under VS2012, x64

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 3.4.1
    • Qt Creator 3.4.0
    • Help System
    • None
    • Windows 7 Professional, Microsoft Visual Studio 2012, x64, built from primary GIT 3.4.0 master branch using QMAKE and JOM from x64 visual studio command prompt.
    • 9724cf6891f7b2812713c89dc89782ca5ad60314

    Description

      Re: Visual Studio 2012, x64 build of Qt Creator 3.4.0 (otherwise I would just use a prepackaged binary). Possible bug in help plugin source, helpplugin.cpp

      My current task requires me to build without the qt web kit. Therefore line 385 of helpplugin.cpp assures that a default contstructed factory that does nothing will be used... that results in a crash on line 390 when the functor of a NULL pointer is used.

      I.E.
      Line 385 constructs a default factory object. (That's what QHash::value() does when something isn't in the map) Therefore when testing on 386, the if(!factory) test fails and a TextBrowserHelpViewer() factory is never assigned to the factory function pointer. Furthermore, the QTC_ASSERT macro fails to capture the error as well since the map instanced a valid ViewerFactory base instance that does nothing.

      Suggest using safer if(!factory && factories.contains(QLatin1String("qtwebkit")) instead of if(!factory) on line 384. It makes no sense to attempt to ask for a factory object from something that may not be in the hash map by instancing a generic one.

      Attachments

        1. helpplugin.cpp
          25 kB
          Michael Straub
        2. qtcreatorhelpplugin_crash_callstack.txt
          5 kB
          Michael Straub
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            con Eike Ziller
            mlstraub Michael Straub
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes