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

[Bug] Crashes after roaming around the map at super-speed (& entering / exiting villages) #979

Open
2 tasks
georgyrudnev opened this issue Sep 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@georgyrudnev
Copy link
Contributor

georgyrudnev commented Sep 26, 2024

For New Contributors

How to contribute

Description

Different errors occuring, which have possibly separate root causes. See example error stacks:

  1. System.NullReferenceException: "Object reference not set to an instance of an object." for objIds.Add(newId, castedObj)
    MapEventSideLifetimeHandler
    if (objectManager.AddNewObject(payload.What.Instance, out var mapEventSideId) == false) return;

(Instance was RaidEvent in that case)

  1. System.NullReferenceException
    message = Object reference not set to an instance of an object.
    Error stack: System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) in System.Collections.Generic\Dictionary.cs: line1222 at GameInterface.Services.Registry.RegistryBase1.RegisterNewObject(Object obj, String& id) in GameInterface\Services\Registry\RegistryBase.cs: line88

(MapEvent was Battle in that case)

  1. System.InvalidOperationException
    msg = Type GameInterface.Services.BesiegerCamps.Messages.NetworkCreateBesiegerCamp is not registered with the serialization type mapper
    Error stack: Common.Serialization.ProtoBufSerializer.Serialize(Object obj) in Coop.Core\Common\Serialization\ProtoBufSerializer.cs: line49
    at Coop.Core.Common.Network.CoopNetworkBase.SerializeMessage(IMessage message) in Coop.Core\Common\Network\CoopNetworkBase.cs: line126
    at Coop.Core.Common.Network.CoopNetworkBase.SendAll(IMessage message) in Coop.Core\Common\Network\CoopNetworkBase.cs: line107
    at GameInterface.Services.BesiegerCamps.Handlers.BesiegerCampLifetimeHandler.Handle(MessagePayload`1 payload) in GameInterface\Services\BesiegerCamps\Handlers\BesiegerCampLifetimeHandler.cs: line49

  2. Instance.m_Queue.Enqueue((action, ewh));
    GameloopRunner.RunOnMainThread in MobilePropertyHandler)

All errors occurred multiple times but it is not easy to reproduce (especially 4., sometimes happened after entering/waiting in village)

Intended Design

Location

Create a branch based from development

Related Issues

May be related to #839

Requirements

Additional information

Definition of Done

  • Class level comments exist for all new classes.
  • XUnit tests exist for every method that does not require the game to be ran.
@georgyrudnev georgyrudnev added the bug Something isn't working label Sep 26, 2024
@georgyrudnev
Copy link
Contributor Author

Another crash:

Exception of "System.InvalidOperationException" in Common.dll ocurred,
Type GameInterface.Services.BesiegerCamps.Messages.NetworkCreateBesiegerCamp is not registered with the serialization type mapper

Stack:

Common.dll!Common.Serialization.ProtoBufSerializer.Serialize(object obj) Zeile 46 C#
Coop.Core.dll!Coop.Core.Common.Network.CoopNetworkBase.SerializeMessage(Common.Messaging.IMessage message) Zeile 131 C#
Coop.Core.dll!Coop.Core.Common.Network.CoopNetworkBase.SendAll(Common.Messaging.IMessage message) Zeile 112 C#
GameInterface.dll!GameInterface.Services.BesiegerCamps.Handlers.BesiegerCampLifetimeHandler.Handle(Common.Messaging.MessagePayload<GameInterface.Services.BesiegerCamps.Messages.BesiegerCampCreated> payload) Zeile 49 C#
[Übergang von Nativ zu Verwaltet]
[Übergang von Verwaltet zu Nativ]
Common.dll!Common.Messaging.WeakDelegate.Invoke(object[] parameters) Zeile 35 C#
Common.dll!Common.Messaging.MessageBroker.Publish<GameInterface.Services.BesiegerCamps.Messages.BesiegerCampCreated>(object source, GameInterface.Services.BesiegerCamps.Messages.BesiegerCampCreated message) Zeile 73 C#
GameInterface.dll!GameInterface.Services.BesiegerCamps.Patches.BesiegerCampCreationPatches.Prefix(ref TaleWorlds.CampaignSystem.Siege.BesiegerCamp __instance) Zeile 35 C#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant