As best as I can figure this out:
Sandstorm starts via the normal weather flow. StartSandstorm() sets m_IsSandstormStartedByWeather = true (worlddata.c:482) a session-local note that the storm was weather-driven.
Server restarts mid-storm. Script members re-initialise: worlddata.c:47 - m_IsSandstormStartedByWeather returns to false. The note is not persisted.
Native sandstorm resumes from weather storage. sandstorm.c:90 raises OnStart(continuedSession = true); sandstorm.c:95 forwards to GetWorldData().WeatherSandstormStart(continuedSession).
worlddata.c:501 reads m_IsSandstormStartedByWeather -> false which is stale information belonging to the previous session. A weather-driven storm is reported as not weather-driven.
worlddata.c:510 calls OnSandstormStart(false) -> override nasdara.c:497.
nasdara.c:499 - if (!isStartedByWeather) enters the branch intended for manually started storms. nasdara.c:504-507 set wind magnitude and wind direction forecasts with length 99999 s; nasdara.c:508 sets overcast to RandomFloatInclusive(0.75, 1.0) with forecast length 99999 s (~27.7 hours).
The only sandstorm.Stop() calls are nasdara.c:339 and nasdara.c:357, both inside case EWeatherPhenomenon.OVERCAST: of WeatherOnBeforeChange (nasdara.c:172,204), which executes when the overcast forecast phase ends. The phase was just set to 99999 s, so the handler cannot fire and the storm runs unmanaged for ~27.7 hours. Compare the weather-flow start path, which relies on the same mechanism (nasdara.c:330 - windMagLength = 99999 with comment "we want sandstorm to stay in the map until the next real overcast change") - that path is safe only because a normal-length overcast phase still exists. Here it does not.
I ran a Monte Carlo test against the code and got a consistent result - simulated restart during a sandstorm always triggered the error that made the storm last 27.7 hours.
I think the fix is not to use 99999 but maximum overcast length:
- m_Weather.GetOvercast().Set( randomizedOvercast , fadeInTime * 2, 99999);
+ m_Weather.GetOvercast().Set( randomizedOvercast , fadeInTime * 2, m_WeatherDefaultSettings.m_OvercastMaxLength);