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

QCache crash when unlinking object if it is full

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 5.2.1
    • None
    • Linux
    • Can't reproduce anymore on new code version

    Description

      I am using the QCache container in the following context:

        QMutexLocker l(&mutex);
      
        static QCache<GatePort,MyLocalData> PortDrawingCache(10);
      
        MyLocalData* cachedInfo = PortDrawingCache[p];
        ....
        ....
        PortDrawingCache.insert(p,cachedInfo);
      

      So it is used in a threaded environment, but all operations are protected using the QMutexLocker object.

      However, on a rare basis i am getting a crash condition when inserting
      The attached screen shot show the stack and data value. It can be nnoticed that the element that we currently try to remove from the hash is already no longer in it... so this looks weird.
      Also n.p is obviously invalid pointer.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            toolinfo stephane petithomme
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes