Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-1558

Multiple memory leaks

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.3, 2.7.0
    • Fix Version/s: 2.7.0
    • Component/s: None
    • Labels:
      None

      Description

      I have been monitoring spark for few weeks now and I identified three places with memory leak issues

      1. GroupChatParticipantList that implements ChatRoomListener.
      The problem here is that if you have 5 group chat rooms opened you will have 5 listener instances, and when someone joins one of the rooms, all 5 listeners will be notified. The resolution here is to keep only one ChatRoomListener instance. ChatRoomListener methods have groupchat instance as parameter in all methods, so you know what room will be notified
      2. JPanelRenderer - used to render ContactList items. For every offline-online message you will get contact item added/removed from online to ofline. One instance is kept in the renderer and accumulates over time. For example I run spark for a week and I got 140 MB memory accumulated in ~2000 instances of ContactItem. The resolution here is to return always one rendered instance each time painted according with ContactItem status (online, offline etc)
      3. In ContactList.java the changeOfflineToOnline method creates a Timer every time - in 24 hours this causes a thread lock reported in threaddump file - solution here is to replace Timer with a Swing task -SwingUtilities.invokeLater(new Runnable()

        Attachments

          Activity

            People

            Assignee:
            mirceac Mircea Carasel
            Reporter:
            mirceac Mircea Carasel
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: