Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temp directory access violation during clean up (remove) ... maybe just WinXP #251

Closed
ldpgh opened this issue Apr 2, 2016 · 3 comments
Closed
Labels

Comments

@ldpgh
Copy link
Contributor

ldpgh commented Apr 2, 2016

Context ...

  • OS=WinXP, User="Admin"-Rights
  • own compile using Intelly 2016.1 / WinXP / Java 8 ... but seems the same for public Win32 release download package
  • Unpacked openCV data are not removed from the Temp-directory.
  • But there is no issue with manual remove of the files/directory afterwards

In the IDE following stacktrace has been created while running and immediately leaving the executable (Exit)

C:\Programme\Java\jdk1.8.0_77\bin\java ...
12:42:17,432 INFO Configuration No packages.xml found in configuration directory, loading defaults.
12:42:18,274 INFO Configuration No parts.xml found in configuration directory, loading defaults.
12:42:18,304 INFO Configuration No machine.xml found in configuration directory, loading defaults.
12:42:22,079 INFO Configuration Defaults were loaded. Saving to configuration directory.
Exception in thread "Thread-6" java.lang.RuntimeException: java.nio.file.AccessDeniedException: C:\DOKUME1\LOKALE1\Temp\6669052286423873460\nu\pattern\opencv\windows\x86_32\opencv_java2411.dll
at nu.pattern.OpenCV$TemporaryDirectory.delete(OpenCV.java:146)
at nu.pattern.OpenCV$TemporaryDirectory$1.run(OpenCV.java:117)
Caused by: java.nio.file.AccessDeniedException: C:\DOKUME1\LOKALE1\Temp\6669052286423873460\nu\pattern\opencv\windows\x86_32\opencv_java2411.dll
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
at java.nio.file.Files.deleteIfExists(Files.java:1165)
at nu.pattern.OpenCV$TemporaryDirectory$2.visitFile(OpenCV.java:141)
at nu.pattern.OpenCV$TemporaryDirectory$2.visitFile(OpenCV.java:130)
at java.nio.file.Files.walkFileTree(Files.java:2670)
at java.nio.file.Files.walkFileTree(Files.java:2742)
at nu.pattern.OpenCV$TemporaryDirectory.delete(OpenCV.java:130)
... 1 more

Process finished with exit code 0

@ldpgh ldpgh changed the title WinXP ... Temp directory access violation during clean up (remove) Temp directory access violation during clean up (remove) ... maybe just WinXP Apr 2, 2016
@vonnieda
Copy link
Member

vonnieda commented Apr 2, 2016

This is sort of a known issue in the OpenCV bindings we use. More information here: PatternConsulting/opencv#10

There is a fix/hack here that might help address this: phrack/ShootOFF#407

Leaving this open as we do need to come up with a fix for it in https://github.com/openpnp/opencv and then bring in the fixed version.

@ldpgh
Copy link
Contributor Author

ldpgh commented Apr 5, 2016

Maybe ...
(1) During session add an additional openpnp-directory and store the current temp directory name (e.g. <random_tempdir_name>..\my_openpnp_storage_dir\my_storagefile.txt)
(2) Next time on startup look in the known location for old directory names stored and do whatever is appropriate (e.g. delete old stuff) with it.

@vonnieda vonnieda added the bug label May 26, 2016
@vonnieda
Copy link
Member

This was fixed a while back in openpnp/opencv#9. Due to the difficulty of actually removing the DLL on shutdown, now we instead just clean up any old ones we find on startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants