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

Crash with generated asteroids on timewarp #2674

Closed
drake127 opened this issue Aug 12, 2020 · 4 comments
Closed

Crash with generated asteroids on timewarp #2674

drake127 opened this issue Aug 12, 2020 · 4 comments

Comments

@drake127
Copy link

PC configuration

  • KSP 1.10.1
  • Principia Master (8b4f26ce2e5460f1f0f6425af882b255890cc6eb) with manually added KSP 1.10.1 support.
  • Win10 x64 ...
  • MSVC 16.7.1

Scenario

I am trying to do SENTINEL contract in my career so I put two SENTINELs below Kerbin and Duna orbit. Then run timewarp at 100000x. After a while (dozens of seconds to few minutes) the game crashes. This can be easily reproduced although number of spawned asteroids vary (or there's some other variable).

Logs

I0812 18:27:31.694835 26648 plugin.cpp:414] Inserted unloaded vessel UnknownComet (3fd2626e-011d-44b1-80d4-024dc5d30b79)
    @   00007FFA3D1263EF  	google::LogMessageFatal::~LogMessageFatal [0x00007FFA3D1263EE+46] (C:\Users\drake127\source\repos\ksp\Google\glog\src\logging.cc:2109)
    @   00007FFA0CD97EE5  	principia::ksp_plugin::internal_plugin::Plugin::InsertUnloadedPart [0x00007FFA0CD97EE4+484] (C:\Users\drake127\source\repos\ksp\Principia\ksp_plugin\plugin.cpp:431)
    @   00007FFA0CCD3B03  	principia__InsertUnloadedPart [0x00007FFA0CCD3B02+754] (C:\Users\drake127\source\repos\ksp\Principia\ksp_plugin\interface.cpp:936)
    @   0000027F57661523  	(No symbol) [0x0000027F57661522]
F0812 18:27:31.694835 26648 plugin.cpp:1579] Check failed: inserted part_id: 0

Attachments

logs.7z, dump.7z, journal.7z

@pleroy
Copy link
Member

pleroy commented Aug 12, 2020

We haven't started looking at 1.10.1 yet, but from the stack trace it looks like comets break the KSP "invariants". Not good.

Sorry, something went wrong.

@drake127
Copy link
Author

drake127 commented Aug 12, 2020

I understand that 1.10.1 is still unsupported, I am just sharing my observation. It may be that comets are to blame. Is there anything more I can provide you with?

Quick dis.netification:

public static ProtoVessel SpawnComet(
    string cometName,
    Orbit o,
    CometDefinition cometDef,
    uint seed,
    UntrackedObjectClass objClass,
    double lifeTime,
    double lifeTimeMax,
    bool optimizedCollider,
    float fragmentDynamicPressureModifier)
  {
    ConfigNode vesselNode = cometDef.CreateVesselNode(optimizedCollider, fragmentDynamicPressureModifier, false);
    ConfigNode partNode = ProtoVessel.CreatePartNode("PotatoComet", seed, (ProtoCrewMember[]) Array.Empty<ProtoCrewMember>());
    uint num = 0;
    partNode.TryGetValue("persistentId", ref num);
    vesselNode.AddValue("cometPartId", num);
    ConfigNode configNode = new ConfigNode("VESSELMODULES");
    configNode.AddNode(vesselNode);
    ProtoVessel protoVessel = HighLogic.CurrentGame.AddVessel(ProtoVessel.CreateVesselNode(cometName, VesselType.SpaceObject, o, 0, new ConfigNode[1]
    {
      partNode
    }, new ConfigNode("ACTIONGROUPS"), ProtoVessel.CreateDiscoveryNode(DiscoveryLevels.Presence, objClass, lifeTime, lifeTimeMax), configNode));
    GameEvents.onCometSpawned.Fire(protoVessel.vesselRef);
    return protoVessel;
  }

Sorry, something went wrong.

@drake127
Copy link
Author

I can confirm that deleting \GameData\Squad\Parts\Misc\PotatoComet seem to help. Comets are apparently a bad omen.

@pleroy
Copy link
Member

pleroy commented Oct 31, 2020

Since upgrading to 10.1 we haven't heard from this again. Might be related to the SENTINEL contract. Closing, we'll see if this reoccurs.

@pleroy pleroy closed this as completed Oct 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants