Open Asuka109 opened 3 years ago
you can try sudo ./3d-game-shaders-for-beginners
@MarvinFF I don't see how sudo would make any difference.
@Asuka109 would you be able to upload a coredump somewhere so we can try to see why it crashes?
On macOS you need to enable coredumps for the current terminal via the command below:
ulimit -c unlimited
After that, on the same terminal, run the demo and make it crash.
You'll be able to find the coredump file in /cores/core.
@0800LTT I think coredump will be very useful. But now I have changed to Intel's MacBook, which may not reproduce this bug.
M1 MacBook Pro, same problem:
Process: 3d-game-shaders-for-beginners [81261] Path: /Users/USER/*/3d-game-shaders-for-beginners Identifier: 3d-game-shaders-for-beginners Version: ??? Code Type: ARM-64 (Native) Parent Process: zsh [1213] User ID: 501
Date/Time: 2022-02-10 21:31:23.7689 +0800 OS Version: macOS 12.2 (21D49) Report Version: 12 Anonymous UUID: 0BDE9226-5D10-8DF4-61CF-25301B616F05
Sleep/Wake UUID: CAE96217-EE73-4F0E-942B-5AE274981A4C
Time Awake Since Boot: 210000 seconds Time Since Wake: 7214 seconds
System Integrity Protection: enabled
Crashed Thread: 4 Dispatch queue: com.Metal.CompletionQueueDispatch
Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information: abort() called
Thread 0:: Dispatch queue: com.Metal.CommandQueueDispatch
0 libsystem_kernel.dylib 0x1c2561954 mach_msg_trap + 8
1 libsystem_kernel.dylib 0x1c2561d00 mach_msg + 76
2 IOKit 0x1c5048da8 io_connect_method + 440
3 IOKit 0x1c5048b88 IOConnectCallMethod + 176
4 IOGPU 0x1dcb90518 IOGPUCommandQueueSubmitCommandBuffers + 144
5 IOGPU 0x1dcb831ec -[IOGPUMetalCommandQueue _submitCommandBuffers:count:] + 804
6 IOGPU 0x1dcb82e9c -[IOGPUMetalCommandQueue submitCommandBuffers:count:] + 88
7 Metal 0x1cae361f0 -[_MTLCommandQueue _submitAvailableCommandBuffers] + 672
8 Metal 0x1cae3e028 __40-[_MTLCommandQueue submitCommandBuffer:]_block_invoke + 36
9 libdispatch.dylib 0x1c23debac _dispatch_client_callout + 20
10 libdispatch.dylib 0x1c23ede00 _dispatch_lane_barrier_sync_invoke_and_complete + 56
11 Metal 0x1cae3dfdc -[_MTLCommandQueue submitCommandBuffer:] + 136
12 AppleMetalOpenGLRenderer 0x1035b8e14 GLDContextRec::flushContext(bool) + 512
13 AppKit 0x1c5c211f4 -[NSIOAccelSurface frontBuffer] + 1372
14 AppKit 0x1c5c20138 -[NSCGLSurface flushRect:] + 652
15 AppKit 0x1c5c1fdfc NSCGLSurfaceFlush + 156
16 GLEngine 0x223c25c70 glSwap_Exec + 244
17 OpenGL 0x223a123ac CGLFlushDrawable + 64
18 AppKit 0x1c550621c -[NSOpenGLContext flushBuffer] + 28
19 libpandagl.dylib 0x1034a6a98 CocoaGraphicsWindow::end_flip() + 340
20 libpanda.1.11.dylib 0x10469bacc GraphicsEngine::draw_bins(ov_set<PointerTo
Thread 1:: AMCP Logging Spool 0 libsystem_kernel.dylib 0x1c2561990 semaphore_wait_trap + 8 1 caulk 0x1caf708ac caulk::mach::semaphore::wait_or_error() + 28 2 caulk 0x1caf5365c caulk::concurrent::details::worker_thread::run() + 56 3 caulk 0x1caf5327c 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 0x1c259d240 _pthread_start + 148 5 libsystem_pthread.dylib 0x1c2598024 thread_start + 8
Thread 2:: com.apple.audio.IOThread.client 0 libsystem_kernel.dylib 0x1c2561954 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1c2561d00 mach_msg + 76 2 CoreAudio 0x1c42a3ef0 HALB_MachPort::SendSimpleMessageWithSimpleReply(unsigned int, unsigned int, int, int&, bool, unsigned int) + 104 3 CoreAudio 0x1c4132e04 HALC_ProxyIOContext::IOWorkLoop() + 3360 4 CoreAudio 0x1c4131ae0 invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) + 100 5 CoreAudio 0x1c42fd420 HALB_IOThread::Entry(void*) + 88 6 libsystem_pthread.dylib 0x1c259d240 _pthread_start + 148 7 libsystem_pthread.dylib 0x1c2598024 thread_start + 8
Thread 3: 0 libsystem_pthread.dylib 0x1c2598010 start_wqthread + 0
Thread 4 Crashed:: Dispatch queue: com.Metal.CompletionQueueDispatch 0 libsystem_kernel.dylib 0x1c25699b8 pthread_kill + 8 1 libsystem_pthread.dylib 0x1c259ceb0 pthread_kill + 288 2 libsystem_c.dylib 0x1c24da314 abort + 164 3 AppleMetalOpenGLRenderer 0x1035b99f4 invocation function for block in GLDContextRec::flushContextInternal() + 316 4 Metal 0x1cae36a24 MTLDispatchListApply + 52 5 Metal 0x1cae36fa0 -[_MTLCommandBuffer didCompleteWithStartTime:endTime:error:] + 600 6 IOGPU 0x1dcb7fd34 -[IOGPUMetalCommandBuffer didCompleteWithStartTime:endTime:error:] + 220 7 Metal 0x1cae36bd8 -[_MTLCommandQueue commandBufferDidComplete:startTime:completionTime:error:] + 136 8 IOGPU 0x1dcb834a8 54-[IOGPUMetalCommandQueue _submitCommandBuffers:count:]_block_invoke.22 + 168 9 IOGPU 0x1dcb87bf0 __IOGPUNotificationQueueSetDispatchQueue_block_invoke + 156 10 libdispatch.dylib 0x1c23dec6c _dispatch_client_callout4 + 20 11 libdispatch.dylib 0x1c23faf68 _dispatch_mach_msg_invoke + 476 12 libdispatch.dylib 0x1c23e6208 _dispatch_lane_serial_drain + 376 13 libdispatch.dylib 0x1c23fbcb8 _dispatch_mach_invoke + 456 14 libdispatch.dylib 0x1c23e6208 _dispatch_lane_serial_drain + 376 15 libdispatch.dylib 0x1c23e6ed8 _dispatch_lane_invoke + 444 16 libdispatch.dylib 0x1c23e6208 _dispatch_lane_serial_drain + 376 17 libdispatch.dylib 0x1c23e6ea4 _dispatch_lane_invoke + 392 18 libdispatch.dylib 0x1c23f1708 _dispatch_workloop_worker_thread + 656 19 libsystem_pthread.dylib 0x1c2599304 _pthread_wqthread + 288 20 libsystem_pthread.dylib 0x1c2598018 start_wqthread + 8
Thread 5:: com.apple.NSEventThread 0 libsystem_kernel.dylib 0x1c2561954 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x1c2561d00 mach_msg + 76 2 CoreFoundation 0x1c2668ed8 CFRunLoopServiceMachPort + 372 3 CoreFoundation 0x1c2667390 CFRunLoopRun + 1212 4 CoreFoundation 0x1c2666734 CFRunLoopRunSpecific + 600 5 AppKit 0x1c5329fb0 _NSEventThread + 196 6 libsystem_pthread.dylib 0x1c259d240 _pthread_start + 148 7 libsystem_pthread.dylib 0x1c2598024 thread_start + 8
Thread 6: 0 libsystem_pthread.dylib 0x1c2598010 start_wqthread + 0
Thread 7: 0 libsystem_pthread.dylib 0x1c2598010 start_wqthread + 0
Thread 4 crashed with ARM Thread State (64-bit): x0: 0x0000000000000000 x1: 0x0000000000000000 x2: 0x0000000000000000 x3: 0x0000000000000000 x4: 0x000000016d6370e0 x5: 0x0000000000000000 x6: 0x0000000000000000 x7: 0x000000000000003e x8: 0x6a2df7aeabe9577b x9: 0x6a2df7afc68a277b x10: 0x0100000100000000 x11: 0x0000000000191754 x12: 0x000000100e5890d1 x13: 0x0000000000000000 x14: 0x0000020000011000 x15: 0x0200000110000660 x16: 0x0000000000000148 x17: 0x000000021cdd3530 x18: 0x0000000000000000 x19: 0x0000000000000006 x20: 0x000000016d637000 x21: 0x0000000000013703 x22: 0x00000001300ab8f8 x23: 0x0000000122853000 x24: 0x000000020cb3312d x25: 0x0000000122853000 x26: 0x000000016d6366a0 x27: 0x0000600000bada28 x28: 0x00006000024d0480 fp: 0x000000016d636380 lr: 0x00000001c259ceb0 sp: 0x000000016d636360 pc: 0x00000001c25699b8 cpsr: 0x40001000 far: 0x0000600003d40b00 esr: 0x56000080 Address size fault
Binary Images:
0x1c2560000 - 0x1c2595fff libsystem_kernel.dylib () <384945e6-dd71-37e5-9a3d-84fff14a1e60> /usr/lib/system/libsystem_kernel.dylib
0x1c5045000 - 0x1c511afff com.apple.framework.IOKit (2.0.2) <97e3d808-8bcb-3ac4-85ab-60faa4cae04f> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit
0x1dcb7d000 - 0x1dcba9fff com.apple.IOGPU (35.11)
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=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%) Writable regions: Total=2.3G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=2.3G(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced) =========== ======= ======= Accelerate framework 256K 2 Activity Tracing 256K 1 CG backing stores 2176K 4 CG image 96K 3 ColorSync 576K 25 CoreAnimation 352K 11 CoreGraphics 32K 2 CoreUI image data 1120K 8 Foundation 16K 1 IOAccelerator 867.9M 297 IOKit 80K 5 Kernel Alloc Once 32K 1 MALLOC 593.6M 81 MALLOC guard page 192K 8 MALLOC_MEDIUM (reserved) 512.0M 5 reserved VM address space (unallocated) MALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated) OpenGL GLSL 256K 3 STACK GUARD 56.1M 8 Stack 11.7M 8 VM_ALLOCATE 3520K 208 AUTH 2456K 286 AUTH_CONST 18.5M 471 DATA 16.0M 475 DATA_CONST 18.5M 491 DATA_DIRTY 1686K 195 __FONT_DATA 4K 1 GLSLBUILTINS 5176K 1 LINKEDIT 619.7M 19 OBJC_CONST 3254K 248 OBJC_RO 82.1M 1 __OBJC_RW 3104K 1 TEXT 489.8M 509 __UNICODE 588K 1 dyld private memory 1216K 3 mapped file 82.3M 23 shared memory 10.6M 96 =========== ======= ======= TOTAL 3.7G 3503 TOTAL, minus reserved VM space 2.8G 3503
{"app_name":"3d-game-shaders-for-beginners","timestamp":"2022-02-10 21:31:23.00 +0800","app_version":"","slice_uuid":"1015ec64-d184-3969-b641-097f2e336210","build_version":"","platform":1,"share_with_app_devs":1,"is_first_party":1,"bug_type":"309","os_version":"macOS 12.2 (21D49)","incident_id":"3AB9BB4D-3A29-4BC1-A5E5-961C597DCFFF","name":"3d-game-shaders-for-beginners"}
{
"uptime" : 210000,
"procLaunch" : "2022-02-10 21:31:13.3151 +0800",
"procRole" : "Foreground",
"version" : 2,
"userID" : 501,
"deployVersion" : 210,
"modelCode" : "MacBookPro17,1",
"procStartAbsTime" : 5181585969670,
"coalitionID" : 872,
"osVersion" : {
"train" : "macOS 12.2",
"build" : "21D49",
"releaseType" : "User"
},
"captureTime" : "2022-02-10 21:31:23.7689 +0800",
"incident" : "3AB9BB4D-3A29-4BC1-A5E5-961C597DCFFF",
"bug_type" : "309",
"pid" : 81261,
"procExitAbsTime" : 5181836311259,
"translated" : false,
"cpuType" : "ARM-64",
"procName" : "3d-game-shaders-for-beginners",
"procPath" : "\/Users\/USER\/\/3d-game-shaders-for-beginners",
"parentProc" : "zsh",
"parentPid" : 1213,
"coalitionName" : "io.alacritty",
"crashReporterKey" : "0BDE9226-5D10-8DF4-61CF-25301B616F05",
"responsiblePid" : 860,
"wakeTime" : 7214,
"sleepWakeUUID" : "CAE96217-EE73-4F0E-942B-5AE274981A4C",
"sip" : "enabled",
"isCorpse" : 1,
"exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGABRT"},
"asi" : {"libsystem_c.dylib":["abort() called"]},
"extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
"faultingThread" : 4,
"threads" : [{"id":1644320,"queue":"com.Metal.CommandQueueDispatch","frames":[{"imageOffset":6484,"symbol":"mach_msg_trap","symbolLocation":8,"imageIndex":0},{"imageOffset":7424,"symbol":"mach_msg","symbolLocation":76,"imageIndex":0},{"imageOffset":15784,"symbol":"io_connect_method","symbolLocation":440,"imageIndex":1},{"imageOffset":15240,"symbol":"IOConnectCallMethod","symbolLocation":176,"imageIndex":1},{"imageOffset":79128,"symbol":"IOGPUCommandQueueSubmitCommandBuffers","symbolLocation":144,"imageIndex":2},{"imageOffset":25068,"symbol":"-[IOGPUMetalCommandQueue _submitCommandBuffers:count:]","symbolLocation":804,"imageIndex":2},{"imageOffset":24220,"symbol":"-[IOGPUMetalCommandQueue submitCommandBuffers:count:]","symbolLocation":88,"imageIndex":2},{"imageOffset":127472,"symbol":"-[_MTLCommandQueue _submitAvailableCommandBuffers]","symbolLocation":672,"imageIndex":3},{"imageOffset":159784,"symbol":"__40-[_MTLCommandQueue submitCommandBuffer:]_block_invoke","symbolLocation":36,"imageIndex":3},{"imageOffset":15276,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":4},{"imageOffset":77312,"symbol":"_dispatch_lane_barrier_sync_invoke_and_complete","symbolLocation":56,"imageIndex":4},{"imageOffset":159708,"symbol":"-[_MTLCommandQueue submitCommandBuffer:]","symbolLocation":136,"imageIndex":3},{"imageOffset":347668,"symbol":"GLDContextRec::flushContext(bool)","symbolLocation":512,"imageIndex":5},{"imageOffset":11166196,"symbol":"-[NSIOAccelSurface frontBuffer]","symbolLocation":1372,"imageIndex":6},{"imageOffset":11161912,"symbol":"-[NSCGLSurface flushRect:]","symbolLocation":652,"imageIndex":6},{"imageOffset":11161084,"symbol":"NSCGLSurfaceFlush","symbolLocation":156,"imageIndex":6},{"imageOffset":105584,"symbol":"glSwap_Exec","symbolLocation":244,"imageIndex":7},{"imageOffset":54188,"symbol":"CGLFlushDrawable","symbolLocation":64,"imageIndex":8},{"imageOffset":3715612,"symbol":"-[NSOpenGLContext flushBuffer]","symbolLocation":28,"imageIndex":6},{"imageOffset":420504,"symbol":"CocoaGraphicsWindow::end_flip()","symbolLocation":340,"imageIndex":9},{"imageOffset":2865868,"symbol":"GraphicsEngine::draw_bins(ov_set<PointerTo
},
"deploymentId" : 240000008
},
{
"rolloutId" : "607844aa04477260f58a8077",
"factorPackIds" : {
"SIRI_MORPHUN_ASSETS" : "6103050cbfe6dc472e1c982a"
},
"deploymentId" : 240000066
},
{
"rolloutId" : "602ad4dac86151000cf27e46",
"factorPackIds" : {
"SIRI_DICTATION_ASSETS" : "61fb0e87c773c43cde3bb80e"
},
"deploymentId" : 240000305
},
{
"rolloutId" : "5fc94383418129005b4e9ae0",
"factorPackIds" : {
},
"deploymentId" : 240000231
},
{
"rolloutId" : "601d9415f79519000ccd4b69",
"factorPackIds" : {
"SIRI_TEXT_TO_SPEECH" : "620161cb295c182621eced20"
},
"deploymentId" : 240000389
},
{
"rolloutId" : "5ffde50ce2aacd000d47a95f",
"factorPackIds" : {
},
"deploymentId" : 240000106
}
], "experiments" : [
] } }
Model: MacBookPro17,1, BootROM 7429.81.3, proc 8:4:4 processors, 16 GB, SMC Graphics: Apple M1, Apple M1, Built-In Display: Color LCD, 2560 x 1600 Retina, Main, MirrorOff, Online Memory Module: LPDDR4 AirPort: Wi-Fi, wl0: Oct 26 2021 16:10:41 version 18.20.310.15.7.8.120 FWID 01-5d6c3867 Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: MacBook Pro, Apple Inc. Thunderbolt Bus: MacBook Pro, Apple Inc.
goodproject
I refer to the article to compile demo.
Here I use the Panda3D SDK compiled from the source code.
It looks good when I run it, and I can switch between different framebuffer textures.
But once I use the mouse to move the view, the program crashes in a few frames.