Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pygame exe crashes
#1
Hello, could anyone tell me why my compiled app crashes upon start if I use these lines?

font = pygame.font.SysFont(None, 100)
text = font.render("COLLISION!!!!", True, BLACK)
screen.blit(text,(centerX - text.get_width() / 2, centerY - text.get_height() / 2))


I deleted these lines and now compiled exe runs fine...
Reply
#2
Your issue is with SysFont. Add a font to your package and use that instead.

You can also try
font = pygame.font.SysFont('Sans', 100)
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] pygame in Backgroundthread works in Linux, crashes in Win10 blbltheworm 3 2,661 Jul-13-2020, 03:56 AM
Last Post: SheeppOSU

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020