Just installed your branch, and unfortunately the same errorPlease build via BOT and see if you still get the error.
Just installed your branch, and unfortunately the same errorPlease build via BOT and see if you still get the error.
Odd. I am not near a PC for a while but will try and debug. This sounds like there is actually a bug in the logging and this is triggering that bug. @Sebastiii are you able to debug this?Just installed your branch, and unfortunately the same errorPlease build via BOT and see if you still get the error.
Types for enum, exception and string and core to .NET and certainly not seeing those errors here. This is very odd and given that very little has changed a little perplexing. My only thought would be that perhaps trying to log from a background thread is causing the error (but this was previously running as a background worker thread so I can't see why that would be the case)Yeah, very odd! even let the BOT build the release, but that has the same error.
With my VERY limited debug knowledge i think the problem is in CommonLog4NetLogger.cs
View attachment 127138
private static void AnnounceTrack(string filename)
{
// Get song details and announce on last.fm
var pl = PlayListPlayer.SingletonPlayer.GetPlaylist(PlayListPlayer.SingletonPlayer.CurrentPlaylistType);
var plI = pl.First(plItem => plItem.FileName == filename);
if (plI == null || plI.MusicTag == null)
{
Log.Info("Unable to announce song: {0} as it does not exist in the playlist");
return;
}
var currentSong = (MusicTag) plI.MusicTag;
try
{
LastFMLibrary.UpdateNowPlaying(currentSong.Artist, currentSong.Title, currentSong.Album,
currentSong.Duration.ToString(CultureInfo.InvariantCulture));
Log.Info("Submitted last.fm now playing update for: {0} - {1}", currentSong.Artist, currentSong.Title);
}
catch (LastFMException ex)
{
if (ex.Source == "")
{
Log.Error("Last.fm error when announcing now playing track: {0} - {1}",currentSong.Artist, currentSong.Title);
Log.Error(ex.Message);
}
else
{
Log.Error("Exception when updating now playing track on last.fm");
Log.Error(ex.Message);
//Log.Error(ex.InnerException);
}
}
[2013-04-26 18:39:26,717] [Error ] [Announce/Auto DJ] [ERROR] - Exception when updating now playing track on last.fm
[2013-04-26 18:39:30,406] [Error ] [Announce/Auto DJ] [ERROR] -
Invalid session key - Please re-authenticate
[2013-04-26 18:48:44,280] [Log ] [MPMain ] [INFO ] - BASS: WASAPI Device successfully initialised
[2013-04-26 18:48:44,280] [Log ] [MPMain ] [DEBUG] - BASS: Successfully created BASS Mixer stream
[2013-04-26 18:48:44,281] [Log ] [MPMain ] [INFO ] - BASS: playback started
[2013-04-26 18:48:44,284] [Log ] [MPMain ] [INFO ] - g_Player.OnStarted() \\Server\flac\Birdy\Birdy - Special Edition (2011)\08. Shelter.flac media:Music
[2013-04-26 18:48:44,479] [Log ] [Announce/Auto DJ] [INFO ] - Submitted last.fm now playing update for: Birdy - Shelter
[2013-04-26 18:48:48,055] [Log ] [MPMain ] [DEBUG] - g_Player: ShowFullScreenWindow
[2013-04-26 18:48:48,056] [Log ] [MPMain ] [INFO ] - g_Player: ShowFullScreenWindow: No Visualisation defined. Switching to Now Playing
[2013-04-26 18:48:48,170] [Log ] [Announce/Auto DJ] [INFO ] - Auto DJ: Matched 10 local songs. Attempting to add 5 tracks
[2013-04-26 18:48:48,183] [Log ] [Announce/Auto DJ] [INFO ] - Auto DJ: Added to playlist: Ed Sheeran - Drunk
[2013-04-26 18:48:48,183] [Log ] [Announce/Auto DJ] [INFO ] - Auto DJ: Added to playlist: Beyoncé - Best Thing I Never Had
[2013-04-26 18:48:48,183] [Log ] [Announce/Auto DJ] [INFO ] - Auto DJ: Added to playlist: Birdy - Young Blood
[2013-04-26 18:48:48,183] [Log ] [Announce/Auto DJ] [INFO ] - Auto DJ: Added to playlist: Lana Del Rey - Without You
[2013-04-26 18:48:48,183] [Log ] [Announce/Auto DJ] [INFO ] - Auto DJ: Added to playlist: Lana Del Rey - Blue Velvet
[2013-04-26 18:48:48,593] [Log ] [MPMain ] [DEBUG] - Window: MediaPortal.GUI.Music.GUIMusicGenres deinit
[2013-04-26 18:48:48,621] [Log ] [MPMain ] [DEBUG] - TextureManager: CleanupThumbs()
[2013-04-26 18:48:48,641] [Log ] [MPMain ] [DEBUG] - Window: MediaPortal.GUI.Music.GUIMusicPlayingNow init
Seb could you tryI fixed it by replacing in line 286 here : Log.Error(ex.InnerException); to Log.Error(ex.Message);
Now error is logged but no crash anymore.
Don't know if it's the right way to do lol
if (ex.LastFMError != LastFMException.LastFMErrorCode.UnknownError)
{
Log.Error("Last.fm error when announcing now playing track: {0} - {1}",currentSong.Artist, currentSong.Title);
Log.Error(ex.Message);
}
else
{
Log.Error("Exception when updating now playing track on last.fm");
Log.Error(ex.InnerException);
}
I'm really starting to get lost with the bugs... They seem to popup without changes being done on the specific files?!?I will try and yes it's when 'null' is parsed that the crash occurs