none
Kinect Studio Playback throws Operation is not valid due to the current state of the object RRS feed

  • Question

  • I made a recording in Kinect Studio of a specific session which I need to be able to process (i.e. I cannot do another recording), and when I try to open the recording in Kinect Studio I get the following error message in the log:

    04/30/15 13:00:30.5896:  Cannot open file "D:\Kinect\20150429_152256_00.xef".
    Check the file name and access, and try again.04/30/15 13:00:30.6276:  Operation is not valid due to the current state of the object.

    I have tested with other recordings from the same external drive and they open and play properly. It is as if the state of the recording is corrupt. 

    If I try to open and play the recording via the API in a Visual Studio Solution I get the following error message and stack trace:

    A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.Kinect.Tools.dll
    Operation is not valid due to the current state of the object.
    A first chance exception of type 'System.ArgumentNullException' occurred in Microsoft.Kinect.Tools.dll
    A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll
    A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll

    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.DispatcherOperation.InvokeImpl()
       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.Windows.Threading.DispatcherOperation.Invoke()
       at System.Windows.Threading.Dispatcher.ProcessQueue()
       at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at Ambiana.Analytics.UIApplication.App.Main() in C:\dev\ambiana\Ambiana.Analytics\Ambiana.Analytics.UIApplication\obj\Debug\App.g.cs:line 51
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, 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()</StackTrace><ExceptionString>System.ArgumentNullException: Value cannot be null.
       at Microsoft.Kinect.Tools.ExceptionHelper.ThrowOnNullArg(Object p)
       at Microsoft.Kinect.Tools.KStudioClient.CreatePlaybackFromFileObject(KStudioEventFile file, KStudioEventStreamSelectorCollection streamSelectorCollection, KStudioPlaybackFlags playbackFlags, Boolean disposeFile)
       at Microsoft.Kinect.Tools.KStudioClient.CreatePlayback(KStudioEventFile file)



    • Edited by gumaflux Thursday, April 30, 2015 11:12 AM
    Thursday, April 30, 2015 11:08 AM

Answers

  • If you are able to use other files without issue, then that is a since the file that isn't working is corrupt. Can you load and test the file in Kinect Studio. You can also test the recording to ensure it is good with KSConvert/KSUtil. Depending on the state of the machine that was recording, you may have missed data and the file got corrupt.

    Carmine Sirignano - MSFT

    Thursday, April 30, 2015 10:31 PM

All replies

  • If you are able to use other files without issue, then that is a since the file that isn't working is corrupt. Can you load and test the file in Kinect Studio. You can also test the recording to ensure it is good with KSConvert/KSUtil. Depending on the state of the machine that was recording, you may have missed data and the file got corrupt.

    Carmine Sirignano - MSFT

    Thursday, April 30, 2015 10:31 PM
  • Thanks Carmine. I am assuming there is no means to repair the file given your answer. 
    Tuesday, May 5, 2015 12:27 PM