• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[1.32.7] Bug: BlzGetFrameByName causes replay desync

Status
Not open for further replies.
Level 10
Joined
Dec 11, 2009
Messages
234
Uploading test map for demonstration.

The following code causes replay desync:
JASS:
call BlzGetFrameByName("CommandButton_0", 0)
How to reproduce:
1. Press ESC, click on button.
2. Type "test" in chat.
3. Press ESC, click on button.
4. Go and watch the replay. If the bug happened, the second button press will not be recognized by the game!

This bug occurs in WC 1.32.7.

UPD:
Still not fixed in 1.32.10.
There is one workaround, that seems to work (at least for now):

Solution:
JASS:
local framehandle frame = BlzGetFrameByName("name",0)
if frame == null then// You are in a replay and this frame doesn't exist
    call Location(0,0) //Generate a handle to replace the frame's handle
endif                  //that was created in the game(
You will have to do this for every frame function that returns a handle and that does not exist in replays. You only have to do this once per frame. The location leak is intentional, do not clean it. If you are using lua, you may have to create a table storing these locations, otherwise the GC might free them, causing handle issues again.
 

Attachments

  • 1.32.7-BlzGetFrameByNameReplayDesync.w3m
    14.6 KB · Views: 17
Last edited:
Status
Not open for further replies.
Top