• entries
  • comments
  • views

Bug hunt.

Sign in to follow this  


That weird threading problem is fixed now. Turned out to be two separate bugs, which is good given the disparate nature of the two sources, even though the problem looked the same.

The chatbox wasn't displaying because it is transferred from the lobby to the main ui in the process that was being shunted to the new thread. Something there caused it to either be collected or otherwise become invalidated in that little time between 'remove from A' and 'add to B'. Easy enough, do that migration in the main thread.

The map renderer wasn't displaying the map due to a race condition. The main ui generation is done on a 'game starting' message. Part of that adds a listener for the 'your turn' message which centers the map on... something. Yes, you guessed it, the 'your turn' message is processed right after the 'game starting' message. Putting the listener assignment in the thread was just slow enough to miss the 'your turn' message so the map never centered on anything. Once again, moving that out of the main UI construction and into 'after constructed' -> add listener fixed it.

Everything looks pretty slick now transferring from screen to screen. I should change the main ui to pre-load while people are sitting in the lobby, but that's easy enough. More important though I think is getting things playable (for once). More work tomorrow perhaps.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now