[Ace] Disposed Sprite error

okayy sooo, this my first thread so correct me if i did anything wrong lol but uhh

it's just as the title says, whenever i exit the character menu to continue playing,

clicking [CANCEL] - - -
ddcugyd-5386cdef-a748-493e-8b34-e84c53ebdc42.png


this error message will show
|
|
V

problem.PNG

I will appreciate any help i can get about this error C: also i am a complete noob at scripting soo yeaH

the other scripts i have are

  • Yanfly Message Ace - Menu Cursor
  • TSDA Advanced Message System
  • Super Simple Animated Title Screen
  • Cursor Blink Remover
  • ATS: Face Options
  • ATS: Special Message Codes
aaand that's about it :3
Hey there,

Could you maybe add links to where you found these scripts?
The error only indicates that a sprite has been accessed that was no longer meant to be accessed. This could have happened if some of your scripts accessed the map screen to early when you returned to it.

You could try to temporarily add this script to your project. It won't fix the error, but it should hopefully expand the error message to help locate the position where things went wrong:
Spoiler
Code:
if $TEST || $BTEST

class << SceneManager
 
  alias_method(:run_ILC_ExceptionBacktrace, :run)
  def run
    begin
      run_ILC_ExceptionBacktrace
    rescue Object
      stack = $!.backtrace.map { |pos|
        match = pos.match(/^([^:]*):([^:]*)(?::(.*))?$/)
        next pos  unless match
        name = match[1][/^\{(\d+)\}$/] ? $RGSS_SCRIPTS[$1.to_i][1] : match[1]
        line = match[3] ? " (line #{match[2]})" : ""
        location = match[3] ? match[3] : match[2]
        next "  #{name}#{line} : #{location}"
      }.join("\n")
      raise $!.exception($!.message + "\n\nError occurred in:\n#{stack}")
    end
  end
end


class Game_Interpreter
 
  alias_method(:setup_ILC_ExceptionBacktrace, :setup)
  def setup(list, event_id = 0)
    setup_ILC_ExceptionBacktrace(list, event_id)
    @list_source = find_list_source(list, event_id)
  end
 
  def find_list_source(list, event_id)
    map = $game_map.instance_variable_get(:@map)
    map.events.each_value { |event|
      event.pages.each_with_index { |page, index|
        next  unless page.list.equal?(list)
        return "Map %03d (%s) Event %03d (%s), Page %d" % [$game_map.map_id,
            ($data_mapinfos[$game_map.map_id].name rescue "???"), event.id,
            event.name, index + 1]
      }
    }
    $data_common_events.each { |commonevent|
      next  unless commonevent && commonevent.list.equal?(list)
      return "Common Event %03d (%s)" % [commonevent.id, commonevent.name]
    }
    return "Unknown Event (ID:%d)" % [event_id]
  end
 
  alias_method(:run_ILC_ExceptionBacktrace, :run)
  def run
    begin
      run_ILC_ExceptionBacktrace
    rescue Object
      line = @list ? @list.take(@index + 1).rindex { |cmd| cmd.code < 400 } : 0
      $!.set_backtrace($!.backtrace + ["> #{@list_source}:#{line + 1}"])
      raise $!
    end
  end
end

end
oh ok sure!

i shall update further upon using the script :3

EDIT>> so here's what i got after hitting the [CANCEL] button from the menu

ddcx2di-cd1fa67d-af0b-4d38-a80c-bb48ab5cc0b5.png
Perhaps make this change to Yanfly Menu Cursor
Code:
  #--------------------------------------------------------------------------
  # new method: dispose_menu_cursors
  #--------------------------------------------------------------------------
  def dispose_menu_cursors
    @menu_cursors.each { |cursor| cursor.dispose }
    @menu_cursors.clear
  end

Original thread: https://forums.rpgmakerweb.com/threads/ace-disposed-sprite-error.111600/