The camera bring-up says how far it got

A Live Cam station is selected entirely by egg data - hostType=1 on that
host's entry plus vehicle=camera - so no code path announces itself and a
station that fails to come up leaves a log that simply stops. RP412CAMLOG=1
traces the sequence: the stand-alone host and its type, the local player
node and game model, the interest-arena and interest-manager loads, the
registry choosing a director, the director making its camera ship, and the
launch handshake it waits on. Off by default.

What it found immediately: a camera host wedges inside
InterestManager::LoadMission - the map-entity load - and never returns.
Everything upstream is correct (the egg parses, hostType 1 is adopted,
gameModel reads 'camera'), and the same call with a racing egg passes
straight through to making the player and launching. Same map both times,
so it is the local host's TYPE that the map load cannot digest, not the
map. That is a defect to fix before a lobby has anything to switch on.

Also recorded while chasing it: a racing -egg run sits in application
state 11 with the low-priority queue never empty for its whole life, and
still simulates - so CheckLoad's no-console self-launch is not what
starts a stand-alone race. Worth knowing before trusting that path.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-08-10 14:04:26 -05:00
co-authored by Claude Opus 5
parent ef4a5e501d
commit a5c1e0291c
8 changed files with 114 additions and 0 deletions
+46
View File
@@ -34,6 +34,23 @@ Application *application = NULL;
int Exit_Code = 0;
Logical Application::suppressGauges = False;
//
// RP412CAMLOG - see app.h. Cached: the waiting trace asks once a second
// for as long as a station sits unlaunched.
//
Logical
RPCameraLog()
{
static int enabled = -1;
if (enabled < 0)
{
const char *setting = getenv("RP412CAMLOG");
enabled = (setting != NULL && atoi(setting) != 0) ? 1 : 0;
}
return enabled ? True : False;
}
//#############################################################################
//########################### Application ###############################
//#############################################################################
@@ -1340,7 +1357,15 @@ void
InterestManager *interest_mgr = GetInterestManager();
Check(interest_mgr);
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: player data set - loading interest arenas\n" << std::flush;
}
interest_mgr->LoadInterestArenas(currentMission);
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: interest arenas loaded - mission created\n" << std::flush;
}
}
//
@@ -1376,7 +1401,16 @@ void
trace_manager.StartTimingAnalysis();
#endif
Check(interestManager);
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: LoadMission handler - loading interest manager\n" << std::flush;
}
interestManager->LoadMission(currentMission);
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: interest manager loaded - about to make the player\n"
<< std::flush;
}
//
//--------------------------------------------------------------------------
@@ -1546,6 +1580,13 @@ void
case CreatingMission:
case LoadingMission:
case WaitingForLaunch:
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: CheckLoad state=" << (int) applicationState.GetState()
<< " minPriorityQueueEmpty="
<< (int) (eventQueue->IsPriorityEmpty(MinEventPriority) ? 1 : 0)
<< "\n" << std::flush;
}
if (eventQueue->IsPriorityEmpty(MinEventPriority))
{
Host *console_host;
@@ -1598,6 +1639,11 @@ void
RunMissionMessage run_mission_message;
Post(DefaultEventPriority, this, &run_mission_message);
Tell("Sent ready message to ourselves\n");
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: no console - posted RunMission to ourselves\n"
<< std::flush;
}
}
}
+14
View File
@@ -56,6 +56,20 @@ class GeneralEventQueue;
class Entity__MakeMessage;
class ResourceFile;
//##########################################################################
//######################### Live Cam tracing #############################
//##########################################################################
//
// RP412CAMLOG=1 traces the camera-station bring-up: the registry choosing
// a director, the director creating its camera ship, and the launch
// handshake it waits on. The Live Cam path is selected purely by egg data
// (hostType=1 plus vehicle=camera), so when it does not come up there is
// nothing in the log to say how far it got - which is exactly the hole
// this fills. Off by default; it prints once per second while waiting.
//
Logical
RPCameraLog();
//##########################################################################
//######################### Application ##############################
//##########################################################################
+10
View File
@@ -172,6 +172,11 @@ void
// Create any MUNGA level vehicles
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: CreatePlayerVehicle, cameraShipPlayer="
<< (int) (IsCameraShipPlayer() ? 1 : 0) << "\n" << std::flush;
}
if (IsCameraShipPlayer())
{
Check(application);
@@ -186,6 +191,11 @@ void
playerMission->GetGameModel(),
ResourceDescription::ModelListResourceType
);
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: model '" << playerMission->GetGameModel()
<< "' resource " << (camera_res ? "FOUND" : "MISSING") << "\n" << std::flush;
}
Check(camera_res);
CameraShip::MakeMessage
create_camera(
+8
View File
@@ -447,6 +447,14 @@ void
Check(application->GetHostManager());
application->GetHostManager()->AdoptLocalHost(my_l4host);
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: stand-alone local host '"
<< (const char *) mission_host_data->GetAddressString()
<< "' hostType=" << (int) mission_host_data->GetHostType()
<< " - posting LoadMission\n" << std::flush;
}
//
//--------------------------------------------------------------------
// Now, since this host creator is for stand-alone mode, send the load
+16
View File
@@ -147,8 +147,17 @@ void
{
Check(this);
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: CreateRPCameraShip - making the camera ship\n"
<< std::flush;
}
CameraDirector::CreateCameraShip(time_slice);
SetPerformance(&RPCameraDirector::BeARPDirector);
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: camera ship up, now directing\n" << std::flush;
}
}
//#############################################################################
@@ -172,6 +181,13 @@ RPCameraDirector::RPCameraDirector(
{
SetPerformance(&RPCameraDirector::CreateRPCameraShip);
}
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: RPCameraDirector built, football="
<< (int) (martianFootball ? 1 : 0)
<< " replicant=" << (int) (GetInstance() == ReplicantInstance ? 1 : 0)
<< "\n" << std::flush;
}
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+6
View File
@@ -5,6 +5,7 @@
#include "rpmssn.h"
#include "rpplayer.h"
#include "rpdirect.h"
#include "..\munga\app.h" // RPCameraLog
#include "crusher.h"
#include "runner.h"
#include "blocker.h"
@@ -170,6 +171,11 @@ Player*
else
{
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: registry making an RPCameraDirector (game model '"
<< mission->GetGameModel() << "')\n" << std::flush;
}
RPCameraDirector::MakeMessage create_director(
RPCameraDirector::MakeMessageID,
sizeof(RPCameraDirector::MakeMessage),
+8
View File
@@ -428,6 +428,14 @@ namespace
"# 0 or unset = off. (Alt+Q, the mission abort, is always live.)\n"
"#RP412DEVKEYS=1\n"
"\n"
"# Nonzero traces the Live Cam bring-up: the egg's host type and game\n"
"# model, the registry choosing a camera director, the director making\n"
"# its camera ship, and the launch handshake. A camera station is picked\n"
"# purely by egg data (hostType=1 and vehicle=camera on that host's\n"
"# entry), so without this there is nothing in the log to say how far it\n"
"# got. Prints once a second while a station sits unlaunched.\n"
"#RP412CAMLOG=1\n"
"\n"
"# Console race-length override, integer seconds (short test races).\n"
"# Values <= 0 are ignored.\n"
"#L4CONSOLELEN=30\n"
+6
View File
@@ -74,6 +74,12 @@ void
gameModel = strdup(player_model);
Register_Pointer(gameModel);
if (RPCameraLog())
{
DEBUG_STREAM << "CamLog: local player node '" << (const char *) player_node
<< "' gameModel '" << gameModel << "'\n" << std::flush;
}
dropZoneName = NULL;
const char* drop_zone = NULL;
notation_file->GetEntry(player_node, "dropzone", &drop_zone);