Old 11th March 2009, 19:04   #1
scdlsam
Junior Member
 
Join Date: Jul 2007
Posts: 6
ATF Hang with $left/$right string functions

The $left() and $right() string functions will hang winamp for 30+ seconds if the tag is empty. They work just fine if the tag exists.

You can't even avoid the hang with $if / $if2 statement.

It's simple to reproduce. I wanted %year% to show up as the last two digits (ie, 2007 = 07).

Tried:
$right(%year%,2)
$right([%year%],2)
[$right(%year%,2)]
$if(%year%,$right(%year%,2),'??')
$if(%year%,[$right(%year%,2)],'??')
$IfStrEqual2(%year%,,'??',$right(%year%,2))
$IfStrEqual2(%year%,'','??',$right(%year%,2))

This error is in every version of winamp I've used, including 5.551.
scdlsam is offline   Reply With Quote
Old 11th March 2009, 19:55   #2
DJ Egg
Techorator
Winamp & Shoutcast Team
 
Join Date: Jun 2000
Posts: 35,894
Reproduced. Thanks.

I already had %year% in my ATF string, so I replaced it with
$if(%year%,[$right(%year%,2)],'??')

and there's no problems with mp3's (and other formats) which have the Year field filled-in in the tags,
but yup, on attempted playback, I got a considerable hang for any files without Year.
Infact, it totally locked up Winamp for me on one file.
DJ Egg is offline   Reply With Quote
Old 11th March 2009, 20:08   #3
scdlsam
Junior Member
 
Join Date: Jul 2007
Posts: 6
Awesome

Glad you could reproduce it. I know it works for tagged material, and all my music is tagged - it's just that when I used to play wav files, winamp would freeze. I believe it will unfreeze after a while if you do an $if statement.

On a side note,
I found a non-hanging asinine workaround for displaying %year% with 2 digits:

$if(%year%,$lpad($mod(%year%,100),2,0),'??')

So:
1847 / 100 = 18.47 = 47
1900 / 100 = 19 = 00 (from padding)

This is sort of a double-post, but I didn't realize it was a $right/$left string function error when I originally posted in Tech Support.
scdlsam is offline   Reply With Quote
Old 20th June 2009, 17:10   #4
GAJ
Junior Member
 
Join Date: Jun 2009
Posts: 2
Any update on this? I have seen the same problem with 5.552.
GAJ is offline   Reply With Quote
Old 20th June 2009, 17:28   #5
GAJ
Junior Member
 
Join Date: Jun 2009
Posts: 2
Any update on this? I have seen the same problem with 5.552.
GAJ is offline   Reply With Quote
Old 21st June 2009, 22:11   #6
DrO
 
Join Date: Sep 2003
Posts: 27,873
the fix is in place for the next 'proper' Winamp update.

-daz
DrO is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Bug Reports

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump