VXAce Player experiencing random crashes?

Hey,

I've had one particular player in my game experiencing random crashes that really don't seem to make sense. These have included a number of silent crashes, crashes caused by line 106 of the cache "cannot create bitmap" in a place where no one else has had a crash, and at least one spot where $game_map seemed to be returning a nil value. I've already recommended a restart to clear corrupted RGSS player and installing the RTP (I always compress with RTP included, but figured it couldn't hurt since the cache-related crash happened around an RTP asset) as well as validating their Steam install. None of these issues can be replicated by me or my playtesters, but I was wondering if anyone had any idea what could cause issues like this? I assume it's on the player's end, but I'd like to help them if possible. It's very vexing.

I've attached two screenshots of crash logs they provided.
Relevant lines of code marked with ><
Ruby:
#--------------------------------------------------------------------------
  # * Create/Get Normal Bitmap
  #--------------------------------------------------------------------------
  def self.normal_bitmap(path)
 >    @cache[path] = Bitmap.new(path) unless include?(path)<
    @cache[path]
  end


Ruby:
#--------------------------------------------------------------------------
  # * Get Reflection Offset Value
  #--------------------------------------------------------------------------
  def reflection_offset(x = @x, y = @y + 1)
    # Return Character Reflection Offset with Character Offset  
    @reflection_y_offset = 0 unless @reflection_y_offset
>    $game_map.terrain_reflection_offset($game_map.terrain_tag(x, y)) + @reflection_y_offset<
  end

We note in the second that the error implies it tried to get terrain_tag(x, y) for nilclass, meaning $game_map was a nil.
Where in the code is reflection_offset being called?
Where in the code is reflection_offset being called?
Based on where they were having a crash, I assume it was from the reflection on a map in an event. The code there is in Game_Character, and there's only one event that reflects on that map, so it was either that event or the player reflecting that called it.

Either way, I'm pretty sure it shouldn't matter that much? $game_map should (as far as I know) never be nil once the save is initialized, and no one else has ever reported this crash when it's on the first major map of the game. While the reflections can be very fickle, I do have a decent sized player base (over 1500 unique steam players) and this guy is the only one to have had this issue.
in itself, cache errors like that are often caused by the image not existing in RAM.

Unfortunately there are several ways how that could happen, for example if a picture is deleted before it is referenced again (unlikely since it was just loaded), or because the game tried to load a file that does not exist or has been damaged (I hope he tried reinstalling the game?) or similar causes.

However it might also happen if the memory is running low, so please ask for the computer specifications of that player
in itself, cache errors like that are often caused by the image not existing in RAM.

Unfortunately there are several ways how that could happen, for example if a picture is deleted before it is referenced again (unlikely since it was just loaded), or because the game tried to load a file that does not exist or has been damaged (I hope he tried reinstalling the game?) or similar causes.

However it might also happen if the memory is running low, so please ask for the computer specifications of that player

Looks like he has quite strong specs. We were vaguely speculating that being too new might cause weirdness with how old VXA is, but no idea if that's a thing.

He did try validating the steam install several times. I suggested he try my non-steam version, but not 100% sure if he has done so yet.
He did try validating the steam install several times
ask if he cleared the steam download cache before veryfying.

I don't know if steam has solved the problem, but a few years ago there was a possible bug wioth the download cache. If that had been damaged all veryfy's automatically failed while pretending the local files are correct. and you needed to clear the cache (a function in the support section of steam) to reenable verifying correctly
Let's assume you have not modified the default Scene_Map script section or that you only added stuff to a patch pasted in a different script section. If we go to Scene_Map line 65 we can find this:

Ruby:
  def update
    super
    $game_map.update(true)
    $game_player.update
    $game_timer.update
    @spriteset.update
    update_scene if scene_change_ok?
  end

$game_map must exist at this point because a couple of lines earlier it called its own update method and even passed an argument without throwing any error then. Line 65 includes a call to Spriteset_Map's update method. The weird thing is that the next line the second screenshot lists is some Fade Room script section that sounds like a custom script. This happens just before the engine calls the Reflections script.

Could it be that the $game_map variable is being set to nil at some point? Perhaps. I can't tell you for sure that you'll find a call like this in your call $game_map = nil, and yet, it'd be a good idea to check that there's no call to $game_map = Marshal.load(file) or something else there. Why? Because there's a slim chance that it has tried to load something that did not exist in the saved file.

Where can we find that Reflections script you're using?
ask if he cleared the steam download cache before veryfying.

I don't know if steam has solved the problem, but a few years ago there was a possible bug wioth the download cache. If that had been damaged all veryfy's automatically failed while pretending the local files are correct. and you needed to clear the cache (a function in the support section of steam) to reenable verifying correctly
Sounds like this was the issue, thanks a lot for the insight!

Original thread: https://forums.rpgmakerweb.com/threads/player-experiencing-random-crashes.179755/