Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault with Vulkan backend in raspberry pi OS bullseye 32 bit on raspberry pi 4/400 #19612

Open
3 of 5 tasks
fac3l3ss79 opened this issue Nov 7, 2024 · 5 comments

Comments

@fac3l3ss79
Copy link

Game or games this happens in

None

What area of the game / PPSSPP

When I execute version 1.18 I get a segmentation fault with Vulkan backend in raspberry pi OS bullseye 32 bit on raspberry pi4/400.
Vulkan backend works as expected with 1.17.1

What should happen

PPSSPP should work with Vulkan backend

Logs

No response

Platform

Raspberry Pi

Mobile device model or graphics card (GPU)

Raspberry pi 4/400

PPSSPP version affected

1.18.1

Last working version

1.17.1

Graphics backend (3D API)

Vulkan

Checklist

  • Test in the latest git build in case it's already fixed.
  • Search for other reports of the same issue.
  • Try resetting settings or older versions and include if the issue is related.
  • Try without any cheats and without loading any save states.
  • Include logs or screenshots of issue.
@fac3l3ss79 fac3l3ss79 changed the title Segmentation fault with Vulkan backend in raspberry pi OS bullseye 32 bit on raspberry pi4/400 Segmentation fault with Vulkan backend in raspberry pi OS bullseye 32 bit on raspberry pi 4/400 Nov 7, 2024
@hrydgard
Copy link
Owner

hrydgard commented Nov 7, 2024

can you run it in gdb and get a stack trace of the crash?

@fac3l3ss79
Copy link
Author

can you run it in gdb and get a stack trace of the crash?

Thread 1 "PPSSPPSDL" received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) backtrace
#0 0x00000000 in ?? ()
#1 0x00518d14 in VulkanContext::CreateInstance(VulkanContext::CreateInfo const&)
()
#2 0x00590cc4 in SDLVulkanGraphicsContext::Init(SDL_Window*&, int, int, int, int, int, std::__cxx11::basic_string<char, std::char_traits, std::allocator >*) ()
#3 0x00058174 in main ()
(gdb)

@hrydgard
Copy link
Owner

hrydgard commented Nov 7, 2024

hm that's very early, maybe extension loading or something... any chance you can do a debug build so we can get line numbers?

@fac3l3ss79
Copy link
Author

hm that's very early, maybe extension loading or something... any chance you can do a debug build so we can get line numbers?

Here you go:

(gdb) backtrace
#0 0x00000000 in ?? ()
#1 0xaa52e418 in ?? ()
from /lib/arm-linux-gnueabihf/libVkLayer_khronos_validation.so
#2 0x00883334 in VulkanContext::CreateInstance (this=0x1d339e0, info=...)
at /home/pi/ppsspp/Common/GPU/Vulkan/VulkanContext.cpp:286
#3 0x00977b84 in SDLVulkanGraphicsContext::Init (this=0x1d18140,
window=@0xbeffe3dc: 0x1d35b68, x=536805376, y=536805376, w=960, h=544,
mode=268447777, error_message=0xbeffe3c4)
at /home/pi/ppsspp/SDL/SDLVulkanGraphicsContext.cpp:73
#4 0x0096f928 in main (argc=1, argv=0xbefff2b4)
at /home/pi/ppsspp/SDL/SDLMain.cpp:1394
(gdb)

@hrydgard
Copy link
Owner

That means it crashes here:

vkGetPhysicalDeviceProperties2(physical_devices_[i], &props2);

vkGetPhysicalDeviceProperties2(physical_devices_[i], &props2);

, and since the callstack starts with 0000000, it likely called a null pointer.

However, we do guard that call with an if, on line 277, so this is really strange.

Actually, I see on the line before that the Khronos validation layer is active. That should mean that you made a debug build. Maybe the validation layers don't work correctly on 32-bit ARM for some reason? It's probably not a well tested platform.

Try to make a release build insetad. It will also run much faster.

./b.sh --release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants