Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#71369 - [zsnes] crashes with segmentation fault on startup

Attached to Project: Community Packages
Opened by Melissa Loos (Kaiyazeera) - Sunday, 27 June 2021, 08:09 GMT
Last edited by Alexander F. Rødseth (xyproto) - Thursday, 08 July 2021, 19:35 GMT
Task Type Bug Report
Category Packages: Multilib
Status Closed
Assigned To Alexander F. Rødseth (xyproto)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
zsnes crashes with segmentation fault on startup.


```
$ zsnes
ZSNES v1.51, (c) 1997-2007, ZSNES Team
Be sure to check http://www.zsnes.com/ for the latest version.

ZSNES is written by the ZSNES Team (See AUTHORS.TXT)
ZSNES comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions;
please read 'LICENSE.TXT' thoroughly before doing so.

Use ZSNES -? for command line definitions.

Starting Mouse detection.
Unable to poll /dev/input/event19. Make sure you have read permissions to it.
Unable to poll /dev/input/event18. Make sure you have read permissions to it.
Unable to poll /dev/input/event17. Make sure you have read permissions to it.
Unable to poll /dev/input/event16. Make sure you have read permissions to it.
Unable to poll /dev/input/event15. Make sure you have read permissions to it.
Unable to poll /dev/input/event14. Make sure you have read permissions to it.
Unable to poll /dev/input/event13. Make sure you have read permissions to it.
Unable to poll /dev/input/event12. Make sure you have read permissions to it.
Unable to poll /dev/input/event11. Make sure you have read permissions to it.
Unable to poll /dev/input/event10. Make sure you have read permissions to it.
Unable to poll /dev/input/event9. Make sure you have read permissions to it.
Unable to poll /dev/input/event8. Make sure you have read permissions to it.
Unable to poll /dev/input/event7. Make sure you have read permissions to it.
Unable to poll /dev/input/event6. Make sure you have read permissions to it.
Unable to poll /dev/input/event5. Make sure you have read permissions to it.
Unable to poll /dev/input/event4. Make sure you have read permissions to it.
Unable to poll /dev/input/event1. Make sure you have read permissions to it.
Unable to poll /dev/input/event0. Make sure you have read permissions to it.
ManyMouse: 0 mice detected.
Segmentation fault (core dumped)
```

```
$ sudo zsnes
ZSNES v1.51, (c) 1997-2007, ZSNES Team
Be sure to check http://www.zsnes.com/ for the latest version.

ZSNES is written by the ZSNES Team (See AUTHORS.TXT)
ZSNES comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions;
please read 'LICENSE.TXT' thoroughly before doing so.

Use ZSNES -? for command line definitions.

Starting Mouse detection.
ManyMouse: 1 mice detected.
Segmentation fault

```


Additional info:
* zsnes-1.51-22
* I already tried deleting the .cfg files in the ~/.zsnes/ directory
* link to upstream bug report, if any

Steps to reproduce:
Open zsnes.
This task depends upon

Closed by  Alexander F. Rødseth (xyproto)
Thursday, 08 July 2021, 19:35 GMT
Reason for closing:  Fixed
Additional comments about closing:  Switched to a zsnes fork
Comment by Melissa Loos (Kaiyazeera) - Sunday, 27 June 2021, 08:11 GMT
The system uses up-to-date packages for all of the zsnes dependencies.
Comment by Alexander F. Rødseth (xyproto) - Monday, 28 June 2021, 09:26 GMT
Thanks for reporting.

I believe the current zsnes package only supports X11. `gdb zsnes` and `r` shows a SIGSEGV:
"0xf76a33f0 in _XSend () from /usr/lib32/libX11.so.6"

I can reproduce the issue in Sway/Wayland.

Could you please try running Zsnes in ie. Xfce4 and see if the problem persists?
Comment by Melissa Loos (Kaiyazeera) - Monday, 28 June 2021, 09:31 GMT
The problem occurred in Cinnamon. I do not have xfce, but someone else might report for this.
As a workaround, I switched to mednafen ;-/
Comment by Alexander F. Rødseth (xyproto) - Monday, 28 June 2021, 10:03 GMT
I can reproduce the issue in Xfce4 as well. This is an issue on both X and Wayland.
Comment by Alexander F. Rødseth (xyproto) - Monday, 28 June 2021, 10:17 GMT
After adding -std=c++14 to make the package build again, I get the same segfault, on both X and Wayland.
Comment by Alexander F. Rødseth (xyproto) - Monday, 28 June 2021, 10:18 GMT
Also, _XSend is not in the Zsnes source code, so this might be a library issue.
Comment by Alexander F. Rødseth (xyproto) - Monday, 28 June 2021, 10:23 GMT
There are many SNES-emulators that does not depend on lib32-*.
The last release of Zsnes was 14 years and 5 months ago.

Zsnes might possibly be ready for AUR.
Comment by Alexander F. Rødseth (xyproto) - Monday, 05 July 2021, 13:25 GMT
Gentoo bugreports hints that a segfault might also happen if lib32-zlib is compiled with -O3, but I tried recompiling that package with -O2 and got the same result.

This might be audio-related, since `zsnes -m file.smc` (launch without GUI) also segfaults.
Comment by Alexander F. Rødseth (xyproto) - Wednesday, 07 July 2021, 09:44 GMT
I'm planning to patch ZSnes so that it uses SDL2 instead of SDL1.
Comment by Melissa Loos (Kaiyazeera) - Wednesday, 07 July 2021, 09:44 GMT
thank you very much!
Comment by Alexander F. Rødseth (xyproto) - Thursday, 08 July 2021, 19:31 GMT
I created a fork of Zsnes where all the patches and trickery needed to build it are committed to the repository.

Zsnes has not had a release for >14 years, so any fork that accepts pull requests is an improvement, if we are to keep zsnes in [community], IMO.

I updated the package in [community] to use this fork.

Loading...