Build Your Own Arcade Controls Forum

Software Support => GroovyMAME => Topic started by: keilmillerjr on January 21, 2019, 02:21:29 am

Title: Groovy Arcade : segmentation fault
Post by: keilmillerjr on January 21, 2019, 02:21:29 am
GroovyArcade-Arch2018.03.04-x86_64
Installed using virtualbox on my mid-2011 i5 iMac.

Default groovymame works.

Used mame source, applied groovy suppression haynor patches. Make -j5 succeeds. ./mame64 results in a Segmentation fault.

Dumped and started with a fresh source. Downloaded calamity’s groovy binary. ./groovymame -v and I get two messages from SwitchRes and then a Segmentation fault.

Ideas?
Title: Re: Groovy Arcade : segmentation fault
Post by: jimmyj1979 on January 21, 2019, 03:14:36 am
Try it under XKDE

i had this problem yesterday, couldnt run groovymame from terminal, needed to be run from within terminal in KDE :)
Title: Re: Groovy Arcade : segmentation fault
Post by: keilmillerjr on January 21, 2019, 07:44:13 am
Try it under XKDE

i had this problem yesterday, couldnt run groovymame from terminal, needed to be run from within terminal in KDE :)

wtf I booted to lxde as you suggested, launch lxterminal, and both my binaries run! Any idea why this is? Are they dependent on x11? The preinstalled mame does not need it. Hmm…?

I also get the following error: ALSA lib pcm.c:8424:(snd_pcm_recover) underrun occurred

This does not work from the shell:
$ ./mame64 -videodriver directfb
$ coredumpctl list
$ coredumpctl gdb 1663
See attached photo.

This does not work from the shell:
$ ./mame64 -cc
$ nano mame.ini
#
# SDL LOW-LEVEL DRIVER OPTIONS
#
videodriver directfb
$ ./mame64
Title: Re: Groovy Arcade : segmentation fault
Post by: keilmillerjr on January 21, 2019, 09:19:05 am
Sidenote: Be careful because groovy arcade isn’t set to ignore updates to the linux kernel. Meaning you can loose your modified 15khz kernel! Good thing I am testing within a virtual box install!

$ cd /var/cache/pacman/pkg
$ ls | less

I have no linux package to downgrade!

To ignore package updates of the kernel:

1. ```$ sudo nano /etc/pacman.conf```
2. Change line 25 ```#IgnorePkg =``` to ```IgnorePkg = linux```
Title: Re: Groovy Arcade : segmentation fault
Post by: Calamity on January 21, 2019, 09:48:00 am
What's the purpose of -videodriver directfb?
Title: Re: Groovy Arcade : segmentation fault
Post by: keilmillerjr on January 21, 2019, 10:38:33 am
What's the purpose of -videodriver directfb?

Quote from: https://docs.mamedev.org/commandline/sdlconfig.html
SDL Low-level Driver Options ~—————————

-videodriver <driver>

SDL video driver to use (‘x11’, ‘directfb’, … or ‘auto’ for SDL default)

Just trying things. The groovymame that comes bundled has options set to auto in mame.ini. Perhaps there is compilation options?
Title: Re: Groovy Arcade : segmentation fault
Post by: Doozer on January 21, 2019, 10:52:39 am
What's the purpose of -videodriver directfb?

Quote from: https://docs.mamedev.org/commandline/sdlconfig.html
SDL Low-level Driver Options ~—————————

-videodriver <driver>

SDL video driver to use (‘x11’, ‘directfb’, … or ‘auto’ for SDL default)

Just trying things. The groovymame that comes bundled has options set to auto in mame.ini. Perhaps there is compilation options?

You should stick to the SDL2 library under Linux.

It seems that the "groovy suppression" patch is causing issue. Are you sure this patch is working for the Linux build?
Title: Re: Groovy Arcade : segmentation fault
Post by: keilmillerjr on January 21, 2019, 11:21:17 am
http://mamestuff.lowtrucks.net/MKChamp/ (http://mamestuff.lowtrucks.net/MKChamp/)

Using the binary I compiled with suppression groovy and haynor666 various fixes patches does not work in auto (sdl) from shell. The precompiled Linux binary provides on calamity google drive yields same error. Did you compile with suppression? I’ll try again without, but it takes hours each time I try this. Both binaries work when launched with LXDE is loaded, so I don’t think its the suppression patch.
Title: Re: Groovy Arcade : segmentation fault
Post by: keilmillerjr on January 21, 2019, 01:35:59 pm
I’m into something. I think default videodriver is x11, which is available when lxde is launched. However, explicitly demanding SDL results in sdl not available.

Before compiling, I did the following:

1. ```$ sudo pacman -Syu``` Update all packages on the system.
2. ```$ sudo pacman -S base-devel git sdl2 gconf sdl2_ttf gcc qt5```
Title: Re: Groovy Arcade : segmentation fault
Post by: Calamity on January 21, 2019, 04:17:03 pm
GroovyMAME only works properly with -video opengl (IIRC). Whatever it's set as default in the live-CD's mame.ini is what you should use.

@Doozer, is it possible that the use of the xrandr api now makes GM require x11 to run?
Title: Re: Groovy Arcade : segmentation fault
Post by: jimmyj1979 on January 21, 2019, 05:18:20 pm
Sidenote: Be careful because groovy arcade isn’t set to ignore updates to the linux kernel. Meaning you can loose your modified 15khz kernel! Good thing I am testing within a virtual box install!

$ cd /var/cache/pacman/pkg
$ ls | less

I have no linux package to downgrade!

To ignore package updates of the kernel:

1. ```$ sudo nano /etc/pacman.conf```
2. Change line 25 ```#IgnorePkg =``` to ```IgnorePkg = linux```

hey mate I have tried this on my 2017 GA build, it killed my attract mode install. Did your attract mode work after you did this?
Title: Re: Groovy Arcade : segmentation fault
Post by: keilmillerjr on January 21, 2019, 10:17:28 pm
Sidenote: Be careful because groovy arcade isn’t set to ignore updates to the linux kernel. Meaning you can loose your modified 15khz kernel! Good thing I am testing within a virtual box install!

$ cd /var/cache/pacman/pkg
$ ls | less

I have no linux package to downgrade!

To ignore package updates of the kernel:

1. ```$ sudo nano /etc/pacman.conf```
2. Change line 25 ```#IgnorePkg =``` to ```IgnorePkg = linux```

hey mate I have tried this on my 2017 GA build, it killed my attract mode install. Did your attract mode work after you did this?

I currently have a working attractmode. I compiled and installed attract 2.5.1 before doing a Pac-Man update.
Title: Re: Groovy Arcade : segmentation fault
Post by: jimmyj1979 on January 21, 2019, 10:45:24 pm
i just may try this :)
Title: Re: Groovy Arcade : segmentation fault
Post by: Doozer on January 22, 2019, 07:51:47 am
@Doozer, is it possible that the use of the xrandr api now makes GM require x11 to run?

The xrandr tool is indeed needing the X library to run. The DRM part is not X related but the management of the video screen requires X to be loaded.

@keilmillerjr, do you try to launch GM from a frame buffer? If this is the case, it is better to stick to the stock Mame executable.

Under X the -video auto is treated equivalent to -video opengl for SDL. The opengl backend is indeed the way the system draw the picture to screen.

Video option is one of the following output method: none, soft, opengl or bgfx

Videodriver can be either:
Code: [Select]
                            opengl
                         opengles2
                          opengles
                          software

SDL will be used as the drawing library (Using SDL multi-window OpenGL driver (SDL 2.0+))

SDL use internally XRANDR with X11 to manipulate the connected CRTCs (SDL_VIDEO_X11_XRANDR).

Cheers!
Title: Re: Groovy Arcade : segmentation fault
Post by: Doozer on January 22, 2019, 07:55:35 am
I went through the entire thread. Now I understand better the situation.

Groovymame is not designed to be functional under directfb. It is expecting to be run under X11.

DRM can be used to control the screen but the xrandr library will not be operational as it requires X11. Directfb is only providing very basic screen control.

Title: Re: Groovy Arcade : segmentation fault
Post by: keilmillerjr on January 23, 2019, 07:39:27 am
I went through the entire thread. Now I understand better the situation.

Groovymame is not designed to be functional under directfb. It is expecting to be run under X11.

DRM can be used to control the screen but the xrandr library will not be operational as it requires X11. Directfb is only providing very basic screen control.

Gotcha. So I noticed, the preinstalled binary /usr/local/bin/groovymame when launched from shell also returns a seg fault. This tells me that it is not being launched alone from a shell. Time to investigate how attract/mame is being launched. Perhaps somewhere in /opt/gasetup/core/procedures/interactive is the answer.? Replacing the official binary with the one I compiled worked. However, a more normal directory structure would be helpful. GA seems awesome but a little complicated with its pre-configuring.
Title: Re: Groovy Arcade : segmentation fault
Post by: Doozer on January 23, 2019, 08:21:49 am
Gotcha. So I noticed, the preinstalled binary /usr/local/bin/groovymame when launched from shell also returns a seg fault. This tells me that it is not being launched alone from a shell. Time to investigate how attract/mame is being launched. Perhaps somewhere in /opt/gasetup/core/procedures/interactive is the answer.? Replacing the official binary with the one I compiled worked. However, a more normal directory structure would be helpful. GA seems awesome but a little complicated with its pre-configuring.

Hi keilmillerjr,

Are you sure the environment variable named DISPLAY is properly set? If X is started from another shell the previously opened shells do not have DISPLAY set.

E.g.
Code: [Select]
[arcade@cabvm64 ~]$ groovymame -verbose -seconds_to_run 10 bonzeadv
SwitchRes: v0.017m, Monitor: lcd, Orientation: horizontal, Modeline generation: enabled
SwitchRes: Using default vfreq range for LCD 59.000000-61.000000
Segmentation fault (core dumped)

This can be easily fixed by specifying how to reach X. I don't know if you have already tried but you can give the following call a try.
Code: [Select]
DISPLAY=:0 groovymame [...]

If this is solving your issue, you can also export it once. This line can be made permanent in a shell script or at login by adding it to either .back_profile, .bashrc or /etc/profile (at your convenience).
Code: [Select]
export DISPLAY=:0
groovymame [...]