Changing window size crashes the game in battle.

I used the Yanfly Engine Core to change the window size of my game to 416 x 416. Because of this, entering a battle causes this error:
1701806540989.png


How would I go about fixing this?
That error has absolutely nothing to do with the screen size itself, it is telling you that it is missing a data object.
For more details like what exactly is missing you'll need a backtracer.
I suggest you follow the link "how to use a script" in my signature to the bughunting section and follow the instructions there on how to install the backtracer from himeworks.
Since it belongs to Window_Base, I just checked it and found this:

Ruby:
  def draw_actor_icons(actor, x, y, width = 96)
    icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
    icons.each_with_index {|n, i| draw_icon(n, x + 24 * i, y) }
  end

Right now in your game project, both sets of icons are equal to nothing aka nil in Ruby.
Since it belongs to Window_Base, I just checked it and found this:

Ruby:
  def draw_actor_icons(actor, x, y, width = 96)
    icons = (actor.state_icons + actor.buff_icons)[0, width / 24]
    icons.each_with_index {|n, i| draw_icon(n, x + 24 * i, y) }
  end

Right now in your game project, both sets of icons are equal to nothing aka nil in Ruby.
Huh, that's strange. This is a blank project with the only change being the window size.
To confirm that, could you please use the default window size instead?
I wanna check whether or not that's the root cause here.
To confirm that, could you please use the default window size instead?
I wanna check whether or not that's the root cause here.
Sure enough, no error this time around.
It might have something to do with the screen width. The Window_BattleStatus might need to be a minimum width. I changed the gauge_area_with to 120 and it loaded the battle but the mp was cut off.
I did some testing. the minimum width the default scripts want is 494
It might have something to do with the screen width. The Window_BattleStatus might need to be a minimum width. I changed the gauge_area_with to 120 and it loaded the battle but the mp was cut off.
I did some testing. the minimum width the default scripts want is 494
Thanks so much! That solved the crash. I can take it from here, thanks again.

Original thread: https://forums.rpgmakerweb.com/threads/changing-window-size-crashes-the-game-in-battle.163609/