[Problem] Stack trace when scanning for protections on some discs #274

Closed
opened 2026-01-29 16:13:27 +00:00 by claunia · 3 comments
Owner

Originally created by @Kreeblah on GitHub (Mar 19, 2021).

Originally assigned to: @mnadareski on GitHub.

Before You Submit

  • Remember to try the latest WIP build to see if the issue has already been addressed.
  • Is it copy protection related? If so, report the issue here instead.
  • .NET Core 3.1 and .NET 5.0 have known issues, please try using another build to reproduce the error
  • Check multiple discs to help narrow down the issue
  • Check the Options to see if changing any of those affects your issue.

If all of those fail, then continue...

Version
What version are you using?

  • Stable release (version here)
  • WIP release bfbae5cf5c

Build
What runtime version are you using?

  • .NET Framework 4.7.2 running on (Operating System)
  • .NET Framework 4.8 running on Windows 10
  • .NET Core 3.1 running on (Operating System)

Describe the issue
When scanning the Descent 3 for Macintosh CD, the process fails with a stack trace in the output. This is the only disc I can repro on so far.

To Reproduce
Steps to reproduce the behavior:

  1. Insert the Descent 3 for Macintosh CD
  2. Click Scan for protection

Expected behavior
I'd expect it to finish cleanly.

Additional context
Sample output:

Scanning for drives..
Found 2 drives: D, E
Trying to detect system for drive E.. unable to detect.
Trying to detect media type for drive E.. Detected Unknown.
Supported media speeds: 1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 32, 40, 44, 48, 52, 56, 72
Setting drive speed to: 72
Changed system to: Apple Macintosh
Scanning for copy protection in E
0.00%:  - 
0.00%: E:\AppleShare PDS - Checking file
Detected the following protections in E:

Path could not be scanned! System.IO.IOException: The disk structure is corrupted and unreadable.

   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at System.IO.File.OpenRead(String path)
   at BurnOutSharp.Scanner.GetInternalProtections(String file)
   at BurnOutSharp.Scanner.GetProtections(List`1 paths)
   at BurnOutSharp.Scanner.GetProtections(String path)
   at MPF.Utilities.Validators.<>c__DisplayClass5_0.<RunProtectionScanOnPath>b__2() in C:\tmpgit\MPF\MPF.Library\Utilities\Validators.cs:line 1035
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MPF.Utilities.Validators.<RunProtectionScanOnPath>d__5.MoveNext() in C:\tmpgit\MPF\MPF.Library\Utilities\Validators.cs:line 1026
Originally created by @Kreeblah on GitHub (Mar 19, 2021). Originally assigned to: @mnadareski on GitHub. **Before You Submit** - Remember to try the [latest WIP build](https://ci.appveyor.com/project/mnadareski/mpf/build/artifacts) to see if the issue has already been addressed. - Is it copy protection related? If so, report the issue [here](https://github.com/mnadareski/BurnOutSharp/issues) instead. - .NET Core 3.1 and .NET 5.0 have known issues, please try using another build to reproduce the error - Check multiple discs to help narrow down the issue - Check the Options to see if changing any of those affects your issue. If all of those fail, then continue... **Version** What version are you using? - [ ] Stable release (version here) - [x] WIP release https://github.com/SabreTools/MPF/commit/bfbae5cf5c9d1d406eac77fcb162c8acd8dfd355 **Build** What runtime version are you using? - [ ] .NET Framework 4.7.2 running on (Operating System) - [x] .NET Framework 4.8 running on Windows 10 - [ ] .NET Core 3.1 running on (Operating System) **Describe the issue** When scanning the Descent 3 for Macintosh CD, the process fails with a stack trace in the output. This is the only disc I can repro on so far. **To Reproduce** Steps to reproduce the behavior: 1. Insert the Descent 3 for Macintosh CD 2. Click `Scan for protection` **Expected behavior** I'd expect it to finish cleanly. **Additional context** Sample output: ``` Scanning for drives.. Found 2 drives: D, E Trying to detect system for drive E.. unable to detect. Trying to detect media type for drive E.. Detected Unknown. Supported media speeds: 1, 2, 3, 4, 6, 8, 12, 16, 20, 24, 32, 40, 44, 48, 52, 56, 72 Setting drive speed to: 72 Changed system to: Apple Macintosh Scanning for copy protection in E 0.00%: - 0.00%: E:\AppleShare PDS - Checking file Detected the following protections in E: Path could not be scanned! System.IO.IOException: The disk structure is corrupted and unreadable. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.OpenRead(String path) at BurnOutSharp.Scanner.GetInternalProtections(String file) at BurnOutSharp.Scanner.GetProtections(List`1 paths) at BurnOutSharp.Scanner.GetProtections(String path) at MPF.Utilities.Validators.<>c__DisplayClass5_0.<RunProtectionScanOnPath>b__2() in C:\tmpgit\MPF\MPF.Library\Utilities\Validators.cs:line 1035 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MPF.Utilities.Validators.<RunProtectionScanOnPath>d__5.MoveNext() in C:\tmpgit\MPF\MPF.Library\Utilities\Validators.cs:line 1026 ```
claunia added the bug label 2026-01-29 16:13:28 +00:00
Author
Owner

@mnadareski commented on GitHub (Mar 19, 2021):

The actual error you're getting, Path could not be scanned! System.IO.IOException: The disk structure is corrupted and unreadable. is thrown by the standard library code. It means it can't read the disc itself for some reason. I'm not sure right now how much work I can reasonably do to get around that for scanning. I'll see if I can get that as a verbose log only.

@mnadareski commented on GitHub (Mar 19, 2021): The actual error you're getting, `Path could not be scanned! System.IO.IOException: The disk structure is corrupted and unreadable.` is thrown by the standard library code. It means it can't read the disc itself for some reason. I'm not sure right now how much work I can reasonably do to get around that for scanning. I'll see if I can get that as a verbose log only.
Author
Owner

@Kreeblah commented on GitHub (Mar 19, 2021):

Ah, yeah, reporting it at a lower level instead would make sense.

@Kreeblah commented on GitHub (Mar 19, 2021): Ah, yeah, reporting it at a lower level instead would make sense.
Author
Owner

@mnadareski commented on GitHub (Mar 20, 2021):

I can't really make it so that the error doesn't happen, but this makes MPF far smarter about dealing with any resulting exceptions.

@mnadareski commented on GitHub (Mar 20, 2021): I can't really make it so that the error doesn't happen, but this makes MPF far smarter about dealing with any resulting exceptions.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#274