Mac Catalina, python3 pygame crashes with illegal hardware instruction /Library/Frameworks/Python.framework/Versions/3.8/bin/python3
I am new to python on MAC, I normally use LINUX and am unfamiliar with MAC errors. When I attempt to execute I receive the illegal hardware instruction error.
The python pygame app only has basic instructions for display/window.
PYTHON CODE
import pygame
pygame.init()
Screen_Width = 800
Screen_Height = 800
black = (0,0,0)
white = (255,255,255)
clock = pygame.time.Clock()
tick_rate = 60
game_over = False
game_display = pygame.display.set_mode((Screen_Width, Screen_Height))
game_display.fill(black)
while not game_over:
for event in pygame.event.get():
if event.type == pygame.QUIT():
game_over = True
pygame.display.update()
clock.tick(tick_rate)
pygame.quit()
quit()
I have included some of the report that gets sent to apple#
Process: Python [2857]
Path: /Library/Frameworks/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
Identifier: org.python.python
Version: 3.8.2 (3.8.2)
Code Type: X86-64 (Native)
Parent Process: zsh [2852]
Responsible: Terminal [2850]
User ID: 501
Date/Time: 2020-03-25 00:03:54.921 -0500
OS Version: Mac OS X 10.15.3 (19D76)
Report Version: 12
Anonymous UUID: B47A50A7-3D36-0473-E7FA-A936F7EE3E68
Time Awake Since Boot: 32000 seconds
System Integrity Protection: disabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [2857]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libSDL-1.2.0.dylib 0x0000000106b2c3eb SDL_FillRect + 105
1 surface.cpython-38-darwin.so 0x000000010719f903 surf_fill + 659
2 org.python.python 0x0000000106517be5 method_vectorcall_VARARGS_KEYWORDS + 373
3 org.python.python 0x00000001065dce7c call_function + 444
4 org.python.python 0x00000001065d9c69 _PyEval_EvalFrameDefault + 25641
5 org.python.python 0x00000001065ddcc4 _PyEval_EvalCodeWithName + 2804
6 org.python.python 0x00000001065d3764 PyEval_EvalCode + 100
7 org.python.python 0x0000000106623370 PyRun_FileExFlags + 336
8 org.python.python 0x0000000106622a60 PyRun_SimpleFileExFlags + 864
9 org.python.python 0x000000010663fcdf Py_RunMain + 2159
10 org.python.python 0x000000010664001f pymain_main + 223
11 org.python.python 0x000000010664021b Py_BytesMain + 43
12 libdyld.dylib 0x00007fff666047fd start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fff66747bba __semwait_signal + 10
1 libsystem_c.dylib 0x00007fff666cb0fa nanosleep + 196
2 libSDL-1.2.0.dylib 0x0000000106b3b60c SDL_Delay + 83
3 libSDL-1.2.0.dylib 0x0000000106b3b684 RunTimer + 42
4 libSDL-1.2.0.dylib 0x0000000106b182d8 SDL_RunThread + 53
5 libSDL-1.2.0.dylib 0x0000000106b378be RunThread + 9
6 libsystem_pthread.dylib 0x00007fff6680de65 _pthread_start + 148
7 libsystem_pthread.dylib 0x00007fff6680983b thread_start + 15
Thread 2:
0 libsystem_pthread.dylib 0x00007fff66809818 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x00007fff66809818 start_wqthread + 0
Thread 4:: AMCP Logging Spool
0 libsystem_kernel.dylib 0x00007fff66745296 semaphore_wait_trap + 10
1 com.apple.audio.caulk 0x00007fff6275ba96 caulk::mach::semaphore::wait() + 16
2 com.apple.audio.caulk 0x00007fff6275b922 caulk::semaphore::timed_wait(double) + 106
3 com.apple.audio.caulk 0x00007fff6275b734 caulk::concurrent::details::worker_thread::run() + 30
4 com.apple.audio.caulk 0x00007fff6275b174 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*) + 45
5 libsystem_pthread.dylib 0x00007fff6680de65 _pthread_start + 148
6 libsystem_pthread.dylib 0x00007fff6680983b thread_start + 15
Thread 5:
0 libsystem_kernel.dylib 0x00007fff66745296 semaphore_wait_trap + 10
1 com.apple.audio.caulk 0x00007fff6275ba96 caulk::mach::semaphore::wait() + 16
2 com.apple.audio.caulk 0x00007fff6275b922 caulk::semaphore::timed_wait(double) + 106
3 com.apple.audio.caulk 0x00007fff6275b734 caulk::concurrent::details::worker_thread::run() + 30
4 com.apple.audio.caulk 0x00007fff6275b174 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*) + 45
5 libsystem_pthread.dylib 0x00007fff6680de65 _pthread_start + 148
6 libsystem_pthread.dylib 0x00007fff6680983b thread_start + 15
Thread 6:
0 libsystem_kernel.dylib 0x00007fff667452ae semaphore_timedwait_trap + 10
1 libdispatch.dylib 0x00007fff665aba1b _dispatch_sema4_timedwait + 76
2 libdispatch.dylib 0x00007fff665abe42 _dispatch_semaphore_wait_slow + 58
3 libdispatch.dylib 0x00007fff665b9642 _dispatch_worker_thread + 318
4 libsystem_pthread.dylib 0x00007fff6680de65 _pthread_start + 148
5 libsystem_pthread.dylib 0x00007fff6680983b thread_start + 15
Thread 7:: com.apple.audio.IOThread.client
0 libsystem_kernel.dylib 0x00007fff6674525a mach_msg_trap + 10
1 libsystem_kernel.dylib 0x00007fff667455d0 mach_msg + 60
2 com.apple.audio.CoreAudio 0x00007fff2e63cc0f invocation function for block in HALC_ProxyIOContext::HALC_ProxyIOContext(unsigned int, unsigned int) + 546
3 com.apple.audio.CoreAudio 0x00007fff2e77361c HALB_IOThread::Entry(void*) + 72
4 libsystem_pthread.dylib 0x00007fff6680de65 _pthread_start + 148
5 libsystem_pthread.dylib 0x00007fff6680983b thread_start + 15
Thread 8:
0 libsystem_pthread.dylib 0x00007fff66809818 start_wqthread + 0
Thread 9:
0 libsystem_pthread.dylib 0x00007fff66809818 start_wqthread + 0
Thread 10:
0 libsystem_pthread.dylib 0x00007fff66809818 start_wqthread + 0
Thread 11:
0 libsystem_pthread.dylib 0x00007fff66809818 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000106b464e8 rbx: 0x0000000000000320 rcx: 0x0000000000000000 rdx: 0x0000000000000000
rdi: 0x00007fc992862600 rsi: 0x00007ffee971c0e8 rbp: 0x00007ffee971c0a0 rsp: 0x00007ffee971c060
r8: 0x0000000000000000 r9: 0x0000000000000000 r10: 0x00007ffee971c070 r11: 0x7084694d073e25a9
r12: 0x00007ffee971c0e8 r13: 0x000000010677ce78 r14: 0x00007fc991db74b0 r15: 0x0000000000000000
rip: 0x0000000106b2c3eb rfl: 0x0000000000010206 cr2: 0x000000010719f670
Logical CPU: 0
Error Code: 0x00000000
Trap Number: 6
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: 18060
thread_create: 0
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=520.2M resident=0K(0%) swapped_out_or_unallocated=520.2M(100%)
Writable regions: Total=68.0M written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=68.0M(100%)
VIRTUAL REGION
REGION TYPE SIZE COUNT (non-coalesced)
=========== ======= =======
Activity Tracing 256K 1
CG image 4K 1
CoreServices 48K 1
Dispatch continuations 4096K 1
Foundation 4K 1
Kernel Alloc Once 8K 1
MALLOC 40.8M 68
MALLOC guard page 32K 6
MALLOC_LARGE (reserved) 512K 3 reserved VM address space (unallocated)
Memory Tag 249 120K 3
STACK GUARD 48K 12
Stack 21.6M 12
VM_ALLOCATE 180K 6
__DATA 22.5M 327
__DATA_CONST 188K 16
__FONT_DATA 4K 1
__LINKEDIT 357.4M 82
__OBJC_RO 32.0M 1
__OBJC_RW 1780K 2
__TEXT 162.8M 319
__UNICODE 564K 1
mapped file 42.0M 9
shared memory 632K 14
=========== ======= =======
TOTAL 687.4M 888
TOTAL, minus reserved VM space 686.9M 888
Model: MacBookPro5,1, BootROM MBP51.007E.B06, 2 processors, Intel Core 2 Duo, 2.4 GHz, 8 GB, SMC 1.33f8
Graphics: kHW_NVidiaGeForce9400MItem, NVIDIA GeForce 9400M, 256 MB
Graphics: kHW_NVidiaGeForce9600MGTItem, NVIDIA GeForce 9600M GT, spdisplays_pcie_device, 256 MB
Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1067 MHz, 0x0198, 0x393930353432382D3030352E4130324C4620
Memory Module: BANK 0/DIMM1, 4 GB, DDR3, 1067 MHz, 0x0198, 0x393930353432382D3030352E4130324C4620
AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x8D), Broadcom BCM43xx 1.0 (5.106.98.102.31)
Bluetooth: Version 7.0.3f5, 3 services, 27 devices, 1 incoming serial ports
Network Service: Wi-Fi, AirPort, en1
Serial ATA Device: PNY CS900 240GB SSD, 240.06 GB
Serial ATA Device: MATSHITADVD-R UJ-868
USB Device: USB Bus
USB Device: BRCM2046 Hub
USB Device: Bluetooth USB Host Controller
USB Device: USB Bus
USB Device: Apple Internal Keyboard / Trackpad
USB Device: IR Receiver
USB Device: USB 2.0 Bus
USB Device: USB 2.0 Bus
USB Device: Built-in iSight
Thunderbolt Bus:
User contributions licensed under CC BY-SA 3.0