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

It is not possible to access same Central Repository uid from two different threads

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • None
    • 1.2.x
    • Publish & Subscribe
    • None
    • c98d6d8b22e7798993600cf1acfaaded757cf43e

      If two threads in same application use QValueSpaceSubcriber or QValueSpacePublisher to access the same cenrep uid, the second of those threads will panic.

      QtMobility PublishSubscribe settings layers are implemented as globals. That means that there is only one instance of the layer, and that is shared between all threads in the application.

      Symbian Settings Layer uses the native Symbian CRepository API for accessing the central repository. CRepository instances can't be shared between threads (if the class is used from a different thread than where it was created, it will panic in the client-server communication).

      A new CRepository instance is created for each different repository UID, but after that the same CRepository instance is always used for accessing that repository. So program that tries to access same repository from two different threads will crash. Even if the program uses separate QValueSpaceSubscriber instances, the Symbian settings layer backend is still shared between those instances.

      This is a pretty serious limitation, because there is no easy workaround for this problem.

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

            satu.m.makela satu makela
            ahaapane Aapo Haapanen (closed Nokia identity) (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes