Closed gilcel closed 1 month ago
Could you launch it with gdb or any debugger and show a stack trace?
Ok launched it with gdb ./shadPS4
, then launched the Graphics demo:
(gdb)frame
`[Debug]
Thread 1 "shadps4" received signal SIGTRAP, Trace/breakpoint trap. 0x00000000004f0656 in assert_fail_impl() () Missing separate debuginfos, use: zypper install Mesa-dri-debuginfo-24.1.2-1699.386.pm.1.x86_64 Mesa-libEGL1-debuginfo-24.1.2-1699.386.pm.1.x86_64 Mesa-libglapi0-debuginfo-24.1.2-1699.386.pm.1.x86_64 Mesa-vulkan-device-select-debuginfo-24.1.2-1699.386.pm.1.x86_64......` etc....
Shall I install of of these packages ? The list is quite big :-)
Not needed. Press bt
the moment it crashes to see the stack trace. If it doesn't have any symbols recompile with debug mode (you can do by running cmake --build . --config Debug
in build folder)
(gdb) bt
Core::MemoryProt, Core::MemoryMapFlags, Core::VMAType, std::basic_string_view<char, std::char_traits
Try launching emulator standalone without the gui (so CLI)
Ok need to recompile it then...will do in debug mode
FYI: When generating cmake build files, it complains with (but build-files are properly written...): -- Could NOT find magic_enum (missing: magic_enum_DIR) -- Could NOT find SDL3 (missing: SDL3_DIR) -- Could NOT find toml11 (missing: toml11_DIR) CMake Warning at CMakeLists.txt:90 (find_package): Could not find a configuration file for package "VulkanHeaders" that is compatible with requested version "1.3.288".
The following configuration files were considered but not accepted:
/usr/share/cmake/VulkanHeaders/VulkanHeadersConfig.cmake, version: 1.3.283
-- Could NOT find VulkanMemoryAllocator (missing: VulkanMemoryAllocator_DIR) -- Could NOT find xbyak (missing: xbyak_DIR) -- Could NOT find xxHash: (Required is at least version "0.8.2") (found ) -- Could NOT find zlib-ng: (Required is at least version "2.1.6") (found ) -- Could NOT find Zydis (missing: Zydis_DIR)
If it didn't error out it should be fine. Also consider pinging me on discord as github issues isn't the best medium for support
Is this resolved?
Unfortunately no...compiled with latest commit 189033a with cmake . --config Debug
and now shadPS4 doesn't even display an error message, only "Segmentation fault" with a core dump (compiled and tested with and without GUI)....
With gdb :
(gdb) run $HOME/shadPS4/build/shadps4 $HOME/Downloads/PS4/HelloWorld/eboot.bin
`Starting program: $HOME/shadPS4/build/shadps4 $HOME/shadPS4/build/shadps4 $HOME/Downloads/PS4/HelloWorld/eboot.bin`
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff0e006c0 (LWP 26095)]
[New Thread 0x7fffefe006c0 (LWP 26096)]
[New Thread 0x7fffef4006c0 (LWP 26097)]
Thread 1 "shadps4" received signal SIGSEGV, Segmentation fault.
0x0000000000522ed4 in Core::AddressSpace::Impl::Impl() ()
(gdb) bt
#0 0x0000000000522ed4 in Core::AddressSpace::Impl::Impl() ()
#1 0x000000000052253e in Core::AddressSpace::AddressSpace() ()
#2 0x000000000068616b in Core::MemoryManager::MemoryManager() ()
#3 0x000000000075f905 in Core::Emulator::Emulator() ()
#4 0x000000000046729a in main ()
This also happens on my RTX 3070 on arch linux
Followup: The Linux shadPS4-v0.20 AppImage works on OpenSUSE Tumbleweed. It runs the OpenOrbis Graphics Sample etc.
Compiled latest v.0.2.1-WIP 83bcced and tried to start the Graphics demo: instead of the previous memory.cpp:operator()
error it crashes again but with the following error:
(gdb) bt
#0 0x00000000005704a4 in Core::AddressSpace::Impl::Impl (this=0x2675c80) at $HOME/shadPS4-git/src/core/address_space.cpp:319
#1 0x0000000000571570 in std::make_unique<Core::AddressSpace::Impl> () at /usr/include/c++/13/bits/unique_ptr.h:1070
#2 0x000000000056fe08 in Core::AddressSpace::AddressSpace (this=0x275bd90) at $HOME/shadPS4-git/src/core/address_space.cpp:442
#3 0x0000000000756e18 in Core::MemoryManager::MemoryManager (this=0x275bd90) at $HOME/shadPS4-git/src/core/memory.cpp:14
#4 0x00000000004b6d2a in std::make_unique<Core::MemoryManager> () at /usr/include/c++/13/bits/unique_ptr.h:1070
#5 0x00000000004b52c6 in Common::Singleton<Core::MemoryManager>::Instance () at $HOME/shadPS4-git/src/common/singleton.h:15
#6 0x00000000004af783 in Core::Emulator::Emulator (this=0x7fffffffc9e0) at $HOME/shadPS4-git/src/emulator.cpp:67
#7 0x0000000000456c81 in MainWindow::StartGame (this=0x2475b30) at $HOME/shadPS4-git/src/qt_gui/main_window.cpp:424
#8 0x0000000000477ceb in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MainWindow::*)()>::call(void (MainWindow::*)(), MainWindow*, void**)
(f=(void (MainWindow::*)(MainWindow * const)) 0x4568f4 <MainWindow::StartGame()>, o=0x2475b30, arg=0x7fffffffcd40) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:145
#9 0x0000000000474fb6 in QtPrivate::FunctionPointer<void (MainWindow::*)()>::call<QtPrivate::List<>, void>(void (MainWindow::*)(), MainWindow*, void**)
(f=(void (MainWindow::*)(MainWindow * const)) 0x4568f4 <MainWindow::StartGame()>, o=0x2475b30, arg=0x7fffffffcd40) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:182
#10 0x000000000047196b in QtPrivate::QCallableObject<void (MainWindow::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)
(which=1, this_=0x27381a0, r=0x2475b30, a=0x7fffffffcd40, ret=0x0) at /usr/include/qt6/QtCore/qobjectdefs_impl.h:553
#11 0x00007ffff53e7f90 in ??? () at /lib64/libQt6Core.so.6
...
(gdb) frame
#0 0x00000000005704a4 in Core::AddressSpace::Impl::Impl (this=0x2675c80) at $HOME/shadPS4-git/src/core/address_space.cpp:319
319 reinterpret_cast<u8*>(mmap(reinterpret_cast<void*>(SYSTEM_MANAGED_MIN), virtual_size,
(gdb) exit
Increasing max_map_count
didn't change anything=> vm.max_map_count=524288
in /etc/sysctl.conf
This issue can be closed, since launching the demos works now! But I didn't investigate which commit fixed it (I was away for one week and recompiled with latest code 1b12138 today and launched the demos: it just works :-) Thanks for all your effort.
Hi,
Compiled latest shadPS4 commit 20e83b4 on Linux (OpenSUSE Tumbleweed). User interface works, but trying to launch "OpenOrbis HelloWorld Sample" or "OpenOrbis Graphics Sample" it crashes with:
[Debug] <Critical> memory.cpp:operator():305: Assertion Failed! Adding a mapping to already mapped region
It seems to be a problem with AMD Ryzen 5 5600G (APU) (also same error with AMD Ryzen 3400G) and Mesa 24.1.2 (RADV) driver / Linux Kernel 6.9.7, or Vulkan Version is 1.3.278 (but the one in externals is of version 1.3.288). with clang v18.1.6 / gcc v13.3.0 installed.
shad_log.txt