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

QUiLoader crashes when being used in custom designer widget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • Some future release
    • 4.4.0
    • Tools: Designer
    • None

    Description

      Scenario: An application loads an .ui file using QUiLoader. The .ui file contains a reference to a custom widget which loads its own UI from another .ui file using QUiLoader.

      Problem: Loading the .ui file in the custom widget plugin fails or even causes a crash. When the UiLoader is called from the custom widget plugin, the debug output inserted into QUiLoader::load() shows the hash object to be located at i.e. 0x80fde38 for the plugin. But then, when QUiLoader::load() calls QAbstractFormBuilder::load(), the hash object is suddenly reported to be at i.e. 0x80f9fc8 again (the location reported from the main application).

      This has the effect that the previously created FormBuilderExtra entry in the hash object is not found. Instead, a new entry is created in this other hash object, but this entry is missing the ResourceBuilder object which results in a crash when the ResourceBuilder is referenced later in a statement like "if (afb->resourceBuilder()->isResourceProperty(p))".

      Attachments

        1. echoplugin.tar.bz2
          4 kB
        2. properties.cpp.patch
          0.6 kB
        3. uiplugin.tar.gz
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kkohne Kai Köhne
            engvolds Morten Engvoldsen (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes