deleteOnExit() method not working after *.skl file execution --- completely revised in 1.1.0

Bug #1046251 reported by Sairam Pooraj
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Committed
Critical
RaiMan

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 ;
           }

Tags: deleteonexit
RaiMan (raimund-hocke)
Changed in sikuli:
status: New → In Progress
milestone: none → x1.0
assignee: nobody → RaiMan (raimund-hocke)
RaiMan (raimund-hocke)
tags: added: general
RaiMan (raimund-hocke)
tags: added: deleteonexit
RaiMan (raimund-hocke)
tags: removed: general
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Undecided → High
RaiMan (raimund-hocke)
Changed in sikuli:
importance: High → Low
milestone: x1.0 → x1.1
RaiMan (raimund-hocke)
Changed in sikuli:
status: In Progress → Fix Committed
importance: Low → High
RaiMan (raimund-hocke)
Changed in sikuli:
importance: High → Critical
summary: - deleteOnExit() method not working after *.skl file execution
+ deleteOnExit() method not working after *.skl file execution ---
+ completely revised in 1.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.