You are not logged in.

#1 2021-08-15 00:12:34

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 67

[RESOLVED] PCSX2 (PS2 Emulator) Crashes after Asp PKGBUILD Compilation

For some reason, after compiling a PCSX2 Release-tagged build with a PKGBUILD provided via Asp, PCSX2 fails to run games apparently due to thinking that it's supposed to refer to the location it was compiled in.

/home/neko-san/asp/pcsx2/trunk/src/pcsx2/common/src/Utilities/Linux/LnxHostSys.cpp(70) : assertion failed:
    Function:  void SysPageFaultSignalFilter(int, siginfo_t *, void *)
    Thread:    EE Core
    Condition: false
    Message:   Unhandled page fault @ 0x00000000

Stacktrace:
[00] 0x0x7fceabb67870                            
[01] 0x0x55dfa46f774c                            
[02] 0x0x55dfa49597d3                            
[03] 0x0x55dfa47fed53                            
[04] 0x0x55dfa495fe69                            
[05] 0x0x55dfa47fec47                            
[06] 0x0x55dfa495900c                            
[07] 0x0x55dfa47fe8c4                            
[08] 0x0x55dfa4aa5aef                            
[09] 0x0x55dfa4aa4fa7                            
[10] 0x0x7fceabb5d259                            
[11] clone                                       

This is the original PKGBUILD provided:

# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: josephgbr <rafael.f.f1@gmail.com>
# Contributor: vEX <vex@niechift.com>

pkgname=pcsx2
pkgver=1.7.0.r1592.47bdc58c1
pkgrel=1
pkgdesc='A Sony PlayStation 2 emulator'
arch=(x86_64)
url=https://www.pcsx2.net
license=(
  GPL2
  GPL3
  LGPL2.1
  LGPL3
)
depends=(
  gdk-pixbuf2
  glibc
  libaio
  libasound.so
  libfmt.so
  libfreetype.so
  libgdk-3.so
  libgio-2.0.so
  libgl
  libGLEW.so
  libglib-2.0.so
  libgobject-2.0.so
  libgtk-3.so
  libpcap
  libpng
  libportaudio.so
  libpulse.so
  libudev.so
  libx11
  libxcb
  libxml2
  sdl2
  soundtouch
  wxgtk3
  wxgtk-common
  xz
  zlib
)
makedepends=(
  cmake
  git
  ninja
  png++
)
_commit=47bdc58c1a30c22cf322b42e68fcf71687dd54ec
source=(
  git+https://github.com/PCSX2/pcsx2.git#commit=${_commit}
  git+https://github.com/rtissera/libchdr.git
  git+https://github.com/jbeder/yaml-cpp.git
)
b2sums=(
  SKIP
  SKIP
  SKIP
)

prepare() {
  cd pcsx2/3rdparty
  for submodule in libchdr/libchdr yaml-cpp/yaml-cpp; do
    git submodule init ${submodule}
    git config submodule.${submodule}.url ../../${submodule#*/}
    git submodule update ${submodule}
  done
}

pkgver() {
  cd pcsx2

  git describe --tags | sed 's/^v//; s/-dev//; s/-/.r/; s/-g/./'
}

build() {
  cmake -S pcsx2 -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DDISABLE_ADVANCE_SIMD=ON \
    -DDISABLE_BUILD_DATE=ON \
    -DDISABLE_PCSX2_WRAPPER=ON \
    -DENABLE_TESTS=OFF \
    -DSDL2_API=ON \
    -DPACKAGE_MODE=ON \
    -DREBUILD_SHADER=ON \
    -DUSE_LTO=OFF \
    -DUSE_SYSTEM_YAML=OFF \
    -DUSE_VTUNE=OFF \
    -DXDG_STD=ON \
    -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3 \
    -Wno-dev
  ninja -C build
}

package() {
  DESTDIR="${pkgdir}" ninja -C build install
}

# vim: ts=2 sw=2 et:

And this is the slightly edited PKGBUILD that I used:

# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: josephgbr <rafael.f.f1@gmail.com>
# Contributor: vEX <vex@niechift.com>

pkgname=pcsx2
pkgver=1.7.0.r1592.47bdc58c1
pkgrel=1
pkgdesc='A Sony PlayStation 2 emulator'
arch=(x86_64)
url=https://www.pcsx2.net
license=(
  GPL2
  GPL3
  LGPL2.1
  LGPL3
)
depends=(
  gdk-pixbuf2
  glibc
  libaio
  libasound.so
  libfmt.so
  libfreetype.so
  libgdk-3.so
  libgio-2.0.so
  libgl
  libGLEW.so
  libglib-2.0.so
  libgobject-2.0.so
  libgtk-3.so
  libpcap
  libpng
  libportaudio.so
  libpulse.so
  libudev.so
  libx11
  libxcb
  libxml2
  sdl2
  soundtouch
  wxgtk3
  wxgtk-common
  xz
  zlib
)
makedepends=(
  cmake
  git
  ninja
  png++
)
_commit=47bdc58c1a30c22cf322b42e68fcf71687dd54ec
source=(
  git+https://github.com/PCSX2/pcsx2.git#commit=${_commit}
  git+https://github.com/rtissera/libchdr.git
  git+https://github.com/jbeder/yaml-cpp.git
)
b2sums=(
  SKIP
  SKIP
  SKIP
)

prepare() {
  cd pcsx2/3rdparty
  for submodule in libchdr/libchdr yaml-cpp/yaml-cpp; do
    git submodule init ${submodule}
    git config submodule.${submodule}.url ../../${submodule#*/}
    git submodule update ${submodule}
  done
}

pkgver() {
  cd pcsx2

  git describe --tags | sed 's/^v//; s/-dev//; s/-/.r/; s/-g/./'
}

build() {
  cmake -S pcsx2 -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DDISABLE_ADVANCE_SIMD=ON \
    -DDISABLE_BUILD_DATE=OFF \
    -DDISABLE_PCSX2_WRAPPER=ON \
    -DENABLE_TESTS=OFF \
    -DSDL2_API=ON \
    -DPACKAGE_MODE=ON \
    -DREBUILD_SHADER=ON \
    -DUSE_LTO=ON \
    -DUSE_SYSTEM_YAML=OFF \
    -DUSE_VTUNE=OFF \
    -DXDG_STD=ON \
    -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-gtk3 \
    -Wno-dev \
    -DCMAKE_CXX_COMPILER=clang++ \
    -DCMAKE_C_COMPILER=clang \
    -DUSE_NATIVE_INSTRUCTIONS=ON
  sed -i 's/O2/O3/g' "$srcdir/build/CMakeCache.txt"
  sed -i 's/O1/O3/g' "$srcdir/build/CMakeCache.txt"
  sed -i 's/-march=x86-64/-march=native/g' "$srcdir/build/CMakeCache.txt"
  sed -i 's/-mtune=generic/-mtune=native/g' "$srcdir/build/CMakeCache.txt"
  CXXFLAGS+=" -minline-all-stringops -flto=16 -fuse-linker-plugin -flto-compression-level=19 -stdlib=libc++ -lstdc++"
  CFLAGS+=" -minline-all-stringops -flto=16 -fuse-linker-plugin -flto-compression-level=19"
  
  ninja -j $(nproc) -C build
}

package() {
  DESTDIR="${pkgdir}" ninja -C build install
}

# vim: ts=2 sw=2 et:

and this is a "emu" log that PCSX2 provided:

PCSX2 1.7.0-20210808190135 - compiled on Aug 14 2021
Savestate version: 0x9a220000

Host Machine Init:
	Operating System =  Linux 5.10.53-183-tkg-upds x86_64
	Physical RAM     =  32095 MB
	CPU name         =  AMD Ryzen 7 3700X 8-Core Processor
	Vendor/Model     =  AuthenticAMD (stepping 00)
	CPU speed        =  3.596 ghz (16 logical threads)
	x86PType         =  Standard OEM
	x86Flags         =  178bfbff 7ed8320b
	x86EFlags        =  2fd3fbff

x86 Features Detected:
	SSE2.. SSE3.. SSSE3.. SSE4.1.. SSE4.2.. AVX.. AVX2.. FMA
	SSE4a 
	Pcsx2 was compiled as 64-bits.

Installing POSIX SIGSEGV handler...
Reserving memory for recompilers...
[GameDB] 10626 games on record (loaded in 187ms)

(PCSX2:101018): Gdk-CRITICAL **: 18:50:31.281: gdk_window_process_updates: assertion 'GDK_IS_WINDOW (window)' failed
Bios Found: USA     v01.60(07/02/2002)  Console
Bios Found: Japan   v02.20(05/09/2006)  Console
SPU2: Sound output module reset
Request SDL audio driver: pipewire
48000 SampleRate: 
Opened SDL audio driver: pipewire
HLE Host: Set 'host:' root path to: /

Patches: No CRC found, using 00000000 instead.
isoFile open ok: /mnt/bigStorage/Gaming/Lutris/Emulation/PS2 Emulation/Monster Lab.iso
	Image type  = DVD
 * CDVD Disk Open: DVD, Single layer or unknown:
 * * Track 1: Data (Mode 1) (992480 sectors)
Could not get MAC address for adapter: wlan0
/home/neko-san/asp/pcsx2/trunk/src/pcsx2/common/src/Utilities/Linux/LnxHostSys.cpp(70) : assertion failed:
    Function:  void SysPageFaultSignalFilter(int, siginfo_t *, void *)
    Thread:    EE Core
    Condition: false
    Message:   Unhandled page fault @ 0x00000000

/home/neko-san/asp/pcsx2/trunk/src/pcsx2/common/src/Utilities/Linux/LnxHostSys.cpp(70) : assertion failed:
    Function:  void SysPageFaultSignalFilter(int, siginfo_t *, void *)
    Thread:    EE Core
    Condition: false
    Message:   Unhandled page fault @ 0x00000000
[00] 0x0x7fceabb67870                            
[01] 0x0x55dfa46f774c                            
[02] 0x0x55dfa49597d3                            
[03] 0x0x55dfa47fed53                            
[04] 0x0x55dfa495fe69                            
[05] 0x0x55dfa47fec47                            
[06] 0x0x55dfa495900c                            
[07] 0x0x55dfa47fe8c4                            
[08] 0x0x55dfa4aa5aef                            
[09] 0x0x55dfa4aa4fa7                            
[10] 0x0x7fceabb5d259                            
[11] clone                                       

Last edited by N3k0-san (2021-08-15 04:56:24)

Offline

#2 2021-08-15 02:03:16

loqs
Member
Registered: 2014-03-06
Posts: 19,013

Re: [RESOLVED] PCSX2 (PS2 Emulator) Crashes after Asp PKGBUILD Compilation

https://github.com/PCSX2/pcsx2/blob/v1. … ys.cpp#L70
https://github.com/PCSX2/pcsx2/blob/6f7 … ons.h#L101

The unhandled page fault generates a message containing the source files location and line number.  It does not indicate that is the cause of the issue.

If you build the unmodified PKGBUILD locally can you reproduce the issue?  If so if you build the package in a clean chroot can you still reproduce the issue?

Offline

#3 2021-08-15 04:09:20

N3k0-san
Member
From: Elsweyr
Registered: 2021-08-14
Posts: 67

Re: [RESOLVED] PCSX2 (PS2 Emulator) Crashes after Asp PKGBUILD Compilation

It also happens with the package straight from the repo as well, untouched, I found out afterwards; I just posted it as a bug report in the PCSX2 forums after checking this against the Asp build, a git compiled build, and the repo (/ untouched PKGBUILD since I didn't build it) build (basically every version of the emulator).

Also found out that the reason is apparently because, if the included DEV9 plugin is set to have "Ethernet" enabled by default (and it isn't connected to a valid/working target), then this is what causes the emulator to crash whenever it boots a game.

Last edited by N3k0-san (2021-08-15 04:55:39)

Offline

Board footer

Powered by FluxBB