← Back to team overview

sikuli-driver team mailing list archive

[Bug 1046251] Re: deleteOnExit() method not working after *.skl file execution

 

** Changed in: sikuli
       Status: New => In Progress

** Changed in: sikuli
    Milestone: None => x1.0

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

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

Title:
  deleteOnExit() method not working after *.skl file execution

Status in Sikuli:
  In Progress

Bug description:
  *.sikuli folder extracted to "tmp -- *" folder in java tmp path , from
  *.skl file during execution, is not removed at the end of the JVM
  termination . Accumulation of these "tmp -- *" folders may create
  space issue.

  1. The version of Sikuli you were using.
       => sikuli X-1.0rc3 ( r905 )
  2. Your operating system, 32-bit or 64-bit, and its version.
       => Windows XP SP3 - ( 32 bit OS )
  3. The procedure to reproduce the bug.
       => run any sikuli executable ( *.skl ) file using "Sikuli-IDE.bat"
  4. Any information that might help us to locate the bug.
       => tempDir.deleteOnExit() method is not working as expected. [  method createTempDir() in org.sikuli.ide.Utils.java file ]
            There are lot of discussion about why deleteOnExit() not working. Bug reported and never arrived solution . Please refer  http://bugs.sun.com/view_bug.do?bug_id=4171239 

             I would suggest to use tmpDir.delete() in runSkl method in
  org.sikuli.ide.SikuliIDE.java ,

             public static int runSkl(String filename, String[] args) throws IOException{
                _runningSkl = true;
                File file = new File(filename);
                if(!file.exists())
                   throw new IOException(filename + ": No such file");
                String name = file.getName();
                name = name.substring(0, name.lastIndexOf('.'));
                File tmpDir = Utils.createTempDir();
                File sikuliDir = new File(tmpDir + File.separator + name + ".sikuli");
                sikuliDir.mkdir();
                Utils.unzip(filename, sikuliDir.getAbsolutePath());
                int returnCode  = runSikuli(sikuliDir.getAbsolutePath(), args);
                tmpDir.delete();
                return returnCode ;
             }

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


References