pygame crashes when fill(color) method is used

后端 未结 1 819
無奈伤痛
無奈伤痛 2020-12-11 23:53

My pygame code crashes somehow when I use the fill() method.

First off I found there is an exact same question on this website by some one else who pro

相关标签:
1条回答
  • 2020-12-11 23:58

    I had the exact same problem on my Macbook Air. Pygame can create a screen, but whenever it tries to touch it, it will crash with a Segmentation error (this is the SIGSEGV you see in your error). This is because Pygame relies on the SDL framework, and the built-in one on Mac is ... not perfect.

    From the official SDL website, go to the download page and get the runtime library 1.2.15 for Mac. Open the .dmg you downloaded and you'll be given an SDL.framework file. Open /Library/Frameworks in Finder and move the framework file there. (If it asks to replace, I selected Merge, but I'm sure Replace should also work.)

    This fixed Pygame for me. I hope it works for you too!

    0 讨论(0)
提交回复
热议问题