[Bug report][Ace] RGSS3 player crash in Window#cursor_rect= assignment

● ARCHIVED · READ-ONLY
Started by Ancurio 5 posts View original ↗
  1. w = Window.neww.cursor_rect = Rect.new(0,0,0,0) # same as Rect.newThis code works fine in RGSS1 and 2, but crashes Player.exe in RGSS3. The conditions are that the first Rect object assigned to a Window instance after its creation must be empty. This for example works:

    w = Window.neww.cursor_rect = Rect.new(0,0,1,1)w.cursor_rect = Rect.new(0,0,0,0)Am I crazy? Did Enterbrain really let something like this slip through?
  2. this is how they do it

    #-------------------------------------------------------------------------- # * Update Cursor #-------------------------------------------------------------------------- def update_cursor if @cursor_all cursor_rect.set(0, 0, contents.width, row_max * item_height) self.top_row = 0 elsif @index < 0 cursor_rect.empty else ensure_cursor_visible cursor_rect.set(item_rect(@index)) end endso if you do w.cursor_rect.empty it'd probably work for you
  3. Does it give you an error message?
  4. Here is the alternative way

    Code:
    w.cursor_rect.set(Rect.new(0,0,0,0))
  5. Shaz said:
    Does it give you an error message?
    Nope, it's not an RGSS error in the sense that an exception is raised, the window just closes. I assume this means the player process just crashes.

    TheoAllen said:
    Here is the alternative way

    w.cursor_rect.set(Rect.new(0,0,0,0))
    Interesting that this works. This means that Rect#set(rect) and object.rect_property=(rect) internally run on two different code paths.