0

It happens every time after a file is selected after clicking that button. servicefactory is what is used to interface with SDK. Also I noticed this started happening after i ran some registry cleaner. I tried reinstalling drivers but still same error. view detail error

private ServiceFactory serviceFactory; private PlaybackServices playbackServices = null; public Form1() { InitializeComponent(); serviceFactory = ServiceFactory.GetInstance(); } private void buttonOpenFile_Click(object sender, EventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); openFileDialog.Filter = "Video Files (*.avi;*.mpg;*.mkv;*.ts;*.dvr-ms;*.mp3;*.wtv)|*.avi;*.mpg;*.mkv;*.ts;*.dvr-ms;*.mp3;*.wtv|All files (*.*)|*.*"; // show dialog if (openFileDialog.ShowDialog() == DialogResult.OK) { playbackServices = serviceFactory.StartPlayback(pictureBox1.Handle, openFileDialog.FileName); //player.ShowSubtitles(); } } 

Output:

The thread 0x1218 has exited with code 0 (0x0). 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Program Files (x86)\WinTV\WinTVSDK Version 1.1.34005\WinTVSDKTest\bin\Release\WinTVSDKTest.exe'. Symbols loaded. 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\DataModel\v4.0_1.1.34005.0__c464d85212b4d2d7\DataModel.dll'. Cannot find or open the PDB file. 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\WinTVPublic\v4.0_1.1.34005.0__c464d85212b4d2d7\WinTVPublic.dll'. Cannot find or open the PDB file. 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\MultiMediaServices\v4.0_1.1.34005.0__c464d85212b4d2d7\MultiMediaServices.dll'. Cannot find or open the PDB file. 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\NativeMMS\v4.0_1.1.34005.0__c464d85212b4d2d7\NativeMMS.dll'. Cannot find or open the PDB file. Exception thrown: 'System.Xml.XmlException' in System.Xml.dll Exception thrown: 'System.NullReferenceException' in DataModel.dll Exception thrown: 'System.NullReferenceException' in DataModel.dll 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'. Symbols loaded. 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll'. Symbols loaded. 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data.OracleClient\v4.0_4.0.0.0__b77a5c561934e089\System.Data.OracleClient.dll'. Symbols loaded. 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.Transactions\v4.0_4.0.0.0__b77a5c561934e089\System.Transactions.dll'. Symbols loaded. 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'. Symbols loaded. 'WinTVSDKTest.vshost.exe' (CLR v4.0.30319: WinTVSDKTest.vshost.exe): Loaded 'C:\Windows\Microsoft.Net\assembly\GAC_32\System.EnterpriseServices\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.Wrapper.dll'. Symbols loaded. Exception thrown: 'System.TypeInitializationException' in DataModel.dll System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>WinTVSDKTest.vshost.exe</AppDomain><Exception><ExceptionType>System.TypeInitializationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The type initializer for 'TVServices.Core.SystemSettings' threw an exception.</Message><StackTrace> at TVServices.Core.SystemSettings.GetInstance() at NativeMMS.VideoRenderer.CreateVideoRendererHelper(IGraphBuilder* pGB) at NativeMMS.PlaybackVideoFile.PlayFile(IntPtr hwndIntPtr, String filename) at TVServices.MultiMedia.ServiceFactory.PlayFile(IntPtr hwnd, String filename) at WinTVPublic.ServiceFactory.StartPlayback(IntPtr windowHandle, String filename) at WinTVSDKTest.Form1.buttonOpenFile_Click(Object sender, EventArgs e) in C:\Users\o_abdulrahman\Documents\Visual Studio 2015\Projects\WinTV\WinTVSDK Version 1.1.34005\WinTVSDKTest\Form1.cs:line 334 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message&amp;amp; m) at System.Windows.Forms.ButtonBase.WndProc(Message&amp;amp; m) at System.Windows.Forms.Button.WndProc(Message&amp;amp; m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; 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 System.Windows.Forms.Application.Run(Form mainForm) at WinTVSDKTest.Program.Main() in C:\Users\o_abdulrahman\Documents\Visual Studio 2015\Projects\WinTV\WinTVSDK Version 1.1.34005\WinTVSDKTest\Program.cs:line 17 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel) at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData) at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext) at System.Activator.CreateInstance(ActivationContext activationContext) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 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()</StackTrace><ExceptionString>System.TypeInitializationException: The type initializer for 'TVServices.Core.SystemSettings' threw an exception. ---&amp;gt; System.NullReferenceException: Object reference not set to an instance of an object. at TVServices.Core.SystemSettings..ctor() at TVServices.Core.SystemSettings..cctor() --- End of inner exception stack trace --- at TVServices.Core.SystemSettings.GetInstance() at NativeMMS.VideoRenderer.CreateVideoRendererHelper(IGraphBuilder* pGB) at NativeMMS.PlaybackVideoFile.PlayFile(IntPtr hwndIntPtr, String filename) at TVServices.MultiMedia.ServiceFactory.PlayFile(IntPtr hwnd, String filename) at WinTVPublic.ServiceFactory.StartPlayback(IntPtr windowHandle, String filename) at WinTVSDKTest.Form1.buttonOpenFile_Click(Object sender, EventArgs e) in C:\Users\o_abdulrahman\Documents\Visual Studio 2015\Projects\WinTV\WinTVSDK Version 1.1.34005\WinTVSDKTest\Form1.cs:line 334 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message&amp;amp; m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message&amp;amp; m) at System.Windows.Forms.ButtonBase.WndProc(Message&amp;amp; m) at System.Windows.Forms.Button.WndProc(Message&amp;amp; m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp;amp; m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp;amp; m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&amp;amp; 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 System.Windows.Forms.Application.Run(Form mainForm) at WinTVSDKTest.Program.Main() in C:\Users\o_abdulrahman\Documents\Visual Studio 2015\Projects\WinTV\WinTVSDK Version 1.1.34005\WinTVSDKTest\Program.cs:line 17 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel) at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData) at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext) at System.Activator.CreateInstance(ActivationContext activationContext) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) 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()</ExceptionString><InnerException><ExceptionType>System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Object reference not set to an instance of an object.</Message><StackTrace> at TVServices.Core.SystemSettings..ctor() at TVServices.Core.SystemSettings..cctor()</StackTrace><ExceptionString>System.NullReferenceException: Object reference not set to an instance of an object. at TVServices.Core.SystemSettings..ctor() at TVServices.Core.SystemSettings..cctor()</ExceptionString></InnerException></Exception></TraceRecord> 
2
  • Please print full stack trace of exception. It would be more helpful. Commented Mar 10, 2017 at 13:14
  • Ok i added full output Commented Mar 10, 2017 at 13:33

0