Closed festen closed 7 years ago
@zhedar: is this related to the slowness of the file monitor?
I was unaware that the file monitor is slow. I have never ever seen the pre-game info on a Mac, that's all. Files are uploaded within 10 seconds after game ends. Any way to check how quickly it finds the file?
Steps to reproduce the original problem 1) Open Hots replay uploader 2) Open Hots 3) Start a game (I tested a quick-match one) Result: No pre-game info
We've experienced some issues with slowness and timeouts in our JDK WatchServices on macOS that have resulted in replays being detected slower than usual, and lobbies as well. We researched the problem and found out that the file system events for macOS don't really exist and are emulated in the JRE.
We briefly discussed implementing it differently for macOS, but found that we could make some workarounds that passed testing.
Unfortunately, I don't have access to any macs, so I'm reliant on either @zhedar or you to debug the problem and test workarounds.
I'll defer to Zhedar on this issue, as he is infinitely more suited in order to figure out exactly what goes wrong here.
I ran the uploader with logging and played a single game. It's interesting to see that there are no logging lines @ 11:04 (when I started the game) but only at the end (11:18) maybe that helps.
https://gist.github.com/festen/ef414b3bd2dc04e759b0e70d469bca7b <-- log
Well, the Finished handling file.
log comes from the UploaderService
, when the replay was uploaded successfully, so that doesn't tell us anything about the BatteLobbyWatcher
and its function.
But your log is still helpful, since I don't see the Watcher getting initialized in there. It seems like it can't find the TemporaryItems
folder, which isn't there on my system as well. I might have to check, if this folder is created and removed by the game itself or if it's destination has changed.
Edit: Okay, checking on our conversations concerning directories TemporaryItems
is created and removed by the game on demand, so I have to recheck that.
Just did a quick AI match and it seems the TemporaryItems
folder isn't there anymore. May have to look, where it went...
OK, that's really unfortunate. They changed folders. The files now can be found under /private/var/folders/d_/4y5d90b56kl70gfk7717m6y40000gn/T/TemporaryItems/Blizzard/Heroes of the Storm/TempWriteReplayP2/...
and I guess the folder name after d_
isn't constant...
Edit: OK, the good news is: they're using the official temp folder now (maybe that changed with Sierra?). If we are using System.getProperty("java.io.tmpdir")
, we get to that folder exactly. On my system it points to /private/var/folders/d_/4y5d90b56kl70gfk7717m6y40000gn/T/
.
I can confirm that the hotfix fixes the issue on two systems I own (both running macOS sierra)
Great news. I'm in the middle of moving, so the release itself is somewhat delayed already. I should have time to compile and upload builds for Windows and Linux in a few hours so we can release.
The pre-game info that we have in Windows, is not showing on Mac (tested on two systems). Not sure if this is not implemented or a bug. If it is not implemented: it would be a really welcome addition!