Application doesn't warn about missing VLC dependency #35
Labels
No labels
Priority
High
Priority
Low
Priority
Mid
bug
duplicate
enhancement
help wanted
invalid
question
upstream
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AnthonyKwon/ti_lyricstudio#35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Expected Behavior
App should warn about missing VLC dependency on its (or audio) open.
Actual Behavior
App freezes for a while(1~2 minutes) and throws error, and continues w/o audio player capability.
error shown on terminal:
Additional Context
try{//TODO: show static loading screen// (animated loading is not viable due to VLC initialization freeze)// start the task to open the audio fileTask.Run(() => _player.Open(audioPath));// wait for the audio file to opened and player is ready// workaround: rarely, this might take at least 1~2 minutes because of VLC initialization.// set timeout long enough to user don't get timed out because of this.for (int i = 0; i < 60 && _player.State == PlayerState.Nothing; i++)await Task.Delay(1000);// check if audio player is readyif (_player.State == PlayerState.Nothing)throw new FileLoadException("File Open operation timed out.", audioPath);}Current suspect is
Task.Run(). It might not catch exception inside it's callback, so VLC exception might silently ignored. so app will just wait for 1 minute, and just throwsFileLoadExceptionsince_player.Statestill stuck atPlayerState.Nothing.fixed by
c6d8eda6b7.oops, didn't mean to close it since MessageBox still not showing up.