Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08125 Interface Major Always 28 days ago 27 days ago
Tester john_iv View Status Public Platform MAME (Official Binary)
Assigned To Resolution Invalid report OS Windows 10/11 (64-bit)
Status [?] Closed Driver cinemat.cpp
Version 0.237 Fixed in Version Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 08125: armora, dkong: Getting 'generic:13 Permissions denied' error when trying to playback *.inp created via mame.ini
Description Trying to create an INP to play back for a snapshot. INP is created in .\INP successfully.
using 'mame.exe armora -playback OneOff.inp' results in error as it attempts to playback. Tried w/ today's trunk and .237.

c:\O\Games\MAME>mame dkong -playback oneoff.inp
Warning: layout view 'Upright_Artwork' contains deprecated bezel element
Warning: layout view 'Upright_Artwork' contains deprecated backdrop element
Warning: layout view 'Upright_Artwork_D2K' contains deprecated bezel element
Warning: layout view 'Cocktail_Inst' contains deprecated bezel element
Warning: layout view 'Hausjam_Artwork' contains deprecated bezel element
Warning: layout view 'Upright_Artwork' contains deprecated bezel element
Warning: layout view 'Upright_Artwork' contains deprecated backdrop element
Warning: layout view 'Upright_Artwork_D2K' contains deprecated bezel element
Warning: layout view 'Cocktail_Inst' contains deprecated bezel element
Warning: layout view 'Hausjam_Artwork' contains deprecated bezel element
Input file: oneoff.inp
INP version 3.0
Created Sun Nov 07 17:58:14 2021

Recorded using MAME 0.237 (mame0237-124-g467a11
Fatal error: ioport_manager::record_init: Failed to open file for recording (generic:13 Permission denied)
Total playback frames: 0
Average recorded speed: 0%
Exiting MAME now...
Steps To Reproduce In my mame.ini I have:
Record OneOff.inp

This creates a new OneOff.inp for every game that is played, overwriting itself.
Play a game.
See OneOff.inp in \inp directory.
Try to playback the recording *from command-line* not from playback OneOff.inp in mame.ini.
mame dkong -playback OneOff.inp

Receive error.
Additional Information Done from commandline instead of w/in front-end just in case some multi-session code was keeping the file open. Same thing happens.

Note: just tried two separate commands and it worked.
mame dkong -record dkong.inp
then
mame dkong -playback dkong.inp

So it doesn't appear to like a static named inp in the mame.ini and trying to play that back(?).
Github Commit
Flags
Regression Version
Affected Sets / Systems armora, dkong
Attached Files
? file icon MAME.ini (11,442 bytes) 28 days ago Uploaded by john_iv
[Show Content]
Relationships
There are no relationship linked to this issue.
Notes
7
User avatar
No.19424
Tafoid
Administrator
28 days ago
For the record, I cannot trigger it using current Git or release 0.237 binary and command-line with a simple -record (filename) and -playback (filename).
I run a minimal ini only change essential paths and directories.
Added the "record dkongini.inp" then launched "mame dkong" and it recorded without error.
Added "playback dkongini.inp" then launched "mame dkong" and it played back without issue.
Seems to work for me.

What is the "input_directory" setting in your .ini. By default it should show "inp"
What does a -showconfig output show for it when you try to load?
Could case be an issue.. either in the command in the .ini or the filename you are trying to record/playback?
Maybe others have ideas.
User avatar
No.19425
john_iv
Senior Tester
28 days ago
1. inp directory in mame.ini is default 'inp'
2. To duplicate my steps you need the "record blah.inp" in mame.ini but not the playback.
3. Play your game.
4. Try to playback the inp from *command line*, do not add "playback blah.inp" to mame.ini. Use 'mame.exe game -playback blah.inp'.
5. Cases are accounted for.
User avatar
No.19426
john_iv
Senior Tester
28 days ago
Hmm, I can get it to work if I nix the rest of mame.ini with -norc
Record the game to blah.inp with it being created by the mame.ini.
Then on commandline use 'mame dkong -playback blah.inp -norc'.

So somebody's unhappy w/ the mame.ini.
User avatar
No.19427
john_iv
Senior Tester
28 days ago
edited on: 28 days ago
Ok Tafoid, I figured it out.
Apparently you can't have record blah.inp in mame.ini and then run 'mame dkong -playback blah.inp' because the -showconfig shows that that blah.inp is trying to be used *at the same time* by both options, hence the file permissions lock. :(

playback default.inp
record default.inp

I like the idea of generating an INP automatically for ever game played, but will have to be careful on playback apparently.
Looks like I just have to add a null.inp to the record command line argument, like 'mame dkong -playback blah.inp -record null.inp'. That way two inps aren't trying to be used at the same time.
User avatar
No.19437
Tafoid
Administrator
28 days ago
That would likely be expected, I think, if both are filled in MAME doesn't know (or care) which one to use so it tries both with same filename. I'll leave to others to see if anything needs to be done here.
User avatar
No.19445
cuavas
Administrator
27 days ago
Being able to play back and record at the same time is necessary for people creating TAS videos in multiple sessions among other use cases. It's correctly getting a sharing violation when it tries to open the file twice.
User avatar
No.19446
cuavas
Administrator
27 days ago
Playing and recording to the same file is not supported.