Go Back   Winamp Forums > Winamp > Winamp Bug Reports

Reply
Thread Tools Search this Thread Display Modes
Old 30th December 2000, 17:58   #1
ynjhs
Junior Member
 
Join Date: Dec 2000
Posts: 4
While programming, I noticed that using your "/add" switch can cause serious problems if there are spaces following the specified file.

Ex. (in dos prompt)
winamp.exe /add "C:allwavs\hdkan.mp3" (spaces trailing)

one space causes basic problems, though I've observed other problems following this by adding lots of spaces which in turn caused errors throughout such as:

(Nullsoft wavout plugin 2.3)
MMSYSTEM020 the driver did not generate a valid OPEN callback

If you guys trim the white space of the arguments, you would be able to work around this error.

------------------
Yair Leviel
ynjhs is offline   Reply With Quote
Old 31st December 2000, 00:45   #2
DJ Egg
Techorator
Winamp Team
 
Join Date: Jun 2000
Posts: 35,130
What spaces are you referring to? There aren't any in your example!
Unless you're referring to the ones on either side of "/ADD"?
For starters, you've missed out the backslash in your example:
(....)C:\(.....)
If you use the "Start -> Run" command, the following command line example should work perfectly ok
(it does for me & many many others)
"C:\Program Files\Winamp\winamp.exe" /ADD "C:\My Music\MP3\track.mp3"
Quotation marks are necessary for paths with spaces.
Otherwise, you can use (eg):
C:\Progra~1\Winamp\winamp.exe /ADD C:\MP3\track.mp3

All available command line parameters are explained here:
http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml
DJ Egg is offline   Reply With Quote
Old 31st December 2000, 18:02   #3
ynjhs
Junior Member
 
Join Date: Dec 2000
Posts: 4
I don't think you understand

To DJEgg, (and those who would like to fix winamp's bugs)
First of all i was not reffering to using the Start->Run method of getting to winamp, I was mentioning the usage of Dos Prompt directly since the Start->Run trims the trailing spaces and arguments for that matter.

I guess you'll have to kill me for forgetting a backslash there but what i'm talking about is a repeatable problem...
since you didn't get it the first time let me clear it up for you.

To make this as clear as possible I will use the following underscores ( _ ) as spaces: .

1.) go to DOS
2.) CD to: C:\progra~1\winamp\
3.) type in: winamp.exe /add "C:\allwavs\example.mp3" _____
Okay now here's the fun part...
4.) look at the list in Winamp, you have just caused it to either crash or just fudge (depending on the amount of spaces).

Part of being a moderator is understand the basis of a complaint... you went into Run instead of Dos as I had instructed. In fact, if you use the shell command in VB you can reproduce this error and the Start->Run command line won't be there to help you.

My original comment included the following :
"Ex. (in dos prompt)
winamp.exe /add "C:allwavs\hdkan.mp3" (spaces trailing) "

that spaces trailing part, oh my g-d, means something!!!
Those are spaces, and the word trailing most commonly refers to the fact that those spaces would come AFTER the argument.

You mention the need of using quotes. In fact I did use quotes in the argument, so ha. It seems like you either didn't read or were too cocky to listen to people who put the product through hell tests.

I would suggest you show some courtesy!

Now, to fix the problem, all you need is to trim the arguments. If you would like to see this error in Visual Basic, because it does occur and I bet it does in every other language I'll be glad to send you some code.
ynjhs is offline   Reply With Quote
Old 31st December 2000, 18:30   #4
DJ Egg
Techorator
Winamp Team
 
Join Date: Jun 2000
Posts: 35,130
I understand perfectly well . . . do you?

GFYYPOS

Winamp for Windows
Dosamp for DOS

http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml

Multiple spaces after file path & name = not allowed / supported.
Quotes NOT required for paths with no spaces!
(spaces trailing)=N/A & asking for trouble in the first place!

BTW - INRTYQA

[Edited by DJEgg on 12-31-2000 at 03:39 PM]
DJ Egg is offline   Reply With Quote
Old 31st December 2000, 19:51   #5
Trouble Maker
Junior Member
 
Join Date: Dec 2000
Posts: 3
gee, YNJHS-wheel-of-fortune-puzzle genius-programmer-guy, you didn't get all smug and arrogant until yer 2nd post, nice self-restraint there. ya know, we all appreciate the value of hell tests but sometimes there's a thin line between a hell test bug and a put-a-million-monkeys-in-a-room-with-a-million-winamps-and-maybe-we-can-get-this-to-happen bug, and we already get enuf of the latter around here. so either include a semi-real-life example of how a normal user USING WINDOWS would trigger your "bug", or don't waste your time and ours, not to mention piss off the mods.



Trouble Maker is offline   Reply With Quote
Old 31st December 2000, 20:35   #6
ynjhs
Junior Member
 
Join Date: Dec 2000
Posts: 4
Boy do I get the heat for lashing back at what i thought was a attack on my experience.

Listen, the point is, you can fix this problem without much difficulty. In fact, a newbie or an experienced programmer that adds a space would easily get fudged by Winamp for it.

Let me give you guys an example so you'll understand why it is so easy to make this mistake.

------------
VB Code
------------
'note this is just an example so that you guys can see.
' it is not optimized nor do I care for small things
' I could include.

If Result.SelCount = 0 Then Exit Sub
c = " "
Text1.Text = ""
For i = 0 To Result.ListCount - 1
If Result.Selected(i) Then
Text1.Text = Text1.Text & Chr(34) & Result.List(i) & Chr(34) & c
End If
Next

'here is where it would fudge

'ProcessID = Shell(winamp & " /add " & Text1.Text, 1)

'Note all you have to do to fix an error like this
'is add a trim function

ProcessID = Shell(winamp & " /add " & Trim(Text1.Text), 1)
---------------------------

Guys, this shouldn't be the case.
If the start->run command can easily correct this problem, then so should winamp itself. anyone could come accross an error like this and wonder why winamp crashes. this is not the kind of stupid case where you just throw allot of stupid situations that no one will encounter.

So there, I'm trying to be polite in telling you guys to TRIM the arguments before people get a little confused.

Thanks,
ynjhs is offline   Reply With Quote
Old 1st January 2001, 05:48   #7
Winsane
Moderator Alumni
 
Winsane's Avatar
 
Join Date: Jun 2000
Location: U.S. (eastern time zone)
Posts: 2,598
What do GFYYPOS and INRTYQA stand for? A MetaCrawler search for each didn't turn up anything.

Seems to me there was some reason or two that've been mentioned on the forums for starting Winamp from a DOS prompt (though I don't remember what they were), and I expect that with IE's (and some other programs') insanely annoying habit of auto-selecting spaces when highlighting stuff, a copy from there and past to the command prompt could also result in trailing spaces. So yeah, Winamp should be able to handle that without crashing.

BTW, I'm just curious why you (ynjhs) thought Egg's first post was an attack on your experience (which he had no basis on which to judge it, and so couldn't really have been attacking you). I don't see anything that could really be construed that way. Sure, he misinterpreted your post a little, but so what? Most people would just respond by clarifying rather than by getting angry. (And just to be clear, this paragraph itself is meant as a question and not an attack of any kind.)

Oh, and if GFYYPOS stands for what I suspect it does, methinks a certain normally extremely kind and friendly moderator overreacted a tad. I was a little surprised that ynjhs responded to that politely rather than with another flame (thanks for that, by the way--a welcome change from the usual reaction to flaming).

[Dang, it's a pain trying to word things in such a way as not to offend any parties involved.]

[Edited by Winsane on 01-01-2001 at 02:59 AM]
Winsane is offline   Reply With Quote
Old 1st January 2001, 06:47   #8
Trouble Maker
Junior Member
 
Join Date: Dec 2000
Posts: 3
Thanks for the example, Yair. I was just trying to post my last flame before my New Year's resolutions kicked in ...

I hope you understand that we DO get a lot of alleged bug reports like "I typed in 29482 in the ID3v1.1 track number box and it displays 41. Why doesn't Winamp fix this bug?" and others that are ten times as ridiculous ...
Trouble Maker is offline   Reply With Quote
Reply
Go Back   Winamp 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