Thank you kindly, TLaukkan (Tommil) for a patch that solves:

If -background=true is specified on the command line, a null pointer exception crashes the server in OpenSim/Region/Application/OpenSimBase.cs in method StartupSpecific. Its trying to dereference m_console which is null, presumably because we're in background mode.
GenericGridServerConcept
Charles Krinke 2009-02-23 23:14:04 +00:00
parent 931754a1ab
commit e9e5c175cd
1 changed files with 33 additions and 28 deletions

View File

@ -198,41 +198,46 @@ namespace OpenSim
// Only enable logins to the regions once we have completely finished starting up (apart from scripts) // Only enable logins to the regions once we have completely finished starting up (apart from scripts)
m_commsManager.GridService.RegionLoginsEnabled = true; m_commsManager.GridService.RegionLoginsEnabled = true;
List<string> topics = GetHelpTopics(); // If console exists add plugin commands.
if (m_console != null)
foreach (string topic in topics)
{ {
m_console.Commands.AddCommand("plugin", false, "help " + topic, List<string> topics = GetHelpTopics();
"help " + topic,
"Get help on plugin command '" + topic + "'",
HandleCommanderHelp);
m_console.Commands.AddCommand("plugin", false, topic, foreach (string topic in topics)
topic,
"Execute subcommand for plugin '" + topic + "'",
null);
ICommander commander = null;
Scene s = SceneManager.CurrentOrFirstScene;
if (s != null && s.GetCommanders() != null)
{ {
if (s.GetCommanders().ContainsKey(topic)) m_console.Commands.AddCommand("plugin", false, "help " + topic,
commander = s.GetCommanders()[topic]; "help " + topic,
} "Get help on plugin command '" + topic + "'",
HandleCommanderHelp);
if (commander == null) m_console.Commands.AddCommand("plugin", false, topic,
continue; topic,
"Execute subcommand for plugin '" + topic + "'",
null);
foreach (string command in commander.Commands.Keys) ICommander commander = null;
{
m_console.Commands.AddCommand(topic, false, Scene s = SceneManager.CurrentOrFirstScene;
topic + " " + command,
topic + " " + commander.Commands[command].ShortHelp(), if (s != null && s.GetCommanders() != null)
String.Empty, HandleCommanderCommand); {
if (s.GetCommanders().ContainsKey(topic))
commander = s.GetCommanders()[topic];
}
if (commander == null)
continue;
foreach (string command in commander.Commands.Keys)
{
m_console.Commands.AddCommand(topic, false,
topic + " " + command,
topic + " " + commander.Commands[command].ShortHelp(),
String.Empty, HandleCommanderCommand);
}
} }
} }
} }
private void HandleCommanderCommand(string module, string[] cmd) private void HandleCommanderCommand(string module, string[] cmd)