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

Error saving project: System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. #2850

Closed
greenozon opened this issue Nov 26, 2022 · 4 comments · Fixed by #2857
Labels
Bug Decompiler The decompiler engine itself

Comments

@greenozon
Copy link

greenozon commented Nov 26, 2022

Input code

Try to save project to disk
err127.zip

Erroneous output

System.IO.IOException: The filename, directory name, or volume label syntax is incorrect. : 'C:\Tmp\CXorString-IndexList-0-1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16-17-18-19-20-21-22-23-24-25-26-27-28-29-30-31-32-33-34-35-36-37-38-39-40-41-42-43-44-45-46-47-48-49-50-51-52-53-54-55-56-57-58-59-60-61-62-63-64-65-66-67-68-69-70-71-72-73-74-75-76-77-78-79-80-8.cs'
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.StreamWriter..ctor(String path)
   at ICSharpCode.Decompiler.CSharp.ProjectDecompiler.WholeProjectDecompiler.<>c__DisplayClass46_0.<WriteCodeFilesInProject>b__5(IGrouping`2 file) in /_/ICSharpCode.Decompiler/CSharp/ProjectDecompiler/WholeProjectDecompiler.cs:line 262
   at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica.Execute()

Details

  • Product in use: e.g. ILSpy
  • Version in use: ILSpy version 8.0.0.7210-preview2
    .NET version 6.0.11-servicing.22523.4+943474ca16db7c65ba6cff4a89c3ebd219dde3e5
  • Any other relevant information to the issue, or your interest in contributing a fix.

Please note that there is no required info in exception output -assembly file name

@greenozon greenozon added Bug Decompiler The decompiler engine itself labels Nov 26, 2022
@siegfriedpammer
Copy link
Member

Not again

@greenozon
Copy link
Author

Well, this is a tricky case... as somehow generic class is mapped into physical filename...
not sure how to correctly handle it (you never know the lenght of generic class params)

another (small issue) - assembly path/class is not present in stack dump text

@siegfriedpammer
Copy link
Member

You are still on Windows 7?

siegfriedpammer added a commit that referenced this issue Dec 3, 2022
…shows the file being decompiled causing the IOException.
siegfriedpammer added a commit that referenced this issue Dec 3, 2022
…andled correctly by WholeProjectDecompiler.GetFileNameForHandle
siegfriedpammer added a commit that referenced this issue Dec 3, 2022
…andled correctly by WholeProjectDecompiler.GetFileNameForHandle
@siegfriedpammer
Copy link
Member

Thank you for reporting this!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Decompiler The decompiler engine itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants