EpicKitten / PUBG-Replay-Manager

Shows undocumented information from PUBG replays, and has the ability to import and export replays
GNU General Public License v3.0
51 stars 14 forks source link

Crash on deleted replay artifact #13

Open swreeser opened 6 years ago

swreeser commented 6 years ago

Had an error loading the project up the first time. Went away when I deleted the older replay files in AppData

System.IO.FileNotFoundException
  HResult=0x80070002
  Message=Could not find file 'C:\Users\user\AppData\Local\TslGame\Saved\Demos\match.bro.official.2017-pre6.na.duo.2017.12.08.612d9b1e-f211-4f03-8cc4-0df9f1d3c084__USER__76561198058777702\PUBG.replayinfo'.
  Source=mscorlib
  StackTrace:
   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, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.File.InternalReadAllBytes(String path, Boolean checkHost)
   at PUBG_Replay_Manager.Main.UE4StringSerializer(String file_path, Boolean encoded, Int32 encoded_offset) in D:\dev\pubgrm\PUBG_Replay_Manager\Main.cs:line 497
   at PUBG_Replay_Manager.Main.ReadReplayInfo(String directory_of_recording) in D:\dev\pubgrm\PUBG_Replay_Manager\Main.cs:line 544
   at PUBG_Replay_Manager.Main.RefreshReplayList() in D:\dev\pubgrm\PUBG_Replay_Manager\Main.cs:line 54
   at PUBG_Replay_Manager.Main.replayListRefresh_Click(Object sender, EventArgs e) in D:\dev\pubgrm\PUBG_Replay_Manager\Main.cs:line 913
   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& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& 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 PUBG_Replay_Manager.Program.Main() in D:\dev\pubgrm\PUBG_Replay_Manager\Program.cs:line 17
$ dir C:/Users/user/AppData/Local/TslGame/Saved/Demos
match.bro.official.2017-pre6.na.duo.2017.12.08.612d9b1e-f211-4f03-8cc4-0df9f1d3c084__USER__76561198058777702
match.bro.official.2017-pre6.na.duo.2017.12.09.07a562ae-b0d2-4200-b561-78857b414e4c__USER__76561198058777702
match.bro.official.2017-pre6.na.duo.2017.12.11.f064be80-992b-4c8f-8707-4dfacfc07c60__USER__76561198058777702
match.bro.official.2017-pre6.na.duo.2017.12.11.f0f94fb8-6bca-4c2a-9df4-e756aa6ce906__USER__76561198058777702
match.bro.official.2017-pre6.na.solo-fpp.2017.12.08.0f672e5f-a939-4c81-b19a-9b35b03cfb50__USER__76561198058777702
match.bro.official.2018-02.as.duo.2018.02.18.03dc150a-8c16-4179-8bd8-2130eb72d7c3__USER__8c1b0bc4d5b75f60b85192638f2863f0
match.bro.official.2018-02.na.duo.2018.02.09.64df1099-7be3-47bb-8681-215c0709b4e6__USER__8c1b0bc4d5b75f60b85192638f2863f0
match.bro.official.2018-02.na.duo.2018.02.14.5210ce3f-cd32-493b-a012-bb0f44ec62a3__USER__8c1b0bc4d5b75f60b85192638f2863f0
match.bro.official.2018-02.na.duo.2018.02.20.779b9439-6c7c-4f4b-a971-de5065df78f7__USER__8c1b0bc4d5b75f60b85192638f2863f0
match.bro.official.2018-02.na.duo.2018.02.21.5a741a4d-38aa-46ef-91c4-1a8b0898640d__USER__8c1b0bc4d5b75f60b85192638f2863f0
match.bro.official.2018-02.na.duo.2018.02.21.bd796a96-e354-4087-bbcd-8dcfe54f3ffc__USER__8c1b0bc4d5b75f60b85192638f2863f0
...

The "2017" directories just contained a checkpoints directory with a checkpoints## file in it.

EpicKitten commented 6 years ago

Will add a check in 1.1