How to avoid the change race / title bar crash


#1

This crash bug is fixed in 1.29 (pending) but here is how to avoid it:

before changing race, always make sure you have gone once to the ‘choose mission’ screen.

The game will crash if you change race before it has at least once drawn the screen where you choose a mission. This is a bug, and it’s my fault. It’s fixed for the next version.
Symptoms: Crash to desktop and / or error about titlebars.

techy details: The code for changing race also makes sure that the choose mission screen is updated to show the correct race in the top chooser window. Thus, whenever you change race that window gets updated. The text for the titlebar that shows the current race is changed, and its size recalculated. This requires that the position of the titlebar has already been set, and that depends on the position of the choose mission window. All of this gets sorted out when that game mode (choose mission) is activated, ready for it to be drawn. The bug happens if you trigger a race change without ever having changed mode to the choose mission screen. The positional code for that screen is stupidly in the 'activate mode' function rather than its constructor. (This is the fix). This code was written back before it was possible to change race from the deployment screen, and before challenges were in the game. Now you can go from main menu -> challenges -> deployment -> change race, which was never originally envisaged, hence the bug. It's fixed now :D So always click the battle screen and then quit out from it before you want to change a race, until I release 1.29, cheers :D