Crash when ai is ordered to fly waypoints created by scripting, since Nightly 23.3.0-20231103
Waypoints created with the scripting function mn.createWaypoint() lead to a game crash when the Ai is ordered to fly the associated waypoint path. A simple test script and mission are attached, the game crashes a few seconds into the mission. The bug appears in Nightly 23.3.0-20231103 and still exists in the current 24.2.0-RC4, any build up to 20231102 works fine.
Debug error message: Assert: "!aip->wp_list->get_waypoints().empty()" File: aicode.cpp Line: 4908 waypoint_testcase_crash_from_Nightly_20231103.zip
This is an invalid pointer access due to a vector reallocation. The code will need to use an index rather than a pointer. It's the same problem as #5785, just with a different field in a different struct.
The fix is nearly ready to go, but will not be included in 24.2 due to its widespread scope.