digimezzo / dopamine-windows

Audio player which tries to make organizing and listening to music as simple and pretty as possible.
https://digimezzo.github.io/site/
GNU General Public License v3.0
1.88k stars 264 forks source link

FLAC file causes crash, only solution is to remove appdata #917

Open rjyanj opened 5 years ago

rjyanj commented 5 years ago

I'm submitting a...


[ ] Regression 
[X] Bug report  
[ ] Feature request

I'm using these versions

Reproduction steps

Observed behavior

I play certain FLAC files, application crashes. Upon relaunch, sound plays a quick blip and app crashes. Only solution is to remove appdata. FLAC file plays in VLC and Foobar 2000.

Desired behavior

App should play FLAC file fine without crashing or if crashing, relaunching appropriately without need to remove all appdata.

Log file

2018-11-29 22:17:09.135|Info|App.xaml.InitializeShell|115|### STARTING Dopamine, version 2.0.0.1005, IsPortable = False, Windows version = Microsoft Windows 10 Pro (Microsoft Windows NT 10.0.17134.0), IsWindows10 = True ### 2018-11-29 22:17:09.164|Info|App.xaml.InitializeWcfServices|172|CommandService was started successfully 2018-11-29 22:17:09.166|Info|App.xaml.InitializeWcfServices|187|FileService was started successfully 2018-11-29 22:17:09.166|Info|App.xaml.InitializeShell|152|Showing Main screen 2018-11-29 22:17:09.649|Info|IndexingService.CheckCollectionAsync|140|+++ STARTED CHECKING COLLECTION +++ 2018-11-29 22:17:09.892|Info|PlaybackService.GetSavedQueuedTracks|1273|Getting saved queued tracks 2018-11-29 22:17:09.989|Info|UpdateService.Reset|422|Resetting update check 2018-11-29 22:17:09.989|Info|UpdateService.DisablePeriodicCheck|415|Disabling periodic update check 2018-11-29 22:17:09.994|Info|UpdateService.CheckNow|259|Checking for updates 2018-11-29 22:17:09.994|Info|UpdateService.CheckNow|264|Update check: current version = 2.0.0.1005 2018-11-29 22:17:10.125|Error|FileOperations.GetValidFolderPaths|41|Error occurred while getting folder path for file 'Z:\Flacs\The Olivia Tremor Control - Black Foliage - Animation Music, Volume 1 (1999) [FLAC] {2011 - Cloud Recordings CLD 016CD}\Black Foliage Bonus Disc\15. The Olivia Tremor Control - Grains and Sauces,Ice and Rings,Aqua Waters (and a Pear Shaped Thought).flac'. Exception: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. 2018-11-29 22:17:10.125|Error|FileOperations.GetValidFolderPaths|41|Error occurred while getting folder path for file 'Z:\Flacs\The Olivia Tremor Control - Black Foliage - Animation Music, Volume 1 (1999) [FLAC] {2011 - Cloud Recordings CLD 016CD}\Black Foliage Bonus Disc\16. The Olivia Tremor Control - The Present Time,Seven Thousand Luminous Aches and Pains,The Dinner Plate.flac'. Exception: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. 2018-11-29 22:17:11.326|Info|IndexingService.AddArtworkInBackgroundAsync|672|+++ STARTED ADDING ARTWORK IN THE BACKGROUND +++ 2018-11-29 22:17:11.374|Error|IndexingService.AddArtworkInBackgroundAsync|780|+++ FINISHED ADDING ARTWORK IN THE BACKGROUND. Time required: 47 ms +++ 2018-11-29 22:17:11.374|Info|IndexingService.AddArtworkInBackgroundAsync|672|+++ STARTED ADDING ARTWORK IN THE BACKGROUND +++ 2018-11-29 22:17:11.397|Error|IndexingService.AddArtworkInBackgroundAsync|780|+++ FINISHED ADDING ARTWORK IN THE BACKGROUND. Time required: 23 ms +++ 2018-11-29 22:17:11.608|Info|PlaybackService.TryPlayAsync|1142|Playing the file Z:\Flacs\The Rolling Stones - Their Satanic Majesties Request + 2 (1967) [24-96 USA Mono - Prof. Stoned 2014]\01. Sing This All Together.flac. EventMode=False, ExclusiveMode=False, LoopMode=None, Shuffle=False 2018-11-29 22:17:11.613|Error|App.xaml.ExecuteEmergencyStop|537|Unhandled Exception. Exception: System.FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Convert.ToUInt32(String value) at Dopamine.Services.Notification.NotificationService.d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 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)

Stack trace: at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt) at System.Convert.ToUInt32(String value) at Dopamine.Services.Notification.NotificationService.d__15.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 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)

2018-11-29 22:17:11.613|Info|App.xaml.ExecuteEmergencyStop|540|### FORCED STOP of Dopamine, version 2.0.0.1005 ### 2018-11-29 22:17:11.793|Info|PlaybackService.GetSavedQueuedTracks|1308|Starting track Z:\Flacs\The Rolling Stones - Their Satanic Majesties Request + 2 (1967) [24-96 USA Mono - Prof. Stoned 2014]\02. Citadel.flac paused 2018-11-29 22:17:11.798|Info|Shell.xaml.Window_Closing|124|### STOPPING Dopamine, version 2.0.0.1005 ### 2018-11-29 22:17:11.802|Info|LifetimeService.PerformClosingTasksAsync|25|Performing closing tasks 2018-11-29 22:17:11.817|Info|LifetimeService.PerformClosingTasksAsync|30|Write settings. Time required: 15 ms 2018-11-29 22:17:12.022|Info|Shell.xaml.Window_Closed|326|### STOPPED Dopamine, version 2.0.0.1005 ###

digimezzo commented 5 years ago

Would you mind sharing one of those files?

rjyanj commented 5 years ago

Sure.

https://drive.google.com/open?id=12Uq-WNBOjplZDLo0TMb0wu7_3CZo6JoP

https://drive.google.com/open?id=1P3gYYYRKKSs9VjlzWarbjWclvVtix0_d

rjyanj commented 5 years ago

I was doing some testing and I noticed that once I went and added proper tags (Title and Track Number) I'm having no issues with these files. So it's looking like there is something with the missing Title and Track Number tags?

iamkroot commented 5 years ago

Same issue here. The crash only happens with specific files, and instead of having to clear the appdata, its enough to just play another file by using the "Play With" option in explorer. As @rjyanj said, I think it might very well be a metadata bug. I'll update after more investigation.

Ninja edit: Just read the log file, its actually three different things in my case: 1) Missing/corrupted tags in one file (mp3), probably not the app's fault. 2) A ? in another file name, no idea how it got there lol :P, again, not the app's fault. 3) Main one: A FormatException while creating the Notification. Logs:

2018-12-03 09:00:24.395|Info|PlaybackService.EnqueueFromFilesAsync|310|Start enqueuing 1 track(s) from files
2018-12-03 09:00:24.703|Info|PlaybackService.TryPlayAsync|1142|Playing the file D:\Music\English\Imagine Dragons\Night Visions\Demons.flac. EventMode=False, ExclusiveMode=False, LoopMode=None, Shuffle=True
2018-12-03 09:00:24.713|Error|App.xaml.ExecuteEmergencyStop|537|Unhandled Exception. Exception:
System.FormatException: Input string was not in a correct format.
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToUInt32(String value)
   at Dopamine.Services.Notification.NotificationService.<PlaybackSuccessSystemNotificationHandler>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   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)

Stack trace:
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseUInt32(String value, NumberStyles options, NumberFormatInfo numfmt)
   at System.Convert.ToUInt32(String value)
   at Dopamine.Services.Notification.NotificationService.<PlaybackSuccessSystemNotificationHandler>d__15.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   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)

EDIT 2: Can confirm what @rjyanj observed. The crash disappeared when I added the track number to the file.

EDIT 3: This is not limited to just FLAC files, also happens in mp3 files.