FS#78926 - [dolphin-emu] OpenGL backend segfaults

Attached to Project: Arch Linux
Opened by Jeremi Campagna (Shijikori) - Thursday, 29 June 2023, 15:17 GMT
Last edited by Toolybird (Toolybird) - Thursday, 29 June 2023, 22:41 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
When using the OpenGL backend, the emulator segfaults loading any game.

Additional info:
* 5.0.r19433.34527cadcc-3
* config and/or log files etc.
* no upstream significant bug report. only related bug is this one : https://bugs.dolphin-emu.org/issues/13257

Steps to reproduce:
1. Open dolphin-emu
2. In Graphics settings, set backend to "OpenGL"
3. Play a game

Log output stops and dolphin-emu segfaults.

I would tend to believe the package has not been built correctly or is using a broken version as AUR package dolphin-emu-beta-git works perfectly.
Compiling the same version manually (5.0.r19368) with the same dependencies installed and same arguments as described in dolphin-emu-beta-git PKGBUILD results in fully working binaries, no issues with OpenGL backend.
This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 29 June 2023, 22:41 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#78628 
Comment by Jeremi Campagna (Shijikori) - Thursday, 29 June 2023, 20:04 GMT
I drafted a patch for the PKGBUILD of the current dolphin-emu. It seems it fixes the OpenGL backend. At least it no longer segfaults for me and seems to perform as well as my manually compiled local build.
I attached the patch to this comment.
Comment by loqs (loqs) - Thursday, 29 June 2023, 20:04 GMT
When you built the package locally was that with LTO enabled or disabled?  FS#78628 
Comment by Jeremi Campagna (Shijikori) - Thursday, 29 June 2023, 20:10 GMT
I didn't do anything related to LTO. Whatever that is, it is left as it was.
Comment by Jeremi Campagna (Shijikori) - Thursday, 29 June 2023, 20:14 GMT
The package I just compiled locally is based on the current PKGBUILD ( https://gitlab.archlinux.org/archlinux/packaging/packages/dolphin-emu/-/blob/main/PKGBUILD ) with the patch I just shared applied.
Comment by loqs (loqs) - Thursday, 29 June 2023, 20:20 GMT
You can check the !BUILDINFO file in the root of the dolphin-emu-1 5.0.r19433.34527cadcc-3-x86_64.pkg.tar.zst for an options line referring to lto.
Comment by Jeremi Campagna (Shijikori) - Thursday, 29 June 2023, 20:30 GMT
In the .BUILDINFO of the package, there's options = !lto . Hope that helps.
Comment by loqs (loqs) - Thursday, 29 June 2023, 20:41 GMT
That would indicate this is a duplicate of  FS#78628 . The linked package is built with LTO disabled using the attached diff. It was built in a clean chroot. Does it segfault?

https://drive.google.com/file/d/1WAcDX4bxAd-HbX9I-4WTBAuCBjZdIMhy/view?usp=sharing dolphin-emu-1:5.0.r19433.34527cadcc-3-x86_64.pkg.tar.zst
Comment by Jeremi Campagna (Shijikori) - Thursday, 29 June 2023, 20:56 GMT
No, doesn't seem like it segfaults.

Rather puzzling considering my patch is also basically what I had to do to get a local build of dolphin-emu (from upstream repo and documentation) running. I suppose something with the options that I changed disables LTO?
Could also be unrelated.
Comment by Toolybird (Toolybird) - Thursday, 29 June 2023, 22:40 GMT
> Rather puzzling

Not really. If you compile in a clean chroot as per Arch official pkgs, the makepkg.conf used is from devtools [1]. If you compile locally, the makepkg.conf is more than likely from pacman [2]. They are actually different, notably regarding LTO. The 2 being different is not ideal, but that's how it is currently.

[1] https://gitlab.archlinux.org/archlinux/devtools/-/blob/master/config/makepkg/x86_64.conf
[2] https://gitlab.archlinux.org/archlinux/packaging/packages/pacman/-/blob/main/makepkg.conf

Loading...