Why does the Dark Forest / Auto-battle function crash shortly after starting?

If the Dark Forest or Auto-battle function crashes shortly after starting, it is usually due to a sporadic device issue. In most cases, the problem can be resolved by fully restarting the device in question (such as by unplugging it). To ensure that it is actually a device issue, it is recommended to also test the function briefly with another device or through the smartphone app.