- Thread starter
- #91
I know you are not busyI will try and yes it's when 'null' is parsed that the crash occurs![]()
Using pre log4net code if you passed a null to Log.Error(Exception ex) did it fail like it does now or is this regression?
I know you are not busyI will try and yes it's when 'null' is parsed that the crash occurs![]()
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
Code: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); }
Instead?
Also are you able to see why this is a problem? Can you debug as is to see if ex.innerexception is actually set? If not I am guessing that the logging does not handle a null being passed to it? (but did previously ??)
Also I did notice a bug that since last commit AutoDJ will not work unless the announce option is ticked but I will fix that when I am next at a dev machine
I'm really starting to get lost with the bugs...I will try and yes it's when 'null' is parsed that the crash occurs![]()
They seem to popup without changes being done on the specific files?!?
I know you are not busyI will try and yes it's when 'null' is parsed that the crash occurs![]()
so if you do want to spend some time you could check for regression here
Using pre log4net code if you passed a null to Log.Error(Exception ex) did it fail like it does now or is this regression?
Could you checkout and test 1.3 Final code with old logger and just get some code to do the same (something like)I'm not sure to see/know how to do that![]()
var ex = new Exception();
Log.Error(ex.InnerException);
2013-04-26 19:51:12.780471 [ERROR][MPMain(1)]: VideoPlayer9: Exception while creating DShow graph Object reference not set to an instance of an object. at MediaPortal.ServiceImplementations.LogImpl.Write(Exception ex) in D:\svnroot\MediaPortal-1-Git_Commit-4-Master\mediaportal\Utils\ServiceImplementations\LogImpl.cs:line 172
at MediaPortal.ServiceImplementations.LogImpl.Error(Exception ex) in D:\svnroot\MediaPortal-1-Git_Commit-4-Master\mediaportal\Utils\ServiceImplementations\LogImpl.cs:line 238
at MediaPortal.GUI.Library.Log.Error(Exception ex) in D:\svnroot\MediaPortal-1-Git_Commit-4-Master\mediaportal\Core\guilib\Log.cs:line 60
at MediaPortal.Player.VideoPlayerVMR9.GetInterfaces() in D:\svnroot\MediaPortal-1-Git_Commit-4-Master\mediaportal\Core\Player\VideoPlayerVMR9.cs:line 510
2013-04-26 19:51:15.097946 [ERROR][MPMain(1)]: PlaylistPlayer: *** unable to play - Z:\-=- Serie TV 1 -=-\Charmed Saison 7\Charmed_-_7x01_-_Ensorcelés.french.DVB.$Death-Team$.xvid.avi - skipping track!
Could you checkout and test 1.3 Final code with old logger and just get some code to do the same (something like)I'm not sure to see/know how to do that![]()
Probably will be the same and probably should be like this but just want to be sure this is still working as it did before.Code:var ex = new Exception(); Log.Error(ex.InnerException);
[2013-05-04 14:39:31,975] [Error ] [Announce/Auto DJ] [ERROR] - Error in Last.fm AutoDJ
[2013-05-04 14:39:31,984] [Log ] [Announce/Auto DJ] [ERROR] - Exception: MediaPortal.LastFM.LastFMException: Error in HTTP response ---> System.Xml.XmlException: Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 2, position 3.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParsePI(BufferBuilder piInDtdStringBuilder)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
at System.Xml.Linq.XDocument.Parse(String text)
at MediaPortal.LastFM.LastFMLibrary.GetXml(String querystring, String httpMethod, Boolean useHttps)
--- End of inner exception stack trace ---
at MediaPortal.LastFM.LastFMLibrary.GetXml(String querystring, String httpMethod, Boolean useHttps)
at MediaPortal.LastFM.LastFMLibrary.GetSimilarTracks(String strTrack, String strArtist)
at MediaPortal.ProcessPlugins.LastFMScrobbler.LastFMScrobbler.AutoDJ(String strArtist, String strTrack) Message: Error in HTTP response Site : System.Xml.Linq.XDocument GetXml(System.String, System.String, Boolean) Source : LastFMLibrary Inner Exception(s): -> Error in HTTP response -> Unexpected XML declaration. The XML declaration must be the first node in the document, and no white space characters are allowed to appear before it. Line 2, position 3. Stack Trace: at MediaPortal.LastFM.LastFMLibrary.GetXml(String querystring, String httpMethod, Boolean useHttps)
at MediaPortal.LastFM.LastFMLibrary.GetSimilarTracks(String strTrack, String strArtist)
at MediaPortal.ProcessPlugins.LastFMScrobbler.LastFMScrobbler.AutoDJ(String strArtist, String strTrack)