[Problem] MPF silently closes while scanning for protection #266

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

Originally created by @Nithanim on GitHub (Jan 23, 2021).

Originally assigned to: @mnadareski on GitHub.

Version
What version are you using?

Build
What runtime version are you using?

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

DotNetVersions gave me:

Currently installed "classic" .NET Versions in the system:
2.0.50727.4927 Service Pack 2
3.0.30729.4926 Service Pack 2
3.5.30729.4926 Service Pack 1
4.0.0.0
4.8.04084

Describe the issue
I have successfully dumped multiple discs by now but with one specific disk, MPF just closes while creating the dump. It is related to the "Protection Scan" because when disabled in the Options, the dumping process completes without any issue. I am not sure whose fault (MPF or BurnOutSharp) it is exactly but at least a popup about the problem would be nice instead of a silent crash to desktop.

One tip I got from another issue was to look in the Event Viewer where I found:

Application: MPF.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.FormatException
   at System.Text.StringBuilder.AppendFormatHelper(System.IFormatProvider, System.String, System.ParamsArray)
   at System.String.FormatHelper(System.IFormatProvider, System.String, System.ParamsArray)
   at System.String.Format(System.String, System.Object[])
   at MPF.LoggerViewModel.VerboseLogLn(System.String, System.Object[])
   at MPF.Windows.MainWindow.ProgressUpdated(System.Object, BurnOutSharp.ProtectionProgress)
   at System.Progress`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InvokeHandlers(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run(System.Windows.Window)
   at System.Windows.Application.Run()
   at MPF.App.Main()

To Reproduce
Steps to reproduce the behavior:

  1. Open MPF
  2. Select IBM PC Compatible and CD-ROM
  3. Press "Start Dumping"

Expected behavior
Showing at least some error message what happened and not just crashing silently.

Screenshots
None

Additional context
Might be related to #232 because of that issue I now tested specifically with Crysis Warhead and it crashed with exactly the same stacktrace. Although, my game is older and nobody knows it (CD-ROM) and Crysis Warhead is a DVD Game.

Originally created by @Nithanim on GitHub (Jan 23, 2021). Originally assigned to: @mnadareski on GitHub. **Version** What version are you using? - [X] Stable release (1.18) - [X] WIP release ([net48 of 47b5bbe7](https://ci.appveyor.com/project/mnadareski/mpf/builds/37403656/artifacts)) **Build** What runtime version are you using? - [ ] .NET Framework 4.7.2 running on (Operating System) - [X] .NET Framework 4.8 running on (Win10) - [ ] .NET Core 3.1 running on (Operating System) [DotNetVersions](https://github.com/jmalarcon/DotNetVersions) gave me: ``` Currently installed "classic" .NET Versions in the system: 2.0.50727.4927 Service Pack 2 3.0.30729.4926 Service Pack 2 3.5.30729.4926 Service Pack 1 4.0.0.0 4.8.04084 ``` **Describe the issue** I have successfully dumped multiple discs by now but with one specific disk, MPF just closes while creating the dump. It is related to the "Protection Scan" because when disabled in the Options, the dumping process completes without any issue. I am not sure whose fault (MPF or BurnOutSharp) it is exactly but at least a popup about the problem would be nice instead of a silent crash to desktop. One tip I got from another issue was to look in the Event Viewer where I found: ``` Application: MPF.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.FormatException at System.Text.StringBuilder.AppendFormatHelper(System.IFormatProvider, System.String, System.ParamsArray) at System.String.FormatHelper(System.IFormatProvider, System.String, System.ParamsArray) at System.String.Format(System.String, System.Object[]) at MPF.LoggerViewModel.VerboseLogLn(System.String, System.Object[]) at MPF.Windows.MainWindow.ProgressUpdated(System.Object, BurnOutSharp.ProtectionProgress) at System.Progress`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InvokeHandlers(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object) at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame) at System.Windows.Application.RunDispatcher(System.Object) at System.Windows.Application.RunInternal(System.Windows.Window) at System.Windows.Application.Run(System.Windows.Window) at System.Windows.Application.Run() at MPF.App.Main() ``` **To Reproduce** Steps to reproduce the behavior: 1. Open MPF 2. Select IBM PC Compatible and CD-ROM 3. Press "Start Dumping" **Expected behavior** Showing at least some error message what happened and not just crashing silently. **Screenshots** None **Additional context** Might be related to #232 because of that issue I now tested specifically with Crysis Warhead and it crashed with exactly the same stacktrace. Although, [my game is older and nobody knows it](https://en.wikipedia.org/wiki/Trade_Empires) (CD-ROM) and [Crysis Warhead](https://en.wikipedia.org/wiki/Crysis_Warhead) is a DVD Game.
claunia added the bug label 2026-01-29 16:13:13 +00:00
Author
Owner

@mnadareski commented on GitHub (Jan 25, 2021):

Looks like a logging issue, so possibly addressed as of 5dd36d7b06
I won't close this until it's confirmed, though. Seems like an easy test to just hit the scan for protection.

@mnadareski commented on GitHub (Jan 25, 2021): Looks like a logging issue, so possibly addressed as of https://github.com/SabreTools/MPF/commit/5dd36d7b06f9142ca3151dbc64f60ba8e401736a I won't close this until it's confirmed, though. Seems like an easy test to just hit the scan for protection.
Author
Owner

@Nithanim commented on GitHub (Jan 25, 2021):

Thank you very much! 2957370f works flawlessly now.

@Nithanim commented on GitHub (Jan 25, 2021): Thank you very much! 2957370f works flawlessly now.
Author
Owner

@mnadareski commented on GitHub (Jan 25, 2021):

Gonna admit, I'm a bit surprised, but I'll take it. Closing this out.

@mnadareski commented on GitHub (Jan 25, 2021): Gonna admit, I'm a bit surprised, but I'll take it. Closing this out.
Author
Owner

@Nithanim commented on GitHub (Jan 25, 2021):

Yeah, I did not know if the library returned something bad or the logging framework had a bug. But with your changes the protection for both my game and Crysis Warhead are reported and the MPF continues to run happily. 👍

@Nithanim commented on GitHub (Jan 25, 2021): Yeah, I did not know if the library returned something bad or the logging framework had a bug. But with your changes the protection for both my game and Crysis Warhead are reported and the MPF continues to run happily. :+1:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#266