• John Brooks's avatar
    Fix memory leak on PropertiesChanged signals · 9a72eb86
    John Brooks authored
    QDBusArgument internally leaks QDBusDemarshaller and a dbus message
    reference when there are mismatched recursive parsing calls, such as
    beginMap without calling endMap. That bug has existed since the earliest
    versions of QtDBus.
    
    DBusInterface wasn't calling endMap when parsing the PropertiesChanged
    signal, so all of those messages were leaked.
    
    The impact goes further than just accumulating memory. By default,
    libdbus limits the sum of all allocated DBusMessage to 64MB. Once enough
    of those messages are leaked, it silently stops reading and the dbus
    daemon starts accumulating memory instead. The client seems normal, but
    never receives messages again and sometimes has a single warning:
    
      QSocketNotifier: Socket notifiers cannot be enabled or disabled from
      another thread
    9a72eb86