itisyang/playerdemo

Mac平台下的测试

GlennZhang opened this issue · 1 comments

我在window下用vs2013能够使用,在用Macbook编译时也能编译通过,但是使用时会报错。我也不太熟悉macOS,经过搜索后,原来macOS要求OpenGL之类的渲染要在主线程中,出错的地方也是VideoCtl中的LoopThread。
2018-12-09 11:19:19.939 playerdemo[28856:316639] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2d314ecd __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff593cc720 objc_exception_throw + 48
2 AppKit 0x00007fff2a7adbe0 NSAlwaysMatchRequestedMaskOf1DefaultValueFunction + 0
3 libSDL2-2.0.0.dylib 0x000000010dc6c231 Cocoa_PumpEvents + 211
4 libSDL2-2.0.0.dylib 0x000000010dbe8cfe SDL_PumpEvents_REAL + 23
5 playerdemo 0x000000010daf5419 _ZN8VideoCtl23refresh_loop_wait_eventEP10VideoStateP9SDL_Event + 41
6 playerdemo 0x000000010daf572c _ZN8VideoCtl10LoopThreadEP10VideoState + 76
7 playerdemo 0x000000010daf9366 ZNSt3__114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEM8VideoCtlFvP10VideoStateEPS7_S9_EEEEEPvSE + 742
8 libsystem_pthread.dylib 0x00007fff5a68e305 _pthread_body + 126
9 libsystem_pthread.dylib 0x00007fff5a69126f _pthread_start + 70
10 libsystem_pthread.dylib 0x00007fff5a68d415 thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Title::OnPlay
2023-06-08 11:18:55.012 playerdemo[7805:73873] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff817f67773 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff817cc7bc3 objc_exception_throw + 48
2 AppKit 0x00007ff81a9242d1 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4633
3 libSDL2-2.0.0.dylib 0x000000010a1ded4b Cocoa_PumpEventsUntilDate + 91
4 libSDL2-2.0.0.dylib 0x000000010a1def12 Cocoa_PumpEvents + 59
5 libSDL2-2.0.0.dylib 0x000000010a1402d4 SDL_PumpEventsInternal + 55
6 playerdemo 0x0000000109d821e3 _ZN8VideoCtl23refresh_loop_wait_eventEP10VideoStateP9SDL_Event + 211
7 playerdemo 0x0000000109d8240c _ZN8VideoCtl10LoopThreadEP10VideoState + 76
8 playerdemo 0x0000000109d85f04 ZNSt3__1L8__invokeIM8VideoCtlFvP10VideoStateEPS1_JS3_EvEEDTcldsdescT0_fp0_fp_spscT1_fp1_EEOT_OS7_DpOS8 + 116
9 playerdemo 0x0000000109d85e87 _ZNSt3__1L16__thread_executeINS_10unique_ptrINS_15__thread_structENS_14default_deleteIS2_EEEEM8VideoCtlFvP10VideoStateEJPS6_S8_EJLm2ELm3EEEEvRNS_5tupleIJT_T0_DpT1_EEENS_15__tuple_indicesIJXspT2_EEEE + 87
10 playerdemo 0x0000000109d85a72 ZNSt3__1L14__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEM8VideoCtlFvP10VideoStateEPS7_S9_EEEEEPvSE + 98
11 libsystem_pthread.dylib 0x00007ff817e254e1 _pthread_start + 125
12 libsystem_pthread.dylib 0x00007ff817e20f6b thread_start + 15
)
libc++abi: terminating with uncaught exception of type NSException

是的崩溃了