Open dvessel opened 2 years ago
I just tried it on Shenmue and the textures load fine. It seems like the texture type (atlas?) on Soul Calibur is causing the crash. I just tried a fresh dump through SC and it crashes on character select.
It's been a while since you reported it but I can't reproduce it on my Intel macbook. When you get a chance, can you check if this is still happening?
It still crashes. This line is emitted right before the crash:
linux/posix_vmem.cpp:80 W[VMEM]: mem_region_set_exec: mprotect failed. errno 13
Running Monterey 12.4 (21F79)
And here’s the crash log:
Process: Flycast [77238]
Path: /Applications/Flycast.app/Contents/MacOS/Flycast
Identifier: com.flyinghead.Flycast
Version: 1.0 (1)
Code Type: ARM-64 (Native)
Parent Process: Exited process [77207]
User ID: 501
Date/Time: 2022-05-27 13:44:01.244 -04:00
OS Version: macOS 12.4 (21F79)
Report Version: 12
Anonymous UUID: 5DD1FCF7-5081-E6B6-D95F-02D45F723684
Sleep/Wake UUID: 6ABB21F4-0EBF-4496-8046-7B05CAED2D12
Time Awake Since Boot: 150000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x0000000102cf2ccc
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 0x5
Terminating Process: exc handler [77238]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.flyinghead.Flycast 0x0000000102cf2ccc 0x10277c000 + 5729484
1 com.flyinghead.Flycast 0x0000000102cf2ccc 0x10277c000 + 5729484
2 com.flyinghead.Flycast 0x000000010295b214 fault_handler(int, __siginfo*, void*) + 436
3 libsystem_platform.dylib 0x00000001b22874a4 _sigtramp + 56
4 libvulkan.dylib 0x000000010c6acbb0 MVKImage::applyImageMemoryBarrier(unsigned int, unsigned int, MVKPipelineBarrier&, MVKCommandEncoder*, MVKCommandUse) + 96
5 libvulkan.dylib 0x000000010c6acbb0 MVKImage::applyImageMemoryBarrier(unsigned int, unsigned int, MVKPipelineBarrier&, MVKCommandEncoder*, MVKCommandUse) + 96
6 libvulkan.dylib 0x000000010c725554 MVKCmdPipelineBarrier<1ul>::encode(MVKCommandEncoder*) + 724
7 libvulkan.dylib 0x000000010c6c3330 MVKCommandEncoder::encode(id<MTLCommandBuffer>, MVKCommandEncodingContext*) + 152
8 libvulkan.dylib 0x000000010c6c31c8 MVKCommandBuffer::submit(MVKQueueCommandBufferSubmission*, MVKCommandEncodingContext*) + 244
9 libvulkan.dylib 0x000000010c7032f8 MVKQueueFullCommandBufferSubmission<16ul>::submitCommandBuffers() + 84
10 libvulkan.dylib 0x000000010c7016c8 MVKQueueCommandBufferSubmission::execute() + 200
11 libvulkan.dylib 0x000000010c700518 MVKQueue::submit(unsigned int, VkSubmitInfo const*, VkFence_T*, MVKCommandUse) + 272
12 libvulkan.dylib 0x000000010c682b88 vkQueueSubmit + 264
13 com.flyinghead.Flycast 0x00000001029ed87c 0x10277c000 + 2562172
14 com.flyinghead.Flycast 0x00000001029e3370 0x10277c000 + 2519920
15 com.flyinghead.Flycast 0x00000001029f9050 0x10277c000 + 2609232
16 com.flyinghead.Flycast 0x0000000102a00c80 0x10277c000 + 2641024
17 com.flyinghead.Flycast 0x000000010290c5e0 rend_single_frame(bool const&) + 248
18 com.flyinghead.Flycast 0x000000010290ca48 rend_start_render(TA_context*) + 436
19 ??? 0x00000001184dcbc0 0x0 + 4702718912
Thread 1:
0 libsystem_pthread.dylib 0x00000001b226b078 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x00000001b226b078 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x00000001b226b078 start_wqthread + 0
Thread 4:
0 libsystem_kernel.dylib 0x00000001b22328b0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b2232d20 mach_msg + 76
2 com.apple.CoreFoundation 0x00000001b233d2b0 __CFRunLoopServiceMachPort + 372
3 com.apple.CoreFoundation 0x00000001b233b760 __CFRunLoopRun + 1180
4 com.apple.CoreFoundation 0x00000001b233ab24 CFRunLoopRunSpecific + 600
5 com.apple.AppKit 0x00000001b500e374 _NSEventThread + 196
6 libsystem_pthread.dylib 0x00000001b227026c _pthread_start + 148
7 libsystem_pthread.dylib 0x00000001b226b08c thread_start + 8
Thread 5:
0 libsystem_kernel.dylib 0x00000001b22328ec semaphore_wait_trap + 8
1 com.apple.audio.caulk 0x00000001bacdea2c caulk::mach::semaphore::wait_or_error() + 28
2 com.apple.audio.caulk 0x00000001bacc27ac caulk::concurrent::details::worker_thread::run() + 56
3 com.apple.audio.caulk 0x00000001bacc23cc void* caulk::thread_proxy<std::__1::tuple<caulk::thread::attributes, void (caulk::concurrent::details::worker_thread::*)(), std::__1::tuple<caulk::concurrent::details::worker_thread*> > >(void*) + 96
4 libsystem_pthread.dylib 0x00000001b227026c _pthread_start + 148
5 libsystem_pthread.dylib 0x00000001b226b08c thread_start + 8
Thread 6:
0 libsystem_kernel.dylib 0x00000001b22328b0 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x00000001b2232d20 mach_msg + 76
2 com.apple.audio.CoreAudio 0x00000001b3f81ef4 HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 104
3 com.apple.audio.CoreAudio 0x00000001b3e0f238 HALC_ProxyIOContext::IOWorkLoop() + 3396
4 com.apple.audio.CoreAudio 0x00000001b3e0defc invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) + 100
5 com.apple.audio.CoreAudio 0x00000001b3fda304 HALB_IOThread::Entry(void*) + 88
6 libsystem_pthread.dylib 0x00000001b227026c _pthread_start + 148
7 libsystem_pthread.dylib 0x00000001b226b08c thread_start + 8
Thread 7:
0 libsystem_kernel.dylib 0x00000001b22349ec __read_nocancel + 8
1 libsystem_c.dylib 0x00000001b2162714 __sread + 24
2 libsystem_c.dylib 0x00000001b213d618 _sread + 32
3 libsystem_c.dylib 0x00000001b213d5ac __srefill1 + 36
4 libsystem_c.dylib 0x00000001b213d76c __fread + 256
5 libsystem_c.dylib 0x00000001b2147c38 fread + 64
6 com.flyinghead.Flycast 0x0000000102995ed4 0x10277c000 + 2203348
7 com.flyinghead.Flycast 0x00000001029a17c0 0x10277c000 + 2250688
8 com.flyinghead.Flycast 0x00000001029960a4 0x10277c000 + 2203812
9 com.flyinghead.Flycast 0x000000010298c368 0x10277c000 + 2163560
10 com.flyinghead.Flycast 0x000000010299498c CustomTexture::LoadCustomTexture(unsigned int, int&, int&) + 364
11 com.flyinghead.Flycast 0x0000000102994138 CustomTexture::LoaderThread() + 168
12 com.flyinghead.Flycast 0x00000001029a7040 CustomTexture::loader_thread_func(void*) + 12
13 com.flyinghead.Flycast 0x0000000102a7c514 0x10277c000 + 3147028
14 libsystem_pthread.dylib 0x00000001b227026c _pthread_start + 148
15 libsystem_pthread.dylib 0x00000001b226b08c thread_start + 8
Thread 8:
0 libsystem_pthread.dylib 0x00000001b226b078 start_wqthread + 0
Thread 0 crashed with ARM Thread State (64-bit):
x0: 0x0000000000000000 x1: 0xfffffffa18061c37 x2: 0xfffffffa18061c37 x3: 0x0000000fffffc088
x4: 0xffffa0016d5f3ca8 x5: 0x0000000000000010 x6: 0x0000000000000069 x7: 0x000000016d67e398
x8: 0x04276cc20f1c00c3 x9: 0x04276cc20f1c00c3 x10: 0x0000000000000000 x11: 0x0000000000000002
x12: 0x0000000000018c46 x13: 0x00000000016e3600 x14: 0x0000000012e00000 x15: 0x000000000000000b
x16: 0x00000001b226ad4c x17: 0x000000020c2f8098 x18: 0x0000000000000000 x19: 0x000000016d67ecd8
x20: 0x000000016d67ec70 x21: 0x000000000000000b x22: 0x0000000000000000 x23: 0x0000000000000001
x24: 0x000000012b795f30 x25: 0x0000000000000000 x26: 0x0000000000000001 x27: 0x000000010cae0520
x28: 0x0000000000000000 fp: 0x000000016d67ebe0 lr: 0x0000000102cf2ccc
sp: 0x000000016d67ebc0 pc: 0x0000000102cf2ccc cpsr: 0x0000000060001000
far: 0x0000000000000009 esr: 0x00000000f2000001
Binary Images:
0x0 - 0x0 +??? (???) <00000000-0000-0000-0000-000000000000> ???
0x10277c000 - 0x102e0c000 +com.flyinghead.Flycast (1.0 - 1) <9840CED0-DB22-322D-B353-BF42E5466E79> /Applications/Flycast.app/Contents/MacOS/Flycast
0x10c66c000 - 0x10cad8000 +libvulkan.dylib (???) <91CE7BE4-A0C5-31FF-8A6D-C360B8554686> /Applications/Flycast.app/Contents/Frameworks/libvulkan.dylib
0x1b2130000 - 0x1b21b2000 libsystem_c.dylib (???) <86746B94-88E3-342D-B2B2-54303404E492> /usr/lib/system/libsystem_c.dylib
0x1b2231000 - 0x1b2269000 libsystem_kernel.dylib (???) <03F48DC5-CAA7-3678-AF61-1A3C7FA8B06E> /usr/lib/system/libsystem_kernel.dylib
0x1b2269000 - 0x1b2276000 libsystem_pthread.dylib (???) <42166A2C-89A9-3C38-A215-F028544CEA23> /usr/lib/system/libsystem_pthread.dylib
0x1b2283000 - 0x1b228b000 libsystem_platform.dylib (???) <D7ABA99F-BA00-36E9-945D-48ACF57FC568> /usr/lib/system/libsystem_platform.dylib
0x1b22b8000 - 0x1b27ff000 com.apple.CoreFoundation (6.9 - 1863) <994DB908-11A1-3E43-B7DF-25C09D51368A> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x1b3c4d000 - 0x1b4371000 com.apple.audio.CoreAudio (5.0 - 5.0) <4A0BB421-67C9-3849-A01E-A67D27FC1604> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio
0x1b4e60000 - 0x1b5d18000 com.apple.AppKit (6.9 - 2113.50.132) <A773DD23-B1C8-3C9B-9175-9A71D210ACE0> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
0x1bacc0000 - 0x1bace7000 com.apple.audio.caulk (1.0) <AF5B85D3-350B-3B8F-9D21-5D4B431DBCD9> /System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=857.1M resident=0K(0%) swapped_out_or_unallocated=857.1M(100%)
Writable regions: Total=1.8G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=1.8G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Accelerate framework 384K 3
Activity Tracing 256K 1
CG backing stores 5568K 4
CG image 96K 4
ColorSync 512K 25
CoreAnimation 144K 8
CoreGraphics 16K 1
CoreUI image data 1104K 7
Foundation 16K 1
Kernel Alloc Once 32K 1
MALLOC 511.4M 77
MALLOC guard page 192K 11
MALLOC_LARGE (reserved) 35.0M 1 reserved VM address space (unallocated)
MALLOC_MEDIUM (reserved) 848.0M 9 reserved VM address space (unallocated)
MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)
STACK GUARD 56.1M 9
Stack 12.2M 9
VM_ALLOCATE 3.6G 277
VM_ALLOCATE (reserved) 32K 1 reserved VM address space (unallocated)
__AUTH 1936K 189
__AUTH_CONST 11.5M 351
__CTF 756 1
__DATA 33.7M 342
__DATA_CONST 12.0M 356
__DATA_DIRTY 740K 121
__FONT_DATA 4K 1
__LINKEDIT 580.0M 7
__OBJC_CONST 1638K 160
__OBJC_RO 83.0M 1
__OBJC_RW 3152K 1
__TEXT 277.1M 372
__UNICODE 592K 1
dyld private memory 1024K 1
mapped file 730.5M 226
shared memory 864K 13
=========== ======= =======
TOTAL 7.1G 2593
TOTAL, minus reserved VM space 5.8G 2593
Platform / OS / Hardware: MacOS Monterey 12.01 / M1 Max MacBook Pro.
Github hash: net-rollback, 33fd8a.
Hardware: See the bottom of the crash log.
Description of the Issue
Loading custom textures with the Vulkan renderer will crash on the M1. Tested with Soul Calibur. Crashes on character select.
And thank you Flyinghead for adding Vulkan!
Debugging Steps Tested
Logs Gathered