Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullReferenceException in LobbyCommands.MissionBriefingOrDefault #19861

Open
Mailaender opened this issue Dec 31, 2021 · 2 comments
Open

NullReferenceException in LobbyCommands.MissionBriefingOrDefault #19861

Mailaender opened this issue Dec 31, 2021 · 2 comments

Comments

@Mailaender
Copy link
Member

System Information

  • Operating System: Linux
  • OpenRA Version: 5fcc049
  • OpenRA Mod: hv
  • Source: AppImage

Exception log

[2021-12-27T17:52:49] Felix has disconnected.
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at OpenRA.Mods.Common.Server.LobbyCommands.MissionBriefingOrDefault(Server server) in /home/runner/work/OpenHV/OpenHV/engine/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs:line 1097
   at OpenRA.Mods.Common.Server.LobbyCommands.ClientJoined(Server server, Connection conn) in /home/runner/work/OpenHV/OpenHV/engine/OpenRA.Mods.Common/ServerTraits/LobbyCommands.cs:line 1117
   at OpenRA.Server.Server.<>c__DisplayClass37_0.<ValidateClient>b__0() in /home/runner/work/OpenHV/OpenHV/engine/OpenRA.Game/Server/Server.cs:line 489
   at OpenRA.Server.Server.<>c__DisplayClass37_1.<ValidateClient>b__5() in /home/runner/work/OpenHV/OpenHV/engine/OpenRA.Game/Server/Server.cs:line 596
   at OpenRA.Server.Server.CallbackEvent.OpenRA.Server.Server.IServerEvent.Invoke(Server server) in /home/runner/work/OpenHV/OpenHV/engine/OpenRA.Game/Server/Server.cs:line 1407
   at OpenRA.Server.Server.<>c__DisplayClass30_0.<.ctor>b__2(Object _) in /home/runner/work/OpenHV/OpenHV/engine/OpenRA.Game/Server/Server.cs:line 288
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Aborted

Additional information

The part of the code in question is unmodified

var missionData = server.Map.WorldActorInfo.TraitInfoOrDefault<MissionDataInfo>();

@Mailaender Mailaender changed the title My game crashed NullReferenceException in LobbyCommands.MissionBriefingOrDefault Dec 31, 2021
@anvilvapre
Copy link
Contributor

Does your mod rules define a 'world' actor? This is required if have a rules yaml. In bleed, MapPreview.cs line 140. It will not use the default - if any rules definitions are present.

Otherwise I assume that Map (MapPreview) is null.

@Mailaender
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants