The Harp of Yoba Redux

The Harp of Yoba Redux

6.4k Downloads

[PyTK/TMXLoader] Tilesheet sync failure causing hangs

ejektaflex opened this issue ยท 0 comments

commented

When playing (Especially when a new player joins, or when sleeping overnight), sometimes tile sync warnings will show up in the console, and the game will hang. It will occasionally recover from hanging after 20-60 seconds, but usually will hang indefinitely until you close the console window (and thus, the game).

As the game hangs, other characters in coop will experience disconnects.

Log: https://log.smapi.io/PiaAK8gF
Code where, if I had to guess, this is being printed:

PyNet.sendGameContent(t.ImageSource, tilesheet, farmhand, (b) => Monitor.Log("Syncing " + t.ImageSource + " to " + farmhand.Name + ": " + (b ? "successful" : "failed"), b ? LogLevel.Info : LogLevel.Warn));

Using the mod "Paul, the Optometrist" seems to cause this error but it stems from them using TMX, which is included in PyTK. No sync messages appear when their mod is not installed. One of the three submods used to make it work calls Platonymous.TMXLoader, which I would presume is the source of the problem.

Edit: This also causes lag when players join the game. Is it because this sync is blocking and being done on the main thread?