Comments (13)
from webeye.
WebEye.Controls.WinForms.WebCameraControl v1.0.2 from nuget
from references on project:
Runtime version v2.0.50727
Win10
from webeye.
I am also experiencing the same problem.
System.UnauthorizedAccessException: Access to the path 'C:\Users\DEV\AppData\Local\Temp\tmp707E.tmp' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalDelete(String path, Boolean checkHost)
at System.IO.File.Delete(String path)
at WebEye.Controls.WinForms.StreamPlayerControl.StreamPlayerProxy.Dispose() in D:\dev\GitHub\WebEye\StreamPlayerControl\WinForms\StreamPlayerControl\StreamPlayerControl\StreamPlayerProxy.cs:line 164
at WebEye.Controls.WinForms.StreamPlayerControl.StreamPlayerControl.Dispose(Boolean disposing) in D:\dev\GitHub\WebEye\StreamPlayerControl\WinForms\StreamPlayerControl\StreamPlayerControl\StreamPlayerControl.cs:line 139
at System.ComponentModel.Component.Dispose()
at System.Windows.Forms.Control.Dispose(Boolean disposing)
at System.Windows.Forms.ContainerControl.Dispose(Boolean disposing)
It happens when the parent form of the control is disposed. I suppose it is trying to delete the temporary files. But then when the parent form is implemented with Using theForm ... End Using, it would then delete everything when the form disposes.
Please advice.
Thank you.
from webeye.
that file
C:\Users\DEV\AppData\Local\Temp\tmp707E.tmp
could you please check its attributes? Is it readonly?
from webeye.
that file does not exist whenever I check. I suspect it has been deleted when the parent form is disposed.
from webeye.
Also there is a mad suggestion that you're building it in Desktop folder:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/49676009-106c-41f9-ac29-8fb8954fad75/net-40-unauthorizedaccessexception-with-temp-or-appdata-folders?forum=vbgeneral
from webeye.
I am not building it in Desktop folder. In fact, it is in folder C:\Users\Wilson Eden\Source\Repos\MyProject.
I've played around a bit more and found the file
System.UnauthorizedAccessException: 'Access to the path 'C:\Users\Wilson Eden\AppData\Local\Temp\tmpA203.tmp' is denied.' and it is not read only.
I found a pattern where the error occurs is when we close the parent form before even the first NewFrame; or in other words, the control is still connecting to the camera (rtsp).
If I wait until the control has connected to the camera and closes the parent form, the error does not occur.
from webeye.
And if you run it as administrator, the issue goes away, doesn't it?
from webeye.
Also, can you reproduce the issue using the demo project?
from webeye.
Same results when running it as administrator.
Yes I get the same error using the demo WinForms project (although not always; 1 out of 4 produces the error).
In the StreamPlayerControl.cs:line 139
if (File.Exists(_dllFile))
{
File.Delete(_dllFile);
}
what if we add a checking if the file can be deleted.
from webeye.
I do not think this is an authorisation issue, as the exception suggests. My idea is that FreeLibrary call does not release the dll and that is why File.Delete call fails. The most obvious solution for this would be to wrap File.Delete call in try/catch block. Another option is to keep calling FreeLibrary till the File.Delete call succeeds. I can send you binaries for the latter option.
from webeye.
Hello Team,
Im facing the same issue. every time it fails the tmp filename is different,
C:\Users\Sanchez\AppData\Local\Temp\tmp6195.tmp
C:\Users\Sanchez\AppData\Local\Temp\tmp2AE1.tmp
It happens by more kind of trigger, not only at disposing the form.. when i run into a streamfailed or streamstopped event and i recall with webeye_1.StartPlay again it is success in most of the times, but if i run my app for hours it will definetly run into this TMP thing..
Im using the latest version of the nuget (1.0.6), WPF version, with vb.net. I am not building it in Desktop folder either. It comes if i run with admin too.
My knowledge is not enough to touch the suggested 'the StreamPlayerControl.cs:line 139' file... i have no idea how should i start that. I tried to put the .startplay into a trycatch but it didnt help either....
Can you please help me in this?
Thanks!
Peter B (Hungary)
from webeye.
Hello
Adding one thing: i got the error one time at calling webeye_1.stop too.. i hope it helps to find the reason...
P.
from webeye.
Related Issues (20)
- Gray screen when play H.265 stream HOT 1
- Could not load file or assembly WebEye.Stream.Win32 HOT 11
- memory Leak HOT 1
- Is it possible to support switching between the front / back cameras on a tablet device? HOT 7
- image is horizontally flipped HOT 8
- GetLocalStreams error HOT 4
- 'System.BadImageFormatException' in mscorlib.dll: Could not load file or assembly 'WebEye.Stream.Win32.dll' HOT 4
- I Do All things Ok, but my online stream http don't have voice HOT 4
- Add a License.md
- Video delay of 2 seconds HOT 4
- If i create the control dinamically it stays blank HOT 1
- Error playing RTMPS stream HOT 1
- Missing WebEye.Stream.Win32 and WebEye.Stream.x86 HOT 1
- streaming errors in ffmpeg 4.2.1
- WebEye project from Github HOT 1
- Problem with the dll for 32-bit architectures HOT 1
- Memory Leak / Stream not stopping HOT 1
- Increase the video speed
- Crash with Access Violation on resume after failed stream
- debo instalar algo antes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webeye.