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

QCache crash when unlinking object if it is full

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes