Viewing Issue Advanced Details
ID Category [?] Severity [?] Reproducibility Date Submitted Last Update
08272 Crash/Freeze Major Always Mar 26, 2022, 07:18 Apr 16, 2022, 20:30
Tester tomsam View Status Public Platform MAME (Official Binary)
Assigned To Resolution Fixed OS Linux (64-bit)
Status [?] Resolved Driver
Version 0.241 Fixed in Version 0.242 Build 64-bit
Fixed in Git Commit Github Pull Request #
Summary 08272: Mame reports missing BGFX files and crashes (arch linux only)
Description Summary
After 0.240-1 has been replaced by 0.241-1 on my up-to-date arch system, it doesn't start anymore and reports missing BGFX files.
I therefore submitted a bug to the corresponding arch maintainers, but they claimed that this is not a problem with their packaging, and thus "upstream" aka the MAME developers should be contacted.

I don't know which MAME version the arch packager used, so I selected "MAME official"


The link to the bug report
https://bugs.archlinux.org/task/74214

The initial text
-------------------
Until the previous version, mame worked fine on my usually updated Arch system.

Linux warp 5.16.15-arch1-1 #1 SMP PREEMPT Thu, 17 Mar 2022 00:30:09 +0000 x86_64 GNU/Linux

Now with version

mame 0.241-1

it displays the text

$ mame
Unable to open effect file bgfx/effects/gui_opaque.json
Unable to open effect file bgfx/effects/gui_blend.json
Unable to open effect file bgfx/effects/gui_multiply.json
Unable to open effect file bgfx/effects/gui_add.json
Unable to open effect file bgfx/effects/screen_opaque.json
Unable to open effect file bgfx/effects/screen_blend.json
Unable to open effect file bgfx/effects/screen_multiply.json
Unable to open effect file bgfx/effects/screen_add.json
Ignoring MAME exception: BGFX: Unable to load required shaders. Please check and reinstall the bgfx folder

Fatal error: BGFX: Unable to load required shaders. Please check and reinstall the bgfx folder

Memory fault(coredump)


at startup.


Reinstallation of the package, and removing the mame.ini file, did not help.


The question is: Is this a bug or is there just a new config option missing

The bgfx files (from the package) seems to be installed

find /usr/lib/mame/bgfx/ -ls | wc -l
1439

find /usr/lib/mame/artwork/bgfx -ls | wc -l
22

ls -l /usr/share/doc/mame/source/advanced/bgfx.rst
-rw-r--r-- 1 root root 7868 23. Feb 21:17 /usr/share/doc/mame/source/advanced/bgfx.rst

I.e. 1462 file with bgfx in it, just like in the files list.

The files (here shown for the files with opaque in the name)
mame claimed not to be able to find are also there:

find /usr/lib/mame/bgfx/ -ls | grep opaque
36707782 4 -rw-r--r-- 1 root root 599 Feb 23 21:17 /usr/lib/mame/bgfx/effects/gui_opaque.json
36707786 4 -rw-r--r-- 1 root root 677 Feb 23 21:17 /usr/lib/mame/bgfx/effects/screen_opaque.json


If you need more information about my system, let me know.


Additional info:
* package version(s)
mame 0.241-1

* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:

Start mame
-------------------
Steps To Reproduce Start mame 0.241-1
Additional Information As can be seen in the arch bug report, downgrading to 0.240-1 worked,
so it's likely that the new executable has caused this issue.
Github Commit
Flags
Regression Version
Affected Sets / Systems
Attached Files
 
Relationships
There are no relationship linked to this issue.
Notes
8
User avatar
No.19953
tomsam
Tester
Mar 27, 2022, 19:18
I now compiled the 0.241-1 sources (by make -j 4), and the resulting non-stripped executable worked.

However, if that executable got stripped (by strip mame), the resulting executable crashes as described above.

IMHO, an executable should not crash wether it contains full symbols or not.
User avatar
No.19954
Robbbert
Senior Tester
Mar 28, 2022, 04:06
What compiler and version are you using?
User avatar
No.19955
tomsam
Tester
Mar 28, 2022, 06:04
$ gcc --version
gcc (GCC) 11.2.0
User avatar
No.19956
tomsam
Tester
Mar 28, 2022, 06:08
Btw: While the non-stripped version creates a $HOME/.mame and a ui.ini
in case there is no $HOME/.mame, the stripped version does not (i.e. it
crashes before it can create them)
User avatar
No.19959
AmatCoder
Tester
Mar 28, 2022, 11:20
This issue has been around for a time. It has now been exposed on 0.241 version because of this commit:
https://github.com/mamedev/mame/commit/eee7d7d155d527996890a90c952f9856675c965d

In short, MAME crashed if bgfx_path is not found. You can workaround it by modifying your mame.ini:

bgfx_path /usr/lib/mame/bgfx
 


Anyway it is fixed here:
https://github.com/mamedev/mame/commit/d3829a0932bc1b12e92ee8079a97e7150a96b274
User avatar
No.19963
tomsam
Tester
Mar 29, 2022, 06:57
Thanks, I will recompile it, and then forward that information to the package maintainer.
User avatar
No.20059
Tafoid
Administrator
Apr 15, 2022, 18:32
Presumably, this is fixed for OP from the source end, anyway.
If it continues to be an issue, please comment.
User avatar
No.20075
hap
Developer
Apr 16, 2022, 20:30
Perhaps this bgfx_path issue was fixed in 0.242 but not by me.
In other words, https://github.com/mamedev/mame/commit/d3829a0932bc1b12e92ee8079a97e7150a96b274 is not related, this one fixed a problem with renderer autodetection.