XMPlay Last.fm/Audioscrobbler plugin (xmp-scrobbler)

Started by yagood,

Torkell

You could try using WinHTTP, Urlmon or similar. IIRC they use the Internet Explorer HTTP stack, and so should speak to all NTLM proxies (as well as detect your browser proxy settings).

yagood

Thanks for the advice. I'm considering using WinINet API as it works fine for Winamp plugin. I really wanted to make it work with libcurl, I talked to devs on IRC, but there was no clear solution... I'll post to their mailing list, because this behavior looks like some internal bug with handling NTLM authentication in libcurl. After the exam I'll decide how to resolve this situation.

nihq

I have a strange problem that I didn't have with any previous versions. I'm on 0.5b, and each time it submits a track to last.fm, it freezes the whole computer (except for the mouse cursor) for a few seconds. I'm no computer wizard but it seems pretty self-evident that it's hogging up all system resources and/or bandwidth for itself while submitting. Is there a way I could overcome this or do I just wait for a new build?

The problem shouldn't be of system resources since previous versions have been pretty much invisible with regards to processor use. Anyhow, my setup is a Celeron 2800mhz, winXP, 256mb RAM.

yagood

Hm, strange indeed. So version 0.5 works fine, right? Not much has been changed from 0.5 to 0.5b, but if you could provide xmp-scrobbler.txt log file, that would be helpful, thanks.

nihq

I think I jumped straight to 0.5b from some earlier one, might have been 0.2 or even 0.1. I had crashes with some version, but that has been sorted out already as I recall. I guess it might do good to test each version's functionality on this setup while waiting for a fix. :P

Here's a portion of the logfile (one day's content)

http://www.cerencenk.com/forumss/scrobblerlog.txt

yagood

Your log file looks fine. Could you confirm for sure which version doesn't cause the trouble? Then I'll know what changes between versions could lead to your problem.

nihq

I just reinstalled XMPlay and deleted the existing scrobbler files to start testing each version. I started from 0.5b, and now it seems to work fine. :? After a few tracks there's been no problems. Odd though that in the previous incarnation of 0.5b the problem was clearly of the plugin, since when I disabled it for a while, the problem vanished. I'm puzzled, but as it seems to work now, I'm content.

yagood

Well, OK, if it works now... but I wonder what caused your problem. Was xmp-scrobbler actually submitting something to Last.fm when it was freezing your PC? It could be some issue with xmp-scrobbler configuration, because in the early versions structure was different and if you upgrade to 0.4 or newer you have to set options once again and save it.

nihq

It seemed to freeze the PC only once per track, so I gather it was submitting information.

And yeah, since reinstalling helped, I have no problem with it anymore. I guess a clean-up of old files before installing this version is a good enough workaround for the strange problem.

yagood

I think the most probable cause is some DDE stuff, because that's what xmp-scrobbler is doing in the middle of the track - query XMPlay through DDE for track data and then connect to Last.fm. I don't know what could be done here, I've already been all over DDE so many times in this project that there's not so much room for any improvements - luckily it works as it is, no more crashes with the latest version so lets hope it was some one time thing.

Dotpitch

Got an XMPlay-crash, is it related to xmp-scrobbler? Second time this week.
*----> State Dump for Thread Id 0x4c00 <----*

eax=00000000 ebx=00000000 ecx=00000000 edx=7c90eb94 esi=003e0000 edi=003e0000
eip=7c910e23 esp=016bfabc ebp=016bfb78 iopl=0         nv up ei pl zr na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246

function: ntdll!wcsncpy
        7c910e06 41               inc     ecx
        7c910e07 0456             add     al,0x56
        7c910e09 8b75c8           mov     esi,[ebp-0x38]
        7c910e0c 56               push    esi
        7c910e0d e8bafdffff       call    ntdll!wcsncpy+0x13d (7c910bcc)
        7c910e12 8b45e4           mov     eax,[ebp-0x1c]
        7c910e15 014628           add     [esi+0x28],eax
        7c910e18 834dfcff         or      dword ptr [ebp-0x4],0xffffffff
        7c910e1c e85c000000       call    ntdll!wcsncpy+0x3ee (7c910e7d)
        7c910e21 33db             xor     ebx,ebx
FAULT ->7c910e23 80be8605000001   cmp    byte ptr [esi+0x586],0x1 ds:0023:003e0586=00
        7c910e2a 0f85bb090000     jne     ntdll!wcsncpy+0xd5c (7c9117eb)
        7c910e30 8b8e80050000     mov     ecx,[esi+0x580]
        7c910e36 3bcb             cmp     ecx,ebx
        7c910e38 741d             jz      ntdll!wcsncpy+0x3c8 (7c910e57)
        7c910e3a 8b45a0           mov     eax,[ebp-0x60]
        7c910e3d c1e80a           shr     eax,0xa
        7c910e40 3d80000000       cmp     eax,0x80
        7c910e45 0f8360710100     jnb   ntdll!RtlSubAuthorityCountSid+0x8b (7c927fab)
        7c910e4b 8d0440           lea     eax,[eax+eax*2]
        7c910e4e c1e004           shl     eax,0x4

*----> Stack Back Trace <----*
WARNING: Stack unwind information not available. Following frames may be wrong.
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for D:\Programs\xmplay\plugins\xmp-scrobbler.dll -
ChildEBP RetAddr  Args to Child             
016bfb78 77c2c2de 003e0000 00000000 003e0198 ntdll!wcsncpy+0x394
016bfbc0 66ae9ee5 003e0198 0000000d 016bfbf0 msvcrt!free+0xc3
016bfbd0 66ac9e57 003e0198 0000000d 016bfc40 xmp-scrobbler+0x29ee5
016bfbf0 66aca26d 010ef470 0110eda0 016bfc64 xmp-scrobbler!DllMain+0x7c6b
016bfda0 66ac9a98 010ef470 66b2aa35 016bfe40 xmp-scrobbler!DllMain+0x8081
016bfdb0 66ac7124 0111c9d8 016bfe18 016bfe40 xmp-scrobbler!DllMain+0x78ac
016bfe40 66ac3c27 0111c9d8 016bfeb8 66b3637b xmp-scrobbler!DllMain+0x4f38
016bfee0 66ac2140 66b3627c 66b3637b 016bff38 xmp-scrobbler!DllMain+0x1a3b
016bff60 00420b5c 00000001 010dade0 014bfc30 xmp-scrobbler+0x2140
00000000 00000000 00000000 00000000 00000000 xmplay+0x20b5c
xmp-scrobbler.txt shows only the dsp being opened, not closed, no errors of any kind and the cache was empty. I will try to reproduce it, but I'm not sure how yet ;). XMPlay runs fine when it's restarted.

Craw

OK, I don't know if someone posted this bug.

I was listening to a song titled "Ragnarök" and I've noticed, that the scrobbler plugin can't handle this title properly - it just scrobbles "Ragnar?"

I hope it will be fixed in the near future.

yagood

Quote from: CrawOK, I don't know if someone posted this bug.

I was listening to a song titled "Ragnarök" and I've noticed, that the scrobbler plugin can't handle this title properly - it just scrobbles "Ragnar?"

I hope it will be fixed in the near future.

Hm, that's strange, no one has reported any problems with such "weird" titles so far, I've been listening to many songs with special chars in the title and it was always submitted fine. Could you post fragment of a log file when xmp-scrobbler submits this song? I would like to see when it went wrong. Or maybe could you upload this file somewhere so I can test it? Thanks.

About Dotpitch's crash - I think I know what is causing the problem, I'll try to fix it and include in the next release (which I'm not sure when will be ready - free time issues again...).

Craw

Quote2006-09-10 10:36:36   [INFO] Next submission in 147 seconds... (xmpCounter = 12965400)
2006-09-10 10:36:36   [LIBSCROBBLER] ...
2006-09-10 10:36:37   [LIBSCROBBLER] Handshaking: Client up to date.
2006-09-10 10:36:37   [LIBSCROBBLER] Submit interval set to 1 second(s).
2006-09-10 10:36:37   [LIBSCROBBLER] Handshake successful.
2006-09-10 10:39:02   [DEBUG] DSP_Process -- sec <= 0
2006-09-10 10:39:02   [DEBUG] XMP_SubmitProc (bProcessed = 0)
2006-09-10 10:39:02   [DEBUG] XMP_InitDde
2006-09-10 10:39:02   [DEBUG] XMP_InitDde -- after DdeInitialize (instID = 1180384)
2006-09-10 10:39:02   [DEBUG] XMP_SubmitProc -- after XMP_InitDDE
2006-09-10 10:39:02   [DEBUG] XMP_GetChannelData (instID = 1180384, ch = info1)
2006-09-10 10:39:02   [DEBUG] XMP_GetChannelData -- after DdeCreateStringHandle (instID = 1180384, hszService = 50107)
2006-09-10 10:39:02   [DEBUG] XMP_GetChannelData -- after DdeCreateStringHandle (instID = 1180384, hszTopic = 50111)
2006-09-10 10:39:02   [DEBUG] XMP_GetChannelData -- before DdeConnect (instID = 1180384, hszService = 50107, hszTopic = 50111)
2006-09-10 10:39:02   [DEBUG] XMP_GetChannelData -- after DdeConnect (hconv = 1248080)
2006-09-10 10:39:02   [DEBUG] XMP_GetChannelData (id = 1180384, ch = info1, hconv = 1248080, hdata = 419824284, hszService = 50107, hszTopic = 50111)
2006-09-10 10:39:02   [DEBUG] XMP_SubmitProc -- after XMP_GetChannelData (size = 348)
2006-09-10 10:39:02   [DEBUG] XMP_SubmitProc -- after XMP_FreeDDE
2006-09-10 10:39:02   [DEBUG] XMP_ParseTrackTags
2006-09-10 10:39:02   [INFO] No valid MusicBrainz ID found, consider using MusicBrainz taggers to tag this file properly!
2006-09-10 10:39:02   [DEBUG] XMP_SubmitProc -- after XMP_ParseTrackTags
2006-09-10 10:39:02   [INFO] Submitting track: Midgard - Ragnarök (To Bring The End)...
2006-09-10 10:39:02   [CACHE] AddTrack (cache_size = 6, tracks_size = 10)
2006-09-10 10:39:02   [LIBSCROBBLER] Preparing submit string - package size: 5
2006-09-10 10:39:02   [LIBSCROBBLER] Submitting cache...
2006-09-10 10:39:02   [DEBUG] XMP_KillTimer
2006-09-10 10:39:02   [LIBSCROBBLER] ...
2006-09-10 10:39:03   [LIBSCROBBLER] Submission succeeded.
2006-09-10 10:39:03   [LIBSCROBBLER] Submit interval set to 1 second(s).

I've also checked  few other songs (like Motörhead - We are Motörhead) and it came out, that only titles are not handled properly ;/ Band's name was submited correctly.

and here's the song:
http://rapidshare.de/files/32590348/Midgard_-_Ragnarok.mp3.html

yagood

Quote from: CrawI've also checked  few other songs (like Motörhead - We are Motörhead) and it came out, that only titles are not handled properly ;/ Band's name was submited correctly.

and here's the song:
http://rapidshare.de/files/32590348/Midgard_-_Ragnarok.mp3.html

Hm, this song is submitted just fine on my PC, it is shown as "Ragnarök" on my profile. What Windows are you using? Probably there are some problems with handling Unicode I guess...

Craw

win98. Well then, so it can't be fixed. Nvm then, thx and keep up the good work.

yagood

Quote from: Crawwin98. Well then, so it can't be fixed. Nvm then, thx and keep up the good work.

I didn't say that it can't be fixed. It's just that I don't have access to some PC with Windows 98 to do testing. Could you please try installing Microsoft Layer for Unicode on Windows 95, 98, and Me Systems? It may resolve this problem on Windows 98. Here is the link:

http://go.microsoft.com/fwlink/?LinkId=14851

Let me know if this helps.

Craw

I've copied the unicows.dll into the xmplay directory, but it didn't work out :/

yagood

Quote from: CrawI've copied the unicows.dll into the xmplay directory, but it didn't work out :/

Did you launch unicows.exe, go through the install and restart your PC? Anyway, could you try this test version below, play the song and attach (no copy-paste please!) the log file? That would be helpful. Thanks.

Test version: http://www.grupa3g.pl/xmp-scrobbler-test.rar

Craw

OK, checked the plugin - it still doesn't submit correctly.
Here's the log (save as...)