mIRC Home    About    Download    Register    News    Help

Print Thread
#223932 03/08/10 01:13 PM
Joined: Mar 2008
Posts: 93
B
BhaaL Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Mar 2008
Posts: 93
After updating I've been experiencing sporadic crashes when playing mp3, most noticable right after a new song started.

I've added some debug to my scripts, but as of now I couldn't find a defintive reason why this could be the case.
It seems to happen with VBR and CBR mp3s, with and without ID3v2 tags (altho most of my library has them, both unicode and ascii).

My script uses /splay -p %file to play the thing, and uses a timer to fill in informations to my "now playing" toolbar using $mp3 (apparently an alias to $sound, not sure where I got that from; used as both $mp3(%file).artist and $mp3(%file, TPE1).tag). I'm mentioning the timer since one crash clearly occurred after /splay, where I heard music playing already by that time - so my best guess would be a change/bug/problem in $mp3/$sound. Maybe related to the unicode change?

I'll update this post if I find a sure-kill sample mp3 you could use for debugging, until then I can only guess and encourage other people with similar issues to provide further information in here.

Joined: Feb 2003
Posts: 307
T
Fjord artisan
Offline
Fjord artisan
T
Joined: Feb 2003
Posts: 307
Can't replicate it with my mp3 player.

You might be using a dll with it that isn't yet compatible with 7.1

Regards

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I've seen certain MP3s crash mIRC when played due to a corrupted ID3 file (especially in cases where it uses unicode in the ID3). If you can figure out which song(s) crashes mIRC, then edit all of the ID3 information to something else, that may fix your problem. Note that "something else" could be the same thing, but you type it in after removing what was already there.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2008
Posts: 93
B
BhaaL Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Mar 2008
Posts: 93
Nope, no DLLs there, pure scripting. I can't seem to reproduce it reliably either, but I made the topic anyways (and sure got some replies).

Unicode doesnt seem to be a reliable source either. The only thing I noticed is that the windows explorer shows the tag correctly, while $mp3(%file, TIT2).tag shows garbage - and that certainly worked with 6.35

Last edited by BhaaL; 03/08/10 03:10 PM.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Can you copy/paste what it shows from Windows and what it shows from $mp3?


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2008
Posts: 93
B
BhaaL Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Mar 2008
Posts: 93
I hope this works, the post preview showed it wrong...

Looking closer, I'm not sure if thats even an issue here. An example would be the song "Khazad-Düm, Pt. 1 (Ages of Mithril)" from Battlelore, which shows up as "Khazad-Düm" in mIRC. Altho, looking at the tag with an hex editor, the "ü" (german umlaut) is not encoded at all - it *is* stored multibyte (including BOM), but using the ascii value 0x00FC which is both correct for unicode and iso-8859-15 (at least according to the windows char table)

Joined: Dec 2002
Posts: 5,427
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,427
Thanks, I was able to reproduce the issue with Unicode tags not being displayed correctly. This should be fixed in the next version. I was not able to reproduce the crash however. If you wish, you can zip your mIRC folders/settings/scripts and email them to me at khaled@mirc.com and I will test them using a debug mode that may detect the cause of your crash.

Joined: Mar 2008
Posts: 93
B
BhaaL Offline OP
Babel fish
OP Offline
Babel fish
B
Joined: Mar 2008
Posts: 93
I just found a file that causes the crash, and it seems to be an issue with missing delimiters. The ID3v2 tag TIT2 (title) contained the correct title, but no closing \0 - the length field of the tag however was correct.

The ID3v2 documentation says a tag has a 4-byte header ('TIT2'), followed by a 4-byte size (0x27), 2-byte flags (0x00) followed by the contents (0x01, 0xFF, 0xFE, 'D', 0x00, 'o', 0x00, 'u', 0x00, 'b', 0x00, 't', 0x00, 'f', 0x00, 'u', 0x00, 'l', 0x00, ' ', 0x00, 'E', 0x00, 'x', 0x00, 'i', 0x00, 's', 0x00, 't', 0x00, 'e', 0x00, 'n', 0x00, 'c', 0x00, 'e', 0x00) - the song is "Doubtful Existence" by Dark Age.
The 0x01 in the beginning indicates the text is "UTF-16 [UTF-16] encoded Unicode [UNICODE] with BOM."
However, the specification also says "Terminated with $00 00.", which is not the case here.

I'd say both are at fault; my tag for not being delimited, and mIRC 7.1 for not reading/using the length flag (note that 6.35 handled this correctly, altho I think it was only by chance. This might be abused at some point with specifically crafted mp3 files used for exploitation; or simply crash if someone didnt have the terminating \0).

The interresting thing is that it also crashes with $mp3(%file).title - which, according to /help $sound, reads the ID3v1 tag - which is fixed size and correct (altho also not delimited and filled with spaces, guess MMJB had a few loose screws when tagging this).

Joined: Dec 2002
Posts: 5,427
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,427
Thanks for looking into it. mIRC is using the tag length however the calculation was slightly off. This has also been fixed for the next version.


Link Copied to Clipboard