Get invalid file error when using winamp as player [#12697]

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Get invalid file error when using winamp as player [#12697]

Re: Get invalid file name error when using winamp as player

by Peke » Mon Apr 06, 2015 10:39 am

Just to let you all know I've Added http://www.ventismedia.com/mantis/view.php?id=12697

Bug in filename sent to external (winamp) player

by foo » Sun Mar 15, 2015 11:26 pm

On win 7 64 bit. MMW v 4.1.6.1736 portable.

I set Tools > Options > Player > choose player to be "winamp 2 or 5".

It correctly finds the location of my winamp installation of v2.91.

However, attempting to play an mp3 results in an error dialog that says: "Invalid file name - %s." This says to me either that your output routine for this message is not using "%s" correctly (i.e., not being edited into, but just used as a literal), OR, the routine that creates the filename to send to the external player is not editing into the %s item, and just using it as a literal. In either case, it probably means quotes around %s in your code somewhere that they shouldn't be, or left out the argument altogether.

For me, this is a deal killer, since I don't want to use your internal player in certain situations.

Note that all filenames are US ASCII in a local folder, so UNC is not being used.

The error message with "%s" indicates that this must be a trivial coding error. Probably someone put quotes around a %s editing string where they don't belong. Also, sending a file to winamp just requires editing the filename and app location into a string, and sending that to the OS to launch it. Direct communication with winamp is not required, and this particular task is trivial to implement.

http://stackoverflow.com/questions/9980 ... asic-level

Re: Get invalid file name error when using winamp as player

by MMFrLife » Mon Feb 23, 2015 5:41 pm

Yeah, I got that you did another install.

I just wanted to then know "after" you did all the clean stuff and everything was ok after you fixed the install issue, did "another" problem present itself after dropping in
the old files.

I just didn't know if after the vanilla install you also put your old files back in or you decided to start over - "vanilla" makes it sound clean in totality (new db, etc.)

Either way all is good, well almost all. :)

Re: Get invalid file name error when using winamp as player

by staff » Mon Feb 23, 2015 5:26 pm

MMFrLife wrote: 1. Is there a problem with MM?
Yes,it is a problem with the MM installation, because as I wrote a plain vanilla installation already has the problem.

Re: Get invalid file name error when using winamp as player

by MMFrLife » Tue Feb 17, 2015 9:12 am

staff wrote:
MMFrLife wrote:Did you try deleting the new .db, .ini. .registry and dropping the old ones back in?
Just did that, but I don't know what you aim to using the old config files.
Same behavior, it works but only til you delete the folder C:\Users\<Username>\AppData\Local\MediaMonkey (I created before manuelly).
Also a MM restart does not create the folder and results in the known error.
Because I'm looking at at least 3 different scenarios:

1. Is there a problem with MM?
2. Is there a problem with your database?
3. Is there a problem with the interaction between MM and your database?

You indicated that there is a problem with MM (until you fix it) but you never really said that you put your previous database, etc.
back in. If your old database works, it tells me there isn't also a problem with that as well (and you don't have to start over with it).

Glad to hear everything is going again, though. Happy Monkeying! 8)

Re: Get invalid file name error when using winamp as player

by staff » Tue Feb 17, 2015 4:13 am

MMFrLife wrote:Did you try deleting the new .db, .ini. .registry and dropping the old ones back in?
Just did that, but I don't know what you aim to using the old config files.
Same behavior, it works but only til you delete the folder C:\Users\<Username>\AppData\Local\MediaMonkey (I created before manuelly).
Also a MM restart does not create the folder and results in the known error.

Re: Get invalid file name error when using winamp as player

by MMFrLife » Mon Feb 16, 2015 12:26 pm

staff wrote:Just installed a plain vanilla MediaMonkey_4.1.5.1719 portable to c:\mediamonkey. Before that I removed or deactivated all MM registry keys or folder in the userprofile.
You get the same error and it is gone if you create the folder C:\Users\<Username>\AppData\Local\MediaMonkey\
Yeah, I guess. I'm not sure why it does that.
MMFrLife wrote:Did you try deleting the new .db, .ini. .registry and dropping the old ones back in?
Did you try deleting the new .db, .ini. .registry and dropping the old ones back in?
staff wrote:And, everytime MM is started it creates the empty regkey HKEY_CURRENT_USER\Software\MediaMonkey\Interface\V4\Toolbars
Reg. key regeneration is fairly common with programs (so not surprised).

Re: Get invalid file name error when using winamp as player

by staff » Mon Feb 16, 2015 3:48 am

Just installed a plain vanilla MediaMonkey_4.1.5.1719 portable to c:\mediamonkey. Before that I removed or deactivated all MM registry keys or folder in the userprofile.
You get the same error and it is gone if you create the folder C:\Users\<Username>\AppData\Local\MediaMonkey\
And, everytime MM is started it creates the empty regkey HKEY_CURRENT_USER\Software\MediaMonkey\Interface\V4\Toolbars

I don't think I ever did a regular install on this machine and I could not find it in system control uninstall programs.

Re: Get invalid file name error when using winamp as player

by MMFrLife » Sun Feb 15, 2015 1:29 pm

Great, sounds like you are on your way! :)
staff wrote:Thanks MMFrLife - this helped.
Astonishingly enough it worked for the other portable MM installations.
This made me curious. I spend quite some time comparing ini files, registry settings (portable installation is writing to the registry in HKCU), deactivating by renaming dirs in C:\Users\S\AppData\ etc.
That's odd that it would write that. I don't have that path on mine and have never seen it on the forum (the regular install has a similar path to Roaming).
The portable isn't registry free. It does write some user entries. I don't understand how it's rewriting your path, though.

Have you ever had the regular install on your machine?
staff wrote:Finally I found the problem:
If there is no folder C:\Users\S\AppData\Local\Mediamonkey\ you get the error (my usernam is S). Just create the folder and the problem is gone - without restarting MM.
MM creates a file playit.m3u in that folder and is not creating the folder if it does not exist. With procmon (sysinternals processmonitor) I traced the error and the operation "CreateFile" resulted in a "PATH NOT FOUND".
So, there is ....\Local\playit.m3u ? Odd. Something might have gotten corrupted during install.
staff wrote:IMHO this is a little bug. The portable installation should not write/read to AppData and if a program wants to write a file and the path does not exist it should create the path.Again, not sure why it wrote to AppData.
Again, not sure why it's doing that?

Did you try deleting the new .db, .ini. .registry and dropping the old ones back in?

Re: Get invalid file name error when using winamp as player

by staff » Sun Feb 15, 2015 12:30 pm

Thanks MMFrLife - this helped.
Astonishingly enough it worked for the other portable MM installations.
This made me curious. I spend quite some time comparing ini files, registry settings (portable installation is writing to the registry in HKCU), deactivating by renaming dirs in C:\Users\S\AppData\ etc.

Finally I found the problem:
If there is no folder C:\Users\S\AppData\Local\Mediamonkey\ you get the error (my usernam is S). Just create the folder and the problem is gone - without restarting MM.
MM creates a file playit.m3u in that folder and is not creating the folder if it does not exist. With procmon (sysinternals processmonitor) I traced the error and the operation "CreateFile" resulted in a "PATH NOT FOUND".
IMHO this is a little bug. The portable installation should not write/read to AppData and if a program wants to write a file and the path does not exist it should create the path.
BTW, yes I created the path portableapps\_data\

Re: Get invalid file name error when using winamp as player

by MMFrLife » Sat Feb 14, 2015 2:43 pm

Something to try/test if you want before heading to the debug:

Shut down MM and WinAmp (check task manager process to be sure)
1. Take out your MM and WinAmp databases (and MM .ini and .registry). Place them in folder somewhere for safe keeping but not on the desktop.
pref on another drive.
2. delete the 415 at the end of MM folder (use the setup file as a reminder for that).
3. Move the MM folder to the desktop (don't nest it inside of anything other than being on the desktop).
4. Move your Winamp folder to the desktop (same idea as above).

aside: Is portableapps\_data\ a path you created or a program created it? I'm guessing you created the rest, but what about the first part?

if you created all of it, then:

5. open MM and scan that path to MM.
6. choose Winamp > see what happens when trying to play file.

- forget the \\diskstation\ for now.

Re: Get invalid file name error when using winamp as player

by staff » Sat Feb 14, 2015 12:55 pm

C:\portableapps\MediaMonkey415
or
C:\portableapps\MediaMonkey

Re: Get invalid file name error when using winamp as player

by MMFrLife » Sat Feb 14, 2015 7:15 am

What is the path for MM?

Re: Get invalid file name error when using winamp as player

by staff » Sat Feb 14, 2015 4:15 am

Thanks for the help!
Here some further information. I couldn' t figure out a solution.

Mediamonkey.ini
[System]
WinampPath=C:\portableapps\winamp56\winamp.exe

dir for winamp.exe
C:\>dir C:\portableapps\winamp56\winamp.exe
13.12.2013 03:47 2.326.624 winamp.exe

...complete file path for a problem file.
some examples - none is working:
\\diskstation\public\ts\CLASSIC\audio\musi1\MNO\m83\M83 - Wait.mp3
\\diskstation\public\ts\CLASSIC\audio\musi1\ABC\Beatles\Yesterday.mp3
C:\portableapps\_data\audio\test\Echosmith - Cool Kids.mp3
C:\portableapps\_data\audio\test\EchosmithCoolKids.mp3

Re: Get invalid file name error when using winamp as player

by MMFrLife » Fri Feb 13, 2015 8:12 pm

Can you give us an example of a complete file path for a problem file?

Top