rie-kumar / MusicVideoPlayer

An IPA plugin for playing videos inside BeatSaber
18 stars 3 forks source link

Game sometimes crashes when downloading a video #31

Closed Kevga closed 3 years ago

Kevga commented 3 years ago

Game sometimes crashes upon clicking the "Download" button in the video selection screen. Not sure how to reproduce reliably, happens every so often.

Game Version: 1.11.1 Plugin Version: 1.11.2 (also happened with 1.11.1, it's not a recent regression)

Log:


[DEBUG @ 16:48:50 | Music Video Player] Done Waiting for other search
[DEBUG @ 16:48:50 | Music Video Player] Invoking Callback
[INFO @ 16:48:50 | Music Video Player] Updating Search Results
[INFO @ 16:48:57 | Music Video Player] Updating Search Results
[CRITICAL @ 16:48:57 | UnityEngine] InvalidOperationException: No process is associated with this object.
[CRITICAL @ 16:48:57 | UnityEngine] System.Diagnostics.Process.EnsureState (System.Diagnostics.Process+State state) (at <ae22a4e8f83c41d69684ae7f557133d9>:0)
[CRITICAL @ 16:48:57 | UnityEngine] System.Diagnostics.Process.get_HasExited () (at <ae22a4e8f83c41d69684ae7f557133d9>:0)
[CRITICAL @ 16:48:57 | UnityEngine] (wrapper remoting-invoke-with-check) System.Diagnostics.Process.get_HasExited()
[CRITICAL @ 16:48:57 | UnityEngine] MusicVideoPlayer.YT.YouTubeSearcher+<>c__DisplayClass4_1.<SearchYoutubeWithMyExeCoroutine>b__5 () (at <50b6aabf87f54bab93d316559e07d30f>:0)
[CRITICAL @ 16:48:57 | UnityEngine] UnityEngine.WaitUntil.get_keepWaiting () (at <6a27f5ccf1f84e47b130b28f8d65abee>:0)
[CRITICAL @ 16:48:57 | UnityEngine] UnityEngine.CustomYieldInstruction.MoveNext () (at <6a27f5ccf1f84e47b130b28f8d65abee>:0)
[CRITICAL @ 16:48:57 | UnityEngine] UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <6a27f5ccf1f84e47b130b28f8d65abee>:0)
[CRITICAL @ 16:48:59 | UnityEngine] InvalidOperationException: No process is associated with this object.
[CRITICAL @ 16:48:59 | UnityEngine] System.Diagnostics.Process.EnsureState (System.Diagnostics.Process+State state) (at <ae22a4e8f83c41d69684ae7f557133d9>:0)
[CRITICAL @ 16:48:59 | UnityEngine] System.Diagnostics.Process.EnsureState (System.Diagnostics.Process+State state) (at <ae22a4e8f83c41d69684ae7f557133d9>:0)
[CRITICAL @ 16:48:59 | UnityEngine] System.Diagnostics.Process.GetProcessHandle (System.Int32 access, System.Boolean throwIfExited) (at <ae22a4e8f83c41d69684ae7f557133d9>:0)
[CRITICAL @ 16:48:59 | UnityEngine] System.Diagnostics.Process.GetProcessHandle (System.Int32 access) (at <ae22a4e8f83c41d69684ae7f557133d9>:0)
[CRITICAL @ 16:48:59 | UnityEngine] System.Diagnostics.Process.Kill () (at <ae22a4e8f83c41d69684ae7f557133d9>:0)
[CRITICAL @ 16:48:59 | UnityEngine] (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Kill()
[CRITICAL @ 16:48:59 | UnityEngine] MusicVideoPlayer.YT.YouTubeDownloader.Timeout (System.Diagnostics.Process processToKill) (at <50b6aabf87f54bab93d316559e07d30f>:0)
[CRITICAL @ 16:48:59 | UnityEngine] MusicVideoPlayer.YT.YouTubeDownloader+<Countdown>d__37.MoveNext () (at <50b6aabf87f54bab93d316559e07d30f>:0)
[CRITICAL @ 16:48:59 | UnityEngine] UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <6a27f5ccf1f84e47b130b28f8d65abee>:0)
[CRITICAL @ 16:48:59 | UnityEngine] ArgumentOutOfRangeException: Index and length must refer to a location within the string.
[CRITICAL @ 16:48:59 | UnityEngine] Parameter name: length
[CRITICAL @ 16:48:59 | UnityEngine] System.String.Substring (System.Int32 startIndex, System.Int32 length) (at <437ba245d8404784b9fbab9b439ac908>:0)
[CRITICAL @ 16:48:59 | UnityEngine] MusicVideoPlayer.YT.YTResult.ToString () (at <50b6aabf87f54bab93d316559e07d30f>:0)
[CRITICAL @ 16:48:59 | UnityEngine] MusicVideoPlayer.VideoMenu.OnSelectCell (HMUI.TableView view, System.Int32 idx) (at <50b6aabf87f54bab93d316559e07d30f>:0)
[CRITICAL @ 16:48:59 | UnityEngine] System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
[CRITICAL @ 16:48:59 | UnityEngine] Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
[CRITICAL @ 16:48:59 | UnityEngine] System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
[CRITICAL @ 16:48:59 | UnityEngine] System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
[CRITICAL @ 16:48:59 | UnityEngine] BeatSaberMarkupLanguage.Parser.BSMLAction.Invoke (System.Object[] parameters) (at <0dd566187e814613a1a7c752fbceded4>:0)
[CRITICAL @ 16:48:59 | UnityEngine] BeatSaberMarkupLanguage.TypeHandlers.CustomListTableDataHandler+<>c__DisplayClass2_0.<HandleType>b__0 (HMUI.TableView table, System.Int32 index) (at <0dd566187e814613a1a7c752fbceded4>:0)
[CRITICAL @ 16:48:59 | UnityEngine] HMUI.TableView.DidSelectCellWithIdx (System.Int32 idx) (at <f991bc79e4b84cadafb1dae444cf9a4e>:0)
[CRITICAL @ 16:48:59 | UnityEngine] HMUI.TableView.CellSelectionStateDidChange (HMUI.TableCell changedCell) (at <f991bc79e4b84cadafb1dae444cf9a4e>:0)
[CRITICAL @ 16:48:59 | UnityEngine] HMUI.TableCell.ChangeSelection (System.Boolean value, HMUI.TableCell+TransitionType transitionType, System.Boolean callbackTable, System.Boolean ignoreCurrentValue) (at <f991bc79e4b84cadafb1dae444cf9a4e>:0)
[CRITICAL @ 16:48:59 | UnityEngine] HMUI.TableCell.set_selected (System.Boolean value) (at <f991bc79e4b84cadafb1dae444cf9a4e>:0)
[CRITICAL @ 16:48:59 | UnityEngine] HMUI.TableCell.InternalToggle () (at <f991bc79e4b84cadafb1dae444cf9a4e>:0)
[CRITICAL @ 16:48:59 | UnityEngine] HMUI.TableCell.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at <f991bc79e4b84cadafb1dae444cf9a4e>:0)
[CRITICAL @ 16:48:59 | UnityEngine] UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at <d6d0977df2b34ec4b0770b8e0041b56d>:0)
[CRITICAL @ 16:48:59 | UnityEngine] UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <d6d0977df2b34ec4b0770b8e0041b56d>:0)
[CRITICAL @ 16:48:59 | UnityEngine] UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)
[CRITICAL @ 16:48:59 | UnityEngine] VRUIControls.VRInputModule:ProcessMousePress(MouseButtonEventData)
[CRITICAL @ 16:48:59 | UnityEngine] VRUIControls.VRInputModule:Process()
[CRITICAL @ 16:48:59 | UnityEngine] UnityEngine.EventSystems.EventSystem:Update()```
b-rad15 commented 3 years ago

Yeah I have seen this rarely but less lately. Assuming these are all the errors, I've fixed 3 of the 4 there (4 may be because of 3 though so ¯\_(ツ)_/¯) in the current build. Pushing it now but will leave this issue until I don't see anyone report this for a while

Kevga commented 3 years ago

Still crashes with plugin version 1.11.3 Song ID: e41d

No stack trace in the log this time. Last entries in the log before the crash:

[DEBUG @ 13:35:49 | IPA/LibraryLoader] Resolving library ScoreSaber.resources, Version=2.3.5.0, Culture=en-US, PublicKeyToken=null
[DEBUG @ 13:35:49 | IPA/LibraryLoader] Looking for file ScoreSaber.resources.dll
[CRITICAL @ 13:35:49 | IPA/LibraryLoader] No library ScoreSaber.resources, Version=2.3.5.0, Culture=en-US, PublicKeyToken=null found
[DEBUG @ 13:35:49 | IPA/LibraryLoader] Resolving library ScoreSaber.resources, Version=2.3.5.0, Culture=en, PublicKeyToken=null
[DEBUG @ 13:35:49 | IPA/LibraryLoader] Looking for file ScoreSaber.resources.dll
[CRITICAL @ 13:35:49 | IPA/LibraryLoader] No library ScoreSaber.resources, Version=2.3.5.0, Culture=en, PublicKeyToken=null found
[INFO @ 13:35:56 | Music Video Player] Clearing Settings
[DEBUG @ 13:35:56 | Music Video Player] Has Loaded:  Video is: Unknown
[DEBUG @ 13:35:56 | Music Video Player] Selected Level: Lose Control (ft. Danyka Nadeau)
[DEBUG @ 13:35:56 | Music Video Player] Starting Search
[DEBUG @ 13:35:56 | Music Video Player] Process Made
[INFO @ 13:35:56 | Music Video Player] yt command: "C:\Program Files (x86)\Steam\steamapps\common\Beat Saber/Youtube-dl/youtube-dl.exe" "ytsearch15:Lose Control (ft. Danyka Nadeau) - Franky Nuts" -j -i
[DEBUG @ 13:35:56 | Song Browser] Expert+
[DEBUG @ 13:35:56 | Song Browser] Checking if have info for song BLACK LABEL
[DEBUG @ 13:35:56 | Song Browser] Checking if have difficulty for song BLACK LABEL difficulty Expert+
[DEBUG @ 13:35:56 | Song Browser] Display pp for song.
[DEBUG @ 13:35:56 | Song Browser] Done refreshing score saber stats.
[DEBUG @ 13:35:56 | Music Video Player] Killing Search Process
[DEBUG @ 13:35:56 | Music Video Player] Killing Search Process
[DEBUG @ 13:35:56 | Music Video Player] Killing Search Process
[WARNING @ 13:35:56 | Music Video Player] Failed on 15 queries with exitcode -1
[DEBUG @ 13:35:57 | Song Browser] Expert+
[DEBUG @ 13:35:57 | Song Browser] Checking if have info for song Lose Control (ft. Danyka Nadeau)
[DEBUG @ 13:35:57 | Song Browser] Checking if have difficulty for song Lose Control (ft. Danyka Nadeau) difficulty Expert+
[DEBUG @ 13:35:57 | Song Browser] Display pp for song.
[DEBUG @ 13:35:57 | Song Browser] Done refreshing score saber stats.
[INFO @ 13:35:57 | SongPlayHistory] Refreshing data...
[INFO @ 13:35:59 | Music Video Player] Clearing Settings
[DEBUG @ 13:35:59 | Music Video Player] Has Loaded:  Video is: Unknown
[DEBUG @ 13:36:02 | Music Video Player] Waiting for other search
[DEBUG @ 13:36:02 | Music Video Player] Done Waiting for other search
[DEBUG @ 13:36:02 | Music Video Player] Invoking Callback
[INFO @ 13:36:02 | Music Video Player] Updating Search Results
[INFO @ 13:36:02 | Music Video Player] Updating Search Results
[DEBUG @ 13:36:07 | Music Video Player] Selected Cell: Franky Nuts - Lose Control feat. Danyka Nadeau (Lyric Video) by CircusRecords [3:57] 
[DEBUG @ 13:36:07 | Music Video Player] /watch?v=sOBDT8bKxZ8    
[DEBUG @ 13:36:07 | Music Video Player] 🔔 Follow us for regular uploads: http://bit.ly/SubscribeToCircus

[DEBUG @ 13:36:07 | Music Video Player] https://i.ytimg.com/vi/sOBDT8bKxZ8/maxresdefault.jpg

The plugin seems to have downloaded part of the video. I have the following files in the song's directory now: image

The video was only downloaded partially, it ends after about 50 seconds.

b-rad15 commented 3 years ago

I have seen this where the video downloads but not the audio but haven't seen it cause the game to crash, was there anything else in the full logs? Most unhandled errors won't get printed to the individual mod logs

Kevga commented 3 years ago

That was an excerpt from the full logs, not specifically the MVP log. I have edited my previous post to show more of the log. There is no mention of any unhandled exceptions, yet the game still crashes. The crash is by the way 100% reproducible on my end with that combination of song + video.