MAME preview videos broken when using XML Vs ROM list generation

Bug #376142 reported by Jason Carter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Wah!Cade
Fix Committed
Medium
Andy Balcombe

Bug Description

For the last few versions of Wah!Cade, MAME preview videos have been broken for me. I'm sorry I don't remember exactly when it stopped working properly. The problem happens exclusively when using the XML vs ROM directory list generation method. When using the ROM directory list instead (which uses the proper 8 character MAME names for each game in the ROM list), the videos all work properly.

The console reports a constant stream of "file cannot be found" errors like below:
/path/to/video/previews/MAMEGAME.avi cannot be found.

My previews and ROMs are all named in lower case letters, so I'm not sure why the game name is being captialized. Since my ROMs and previews are being streamed through Samba running on Linux, I thought that maybe this was a case sensitivity issue being caused by it. I set up Samba (and my client) to ignore case-sensitivity. This works in all my applications, but still does not satisify Wahcade, which continues to output the error repeatedly. It's been at least a few months since I've had this issue. I would have reported it sooner, but I wasn't sure that it might be Wahcade with the issue.

Even directly editing the game lists created by Wahcade to change the upper case MAME game names to lower case hasn't helped.

My wahcade.ini file can be found here: http://svn.zerojay.com/zerogame/tags/0.32-rc4/configs/wahcade/wahcade.ini
My MAME filter/list files can be found here: http://svn.zerojay.com/zerogame/tags/0.32-rc4/configs/wahcade/ini/

Let me know if there's anything more I can give you. I'll post the actual error from Wahcade as soon as I am back home tonight.

Revision history for this message
Andy Balcombe (andy-balcombe) wrote :

Thanks for the report - It definitely looks like some sort of Wahcade bug. I'll see what I can find...

Changed in wahcade:
assignee: nobody → Andy Balcombe (andy-balcombe)
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Andy Balcombe (andy-balcombe) wrote :

Hi Jason,

I've checked the code for matching filenames in Wah!Cade and I it should check for the following:

/path/to/video/previews/MAMEGAME.avi
/path/to/video/previews/mamegame.avi
/path/to/video/previews/MAMEGAME.AVI

which in theory should match the settings you have, so I'm still a bit puzzled. Could you post the actual error messages you're seeing from the console?

One other thing to try is to create a directory under your home dir (e.g. ~/mame_vids) and copy a copy of your .avi files into it and try to see if Wah!cade will pick them up from just to rule out any file permissions errors, etc.)

Cheers,
Andy

Revision history for this message
Jason Carter (jay-zerojay) wrote :

Here's the error being thrown:

Error: Resource not found. gstfilesrc.c(971): gst_file_src_start (): /player/source: No such file "/home/zerogame/mount/Video Previews/MAME/MOO.avi"

The actual file name on my share is moo.avi, but I have case sensitivity off. I head for the directory in question to test the case sensitivity and do the following, which shows that the file IS found in both cases.

$ ls moo.avi
moo.avi
$ ls MOO.avi
MOO.avi

I copied msh.avi (Marvel Super Heroes) to ~/vidtest/ and set the video directory for MAME to the same. I headed to Marvel Super Heroes on the list and the video played fine for it and all its clones.

Reverting it to my share and trying again gave me this:
Error: Resource not found. gstfilesrc.c(971): gst_file_src_start (): /player/source: No such file "/home/zerogame/mount/Video Previews/MAME/MSH.avi"

Again, it capitalizes the game name, but it shouldn't even matter.

All other emulators pick up their preview videos just fine. It's just MAME with this issue. Let me know if there's more you need me to try.

Revision history for this message
Andy Balcombe (andy-balcombe) wrote :

Ah. That looks like an internal gstreamer error.
Can you play the file with totem "totem /home/zerogame/mount/Video Previews/MAME/MOO.avi"?

Revision history for this message
Jason Carter (jay-zerojay) wrote :

Attempting to play the file as you mentioned gave me a "Location not found" dialog box error.

Attempting to play moo.avi (which is the actual filename) instead of MOO.avi resulted in the video playing perfectly fine.

Revision history for this message
Andy Balcombe (andy-balcombe) wrote :

I think that what's happening then is that Wah!Cade first checks to see if /path/to/MOO.avi exists (which it does) and then attempts to play it which results in an error. So Wah!Cade never gets as far as checking for /path/to/moo.avi. One workaround then is to re-enable the case sensitivity option on your mapped drive.

Revision history for this message
Jason Carter (jay-zerojay) wrote :

I had it already enabled when I first started getting this error. I thought disabling the case-sensitivity would work, but it didn't... so I'm kind of at a loss about what can be done here.

Revision history for this message
Jason Carter (jay-zerojay) wrote :

And I want to stress that it's only MAME that has this problem. All my other consoles do not, so I think maybe what is happening is that Wahcade, when creating the initial filter, is substituting the capitalized MAME name for the lowercase one. It doesn't matter for the ROM loading, but seems to matter when it's loading the movies. I also don't have any problems when generating the filter by ROM list.

I really think it's being caused by the ROM scanning process uppercasing all the MAME ROM names in the game list.

Revision history for this message
Andy Balcombe (andy-balcombe) wrote :

Hmmm. I would have thought that if case-sensitivity was enabled then Wah!Cade wouldn't match on /path/to/MOO.avi, but would match on /path/to/moo.avi. What sort of filesystem is your shared drive?

Revision history for this message
Jason Carter (jay-zerojay) wrote :

I believe it's an EXT4 partition. I'll double check tonight.

Revision history for this message
Jason Carter (jay-zerojay) wrote :

I got bored tonight and decided to try something. I opened up mame-0.lst, searched for MSH (Marvel Super Heroes) in the file and changed the game name from capital letters to lower case letters, saved and started up Wahcade. The video then played perfectly fine from my Samba share.

I'm not sure why Wahcade insists on creating it's MAME game list using all capital letters, but it does.

Revision history for this message
Andy Balcombe (andy-balcombe) wrote :

Hmmm. It shouldn't matter whether the list is created upper or lower case as Wah!Cade tries to match on both.

As an experiment, can you try this in a command line for me:
*****************
$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.isfile('/path/to/MOO.avi)

and

>>> os.path.isfile('/path/to/moo.avi)
*****************

Hopefully the first result will be "False" and the second should be "True". If they're both "True" then there's definitely something odd with your samba share...

Cheers,
Andy

Revision history for this message
Jason Carter (jay-zerojay) wrote :

I've finally fixed this issue. When Wahcade creates a filter file for MAME and ONLY MAME, it forces the ROM name into uppercase during creation. I noticed that if I manually fixed the file name in mame-0.lst and set the ROM name to lowercase, it would work. All previews and screenshots were suddenly found without an issue.

In filters.py, in the get_xml_game_item function, change the following lines from this:

d['rom_name'] = game_element.attrib['name'].upper()
d['clone_of'] = game_element.attrib['cloneof'].upper()
d['rom_of'] = game_element.attrib['romof'].upper()

...to this...

d['rom_name'] = game_element.attrib['name']
d['clone_of'] = game_element.attrib['cloneof']
d['rom_of'] = game_element.attrib['romof']

And bam, everything suddenly works for me.

Revision history for this message
Andy Balcombe (andy-balcombe) wrote :

That's excellent news Jason. I'll give it a quick test & make sure it goes into the next release.

Cheers,
Andy

Changed in wahcade:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.