Skip to content

Conversation

dydzio0614
Copy link
Member

On some machines restart scenario button closes VCMI. This happens probably because server is not fully closed when code assumes it is (game not completely ended when starting it again). Added 1 second delay on restart, which should cause the button to work correctly most of the time.

@vmarkovtsev
Copy link
Contributor

There actually used to be a delay like 300ms. I think I removed it and wanted to debug this shit because adding delays on exit is a very dirty hack. I didn't have time to fully trace it but the real problem is surely with thread dependency hell and races. I highly encourage you to properly debug the problem instead of hacking delays.

@dydzio0614 dydzio0614 closed this Mar 16, 2017
@dydzio0614
Copy link
Member Author

I managed to get proper solution that just works, using one boost::mutex. Before pulling it I will try to learn if something else than mutex can be better / more intuitive for code readers in this case as boost offers many interesting stuff for concurrent programming.

@dydzio0614 dydzio0614 deleted the RestartButton branch March 16, 2017 20:56
@dydzio0614
Copy link
Member Author

Proper fix: #288

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants