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

Accessing destroyed value in a method connected to a Signal results in a crash.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1: Critical P1: Critical
    • 6.7.0 FF, 6.7
    • dev
    • QML: Compiler
    • None
    • Linux/X11
    • c1320e7a3 (dev)

      While attempting to reproduce QTBUG-29676 I ran into the issue. Scenario is quite similar to what's being described in the aforementioned bug. Roughly:

      1. An Object A has a field F and a method M accessing that field F
      2. M is being connected to the signal S
      3. A is being destroyed
      4. Signal S is being emitted -> M is being called trying to access F (which is null)

      Here I am attaching a reproducible crash setup. (After clicking on "Say hello" the app crashes)

      There is no crash when Cachegen is disabled though.

        1. repro.zip
          2 kB
          Dmitrii Akshintsev
        For Gerrit Dashboard: QTBUG-117866
        # Subject Branch Project Status CR V

            dima.a Dmitrii Akshintsev
            dima.a Dmitrii Akshintsev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes