Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08738 Plugins Minor Always Jul 30, 2023, 18:24 Aug 17, 2023, 18:56
Tester john_iv View Status Public Platform MAME (Official Binary)
Assigned To hap Resolution Fixed OS Windows 10/11 (64-bit)
Status [?] Resolved Driver
Version 0.257 Fixed in Version 0.258 Build 64-bit
Fixed in Git Commit 367ce4d Github Pull Request #
Summary 08738: Fresh plugin.ini via 'mame -cc' may create empty file.
Description The clean plugin.ini created by the command 'mame.exe -cc' is creating an error when launching a game with -verbose or -bench.

Removal of plugin.ini removes the error, as does typing regular text after the characters and saving the resulting file:

c:\O\Games\MAME>type plugin.ini


c:\O\Games\MAME>mame pacman -bench 90 -snapname bench
**Error loading plugin.ini**
Average speed: 16380.61% (89 seconds)
Steps To Reproduce 1. Remove plugin.ini if present.
2. Edit mame.ini and clear pluginpaths directory. [updated]
3. Run 'mame.exe -cc' to create a fresh one.
*4. From command line use 'type plugin.ini' to see the characters.
5. Run 'mame.exe pacman -bench 90'
6. Receive error loading plugin output to screen.

* optional

Expected:
Empty plugins.ini should not be created leading to this error if there is no plugins directory or one is not referenced in Mame.ini.

Actual:
Empty BOM headered plugin.ini is created with mame -cc which leads to the error when running games.
Additional Information Happens in 0.257 release from mamedev.org and tip of master 0.257 (mame0257-75-g1fe2664723f).
[Edit: This occurs when the mame.ini pluginpaths line is blank; see discussion w/ Hap below]
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
? file icon plugin.ini (3 bytes) Jul 30, 2023, 18:24 Uploaded by john_iv
[Show Content]
Relationships
There are no relationship linked to this issue.
Notes
5
User avatar
No.21673
Robbbert
Senior Tester
Jul 31, 2023, 03:56
The 3 characters in your file are EF,BB,BF which I assume is a UTF-8 header. Notepad identifies it as as "UTF-8 with BOM". I believe that is intentional, however it would be a good idea if the list of plugins were included with their default settings.
User avatar
No.21674
hap
Developer
Jul 31, 2023, 09:03
edited on: Jul 31, 2023, 15:36
You mean the newly created plugin.ini is 3 bytes?
For me, it gets filled with the default plugin options, so no error when loading pacman.

*edit* I can repro it if i rename the plugins folder.
Are you sure you didn't modify mame.ini to point to a different pluginspath(one that doesn't exist), and are you sure you have the plugins folder? If no, it's a user error.
At the same time, IMO MAME shouldn't create an empty file with just a BOM header. If it can't find any plugins, it shouldn't create a file at all.
User avatar
No.21675
john_iv
Senior Tester
Jul 31, 2023, 17:05
Thanks Hap, the plugins path was blank in mame.ini (probably cleared for a prior LUA load error or something). So in this instance I wonder if the logic should be hardened to not create the file per your second point. If people want to forgo anything to do with plugins they can do so without its files or ini entry and subsequent error.

Note, the use of 'mame.exe -cc' did *not* create the missing default entry to pluginpaths. I know that 'mame -cc' does 'fill in the gaps' by creating some other entries in mame.ini, but it must not for this pathing?
User avatar
No.21676
hap
Developer
Jul 31, 2023, 19:57
After https://github.com/mamedev/mame/commit/367ce4d6b75975809dbde39294349a3d294044b0 , it won't create an empty plugin.ini file anymore.

mame -cc updates mame.ini, it does not overwrite it with default settings.
eg. if i do a mame -cc, it will still have my rompath, and will still have "window" set to 1.
If you completely remove the "pluginspath" line, then yes it will create one and set it to "plugins".
User avatar
No.21677
john_iv
Senior Tester
Jul 31, 2023, 20:53
Confirmed fixed, 0.257 (mame0257-82-g367ce4d6b75). Thanks -