After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647024 - Last.fm fingerprint service fails intermittently
Last.fm fingerprint service fails intermittently
Status: RESOLVED FIXED
Product: banshee
Classification: Other
Component: Community Extensions
2.0.0
Other Linux
: Normal minor
: 1.x
Assigned To: Banshee Maintainers
Banshee Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-07 12:14 UTC by Nathaniel Sherry
Modified: 2011-04-26 19:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix the bug (606 bytes, patch)
2011-04-19 06:44 UTC, olivier dufour
committed Details | Review

Description Nathaniel Sherry 2011-04-07 12:14:48 UTC
When trying to get information from the last.fm fingerprint, it will sometimes fail with the following message.

[Warn  08:12:51.092] Caught an exception - System.ArgumentNullException: Argument cannot be null.
Parameter name: stream (in `mscorlib')
  at System.IO.StreamReader.Initialize (System.IO.Stream stream, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <filename unknown>:0 
  at System.IO.StreamReader..ctor (System.IO.Stream stream, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00000] in <filename unknown>:0 
  at System.IO.StreamReader..ctor (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (System.IO.Stream)
  at Hyena.Json.Tokenizer.SetInput (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
  at Hyena.Json.Deserializer.SetInput (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
  at Hyena.Json.Deserializer..ctor (System.IO.Stream stream) [0x00000] in <filename unknown>:0 
  at Lastfm.LastfmRequest.GetResponseObject () [0x00000] in <filename unknown>:0 
  at Banshee.LastfmFingerprint.LastfmFingerprintService.GetMoreInfo (Banshee.Collection.TrackInfo track) [0x00000] in <filename unknown>:0 
  at Banshee.LastfmFingerprint.LastfmFingerprintService.FetchMetadata (Banshee.Collection.TrackInfo track, Int32 fpid) [0x00000] in <filename unknown>:0 
  at Banshee.LastfmFingerprint.LastfmFingerprintService+<OnGetTagFromFingerprint>c__AnonStorey0.<>m__0 (System.Object ) [0x00000] in <filename unknown>:0 


There is no indication that anything has gone wrong in the UI, the progress bar just goes away.

Ubuntu 10.10 32-bit
Comment 1 olivier dufour 2011-04-08 13:20:25 UTC
ohh crap ... Now that response Stream can be null to fix previous bug, it is not handle in GetResponseObject 
easy fix: I will try to send patch tonight.
        public JsonObject GetResponseObject ()
        {
            Deserializer deserializer = new Deserializer (response_stream);
            object obj = deserializer.Deserialize ();
            JsonObject json_obj = obj as Hyena.Json.JsonObject;

become:
        public JsonObject GetResponseObject ()
        {
+           if (response_stream == null)
+               return null;
            Deserializer deserializer = new Deserializer (response_stream);
            object obj = deserializer.Deserialize ();
            JsonObject json_obj = obj as Hyena.Json.JsonObject;
Comment 2 Bob Baird 2011-04-19 04:51:17 UTC
I have been experiencing this too, it seems to work for about seven songs a day before crashing. Here is the latest debug log:

http://pastebin.com/DzvFzpuE

Like I said, it seems to reset after about a day, but only works for about seven songs before crashing and asking for login credentials again. I am using a free Last.fm account for what it is worth.
Comment 3 olivier dufour 2011-04-19 06:44:39 UTC
Created attachment 186248 [details] [review]
fix the bug

here is the patch. please review.
Comment 4 Andrés G. Aragoneses (IRC: knocte) 2011-04-24 20:14:43 UTC
This is a patch for b-c-e, right? Then I don't think maintainer-review is needed AFAIK. Is there an active maintainer for this extension? If yes, you could CC him so he/she reviews. If not, I would recommend you to commit away...
Comment 5 Andrés G. Aragoneses (IRC: knocte) 2011-04-24 20:15:18 UTC
And by maintainer-review I meant banshee-maintainer review.
Comment 6 David Nielsen 2011-04-24 20:17:23 UTC
The patch is against the Last.fm implementation in core, so sadly it does need some review.
Comment 7 Andrés G. Aragoneses (IRC: knocte) 2011-04-24 20:44:28 UTC
Ah right. Let's hope Bertrand is watching, as he usually reviews LastFM stuff.
Comment 8 Gabriel Burt 2011-04-26 19:24:51 UTC
Comment on attachment 186248 [details] [review]
fix the bug

Committed to master and stable-2.0 branches, thanks Olivier.