Comments (8)
What is the detail of the exception? Usually that tells you exactly why it occurred.
from longpath.
Here is the detail:
System.AccessViolationException was unhandled
HResult=-2147467261
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=FRAC
StackTrace:
at Pri.LongPath.NativeMethods.GetSecurityDescriptorLength(IntPtr byteArray)
at Pri.LongPath.Directory.GetAccessControl(String path, AccessControlSections includeSections) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\LongPath\Directory.cs:line 914
at Pri.LongPath.Directory.GetAccessControl(String path) in
REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\LongPath\Directory.cs:line 868
at Pri.LongPath.DirectoryInfo.GetAccessControl() in
REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\LongPath\DirectoryInfo.cs:line 208
at FRAC.FRACMainForm.CheckAccess(DirectoryInfo directory) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 156
at FRAC.FRACMainForm.ProcessFolder(DirectoryInfo root) in
REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 68
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 131
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.ProcessFolderRecursively(DirectoryInfo root) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 141
at FRAC.FRACMainForm.StartButton_Click(Object sender, EventArgs e) in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Form1.cs:line 217
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at FRAC.Program.Main() in REDACTED\Documents\Visual Studio 2010\Projects\FRAC\FRAC\Program.cs:line 18
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
from longpath.
Sorry, accidentally closed it.
Any Ideas?
from longpath.
Still having the same issue, any guidance?
from longpath.
Unfortunately I'm unable to reproduce this so it's hard to do the right thing when it happens. Is there any other detail you can provide, like type of file system being accessed (local, share, soft-link, etc.)? Is it within a domain (security policies that get pushed, etc.). What type of security is on the directories being scanned?
from longpath.
Well upon further investigation it looks like it's related to the issue with UNC paths. The error happens as soon as the UNC path exceeds 250 characters. If this sounds right, i'll close this issue.
from longpath.
I'm seeing the same behavior and I'm fairly certain it only happens when the UNC path exceeds 250 characters. Is there a good way around this or a fix?
Edit: I should say I get the same error message on File.GetAccessRule(\\server\share)
from longpath.
Please try latest code with UNC and reparse point support. I cannot reproduce this with the latest build.
from longpath.
Related Issues (20)
- .NET Standard 2.0 support HOT 2
- DirectoryInfo.Refresh fails with UnauthorizedAccessException if executing principal has no access to parent folder HOT 1
- Path.GetPathRoot() throws ArgumentOutOfRangeException HOT 1
- The filename or extension is too long when creating a Directory on UNC
- Infinite sequence of elements when traversing the directory name consisting of single space HOT 3
- StreamWriter HOT 1
- Regression on 2.0.47.0 for DirectoryInfo HOT 2
- Can you document public methods HOT 1
- Mono support incomplete HOT 5
- File handles not being disposed HOT 2
- Path.GetPathRoot() throws IndexOutOfRangeException
- File.WriteAllText throws System.EntryPointNotFoundException on Mono HOT 1
- Endless loop
- File.Copy does two operations, for not win and then for win
- DirectoryInfo Delete mothod is throw exception HOT 1
- Have you considered merging with System.IO.Abstractions? HOT 1
- Error: Trying to create a parent directory, which exists but the current user has no permissions. HOT 1
- Consider checking for error upon subdirectory creation in Directory.CreateDirectory
- Long UNC pathname containing forward-slash (/) path separators is not normalised correctly
- Error with a really long and strange filename. HOT 5
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 longpath.