Uploaded image for project: 'Qt Mobility'
  1. Qt Mobility
  2. QTMOBILITY-1533

QSystemNetworkInfo class cannot be used from any other thread than the main thread - will crash otherwise

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.2.x
    • Component/s: System Information
    • Labels:
    • Environment:
      Symbian^3 wk14 rnd platform.
    • Commits:
      a3707efb0efd0d8999154d28f677593ce303bbe7,f08c4b606aff41f48300748ecaf29c93b9ac25ca,5d765e2d5db139160b61aee02d580e41b922509a, 2bcfd0e15f92e426437f853cfd9d57ecabc94d1d

      Description

      If QSystemNetworkInfo class is instantiated in a worker thread context and gets destroyed in the same context, crash will occur.

      As QSystemNetworkInfoPrivate is global static data, it will get deallocated only when process is shutting down. In otherwords lifetime of QSystemNetworkInfoPrivate object is longer than QSystemNetworkInfo object.
      This causes a problem if QSystemNetworkInfoPrivate (or objects it is deallocating) closes / frees Symbian client-server handles in the destructor.

      Steps for reproducing the bug:
      1. Build and run the attached qsni_test application
      2. Wait few seconds and exit the program

      Expected behaviour:
      Application crashes
      Actual behaviour:
      Application should not crash

      Attached also a call stack of the crash (in the same zip).

        Attachments

        1. crashtest.zip
          25 kB
        2. qsni_test.zip
          3 kB
        3. qsnidisabled.log
          1 kB
        4. qsnienabled.log
          7 kB
        5. qsnitest_disabled_unsigned.sis
          6 kB
        6. qsnitest_enabled_unsigned.sis
          6 kB
        7. qsnitest_working.txt
          6 kB

          Issue Links

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

            Activity

              People

              Assignee:
              ramesh.ravva Ramesh Ravva
              Reporter:
              malaaman Matti Laamanen
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes