lassefolkersen / highfrontier

The goal of High Frontier is a civilization-like game, which uses more realistic modelling of economy, climate, research and migration. Uniquely this game starts today - the initiation date of a game is todays date and the existing world is the world as we know it today, complete with cities and countries and people. The aim from there - that is whatever the player thinks the aim is for the world. Developing of the underdeveloping world, action against climate changes, expansion into the rest of the solar system, or just racking in a lot of money.
13 stars 3 forks source link

Crash when global warming causes waters to rise #16

Closed lassefolkersen closed 4 months ago

lassefolkersen commented 4 months ago

To reproduce:

Traceback (most recent call last):
  File "/Users/lassefolkersen/Documents/highfrontier/intro.py", line 396, in <module>
    introGui = IntroGui()
  File "/Users/lassefolkersen/Documents/highfrontier/intro.py", line 70, in __init__
    self.receive_click(event)
  File "/Users/lassefolkersen/Documents/highfrontier/intro.py", line 86, in receive_click
    button.activate(event)
  File "/Users/lassefolkersen/Documents/highfrontier/gui_components.py", line 499, in activate
    return_value = self.function(self.label, self.function_parameter)
  File "/Users/lassefolkersen/Documents/highfrontier/intro.py", line 30, in start_new_game
    self.main.start_loop(companyName = cn,
  File "/Users/lassefolkersen/Documents/highfrontier/main.py", line 124, in start_loop
    gui_instance.zoom()
  File "/Users/lassefolkersen/Documents/highfrontier/gui.py", line 256, in zoom
    surface = self.draw_display(sol.display_mode)
  File "/Users/lassefolkersen/Documents/highfrontier/gui.py", line 189, in draw_display
    surface = sol.current_planet.draw_entire_planet(
  File "/Users/lassefolkersen/Documents/highfrontier/planet.py", line 1171, in draw_entire_planet
    rgba_action_surface = self.draw_image(eastern_inclination, northern_inclination, projection_scaling, fast_rendering = True, image = rgba_action)
  File "/Users/lassefolkersen/Documents/highfrontier/planet.py", line 1136, in draw_image
    surface = pygame.image.frombuffer(image_bmp , (window_size[0],window_size[1]), mode)
ValueError: Buffer length does not equal format and resolution size
lassefolkersen commented 4 months ago

Ok, it seems to work when not zoomed into the most-zoomed in mode "flat world" - even with rising seas Screenshot 2024-05-08 at 09 28 12

It only crashes when zoomed all the way in, I guess that's a clue