← Back to team overview

sikuli-driver team mailing list archive

[Bug 1809881] [NEW] Object leaking when multiple VNCScreen objects are created

 

Public bug reported:

This piece of code below keeps the VNCScreen object in the HashMap.
https://github.com/RaiMan/SikuliX-2014/blob/develop/API/src/main/java/org/sikuli/vnc/VNCScreen.java
from lines 59:

public void stop() {
    try {
      close();
    } catch (IOException e) {
      Debug.error("VNCScreen: stop: %s", e.getMessage());
    }
    screens.put(this, null);
  }

Need a public api so that the VNCScrren Object can be removed from the cache when stop() is called.
Cannot use stopAll as the scenario where this is being used there can be mutiple VNCScreens and need to remove the specific VNCScreen object with disturbing or removing other VNCScrren objects.

Sikuli Version being used is 1.1.4. Operating system being used is
Windows 64 bit.

Multiple creation of VNCScreen Object with same VNCClient. The hash map overflows ie the Java responds with out of memrory exception. 
To reproduce keep the max size of heap of java to be 1GM , create mutiple vncscreen objects  with same client and run that in a loop of 1000000.

** Affects: sikuli
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1809881

Title:
  Object leaking when multiple VNCScreen  objects are created

Status in Sikuli:
  New

Bug description:
  This piece of code below keeps the VNCScreen object in the HashMap.
  https://github.com/RaiMan/SikuliX-2014/blob/develop/API/src/main/java/org/sikuli/vnc/VNCScreen.java
  from lines 59:

  public void stop() {
      try {
        close();
      } catch (IOException e) {
        Debug.error("VNCScreen: stop: %s", e.getMessage());
      }
      screens.put(this, null);
    }

  Need a public api so that the VNCScrren Object can be removed from the cache when stop() is called.
  Cannot use stopAll as the scenario where this is being used there can be mutiple VNCScreens and need to remove the specific VNCScreen object with disturbing or removing other VNCScrren objects.

  Sikuli Version being used is 1.1.4. Operating system being used is
  Windows 64 bit.

  Multiple creation of VNCScreen Object with same VNCClient. The hash map overflows ie the Java responds with out of memrory exception. 
  To reproduce keep the max size of heap of java to be 1GM , create mutiple vncscreen objects  with same client and run that in a loop of 1000000.

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1809881/+subscriptions


Follow ups