Support | News | Classic | F.A.Q. | Discord | Discussions | Wiki | Roadmap

Im having issues with the long photon torpedo launchers. they always crash my game, and now i cant remove them because if i mouse over the game crashes.
Error log mentions something about not being able to find toggle 0.

    Markush I presume, you are loading a savegame or a ship file? I know in these cases the game messes up toggle settings leading to dual states, hence, a conflict resulting in a crash.
    So please give me an account of what you did with the launchers especially their settings so I can try to figure out a way to pre-empt the conflict (if possible). I've not been able to replicate this yet so this is very important to find out.
    The only way to fix this kind of issue is to load the ship into blueprint mode. There's no way to fix savegames in Cosmoteer.

      Lafiel The game crashes whenever i either mouse over the torpedo tubes or i try to add them and they go near the ship. Ive tried loading with blueprint but it doesnt help.
      Now i tried making a new ship and adding the launcher tubes and i still get the crash. It doesnt crash right when i place them, but somewhere after they start to get loaded with torpedoes.

      02/15/2020 22:30:01 | System.InvalidOperationException: Part Lafiel.torpedo_launcher4 has no component ItemToggle0
      02/15/2020 22:30:01 | at Cosmoteer.Ships.Parts.Logic.PartToggledComponentsRules.IsBlueprintToggleOn(PartRules partRules, Func2 getToggleMode)
      02/15/2020 22:30:01 | at Cosmoteer.Ships.Blueprints.BlueprintPathfinder.<>c__DisplayClass3_0.<GetPathToNearestAmmoSupplier>g___ValidateAmmoSupplierMode|1(PartInfo p, IEnumerable
      1 components)
      02/15/2020 22:30:01 | at Cosmoteer.Ships.Blueprints.BlueprintPathfinder.<>cDisplayClass3_0.<GetPathToNearestAmmoSupplier>g_FilterAmmoAupplier|0(IntVector2D cell)
      02/15/2020 22:30:01 | at Halfling.Pathfinding.AStarPathfinder1.FindAllNodeDistancePairs(IEnumerable1 start, Predicate1 filter, Int32 maxIterations)+MoveNext()
      02/15/2020 22:30:01 | at Cosmoteer.Ships.Blueprints.BlueprintPathfinder.GetPathToNearestAmmoSupplier(PartInfo part, ID
      1 ammoType, Func3 getToggleMode, ICollection1 path)
      02/15/2020 22:30:01 | at Cosmoteer.Game.SelectionStates.BaseBuildState.GetCrewPathInfo(Ship ship, PartInfo part, List1 paths, StringBuilder cursorText, Func3 getToggleMode, ShipUpdateInfo sui, Int32 indent)
      02/15/2020 22:30:01 | at Cosmoteer.Game.SelectionStates.GrabPartState.DrawOverlayImpl()
      02/15/2020 22:30:01 | at Cosmoteer.Simulation.SimOverlayRenderer.OnDrawOverlays(Object sender, DrawEventArgs e)
      02/15/2020 22:30:01 | at Halfling.Scene2D.SceneComponent.Halfling.Scene2D.IRenderableSceneObject.Draw(SceneViewport viewport, SceneCamera camera, SceneRoot root, RotRect viewRect)
      02/15/2020 22:30:01 | at Halfling.Scene2D.SceneRoot.DrawForBucket(SceneViewport viewport, SceneCamera camera, RotRect viewRect, Int32 bucket)
      02/15/2020 22:30:01 | at Halfling.Scene2D.SceneRoot.Draw(SceneViewport viewport, SceneCamera camera, RotRect viewRect, UInt32 renderMask)
      02/15/2020 22:30:01 | at Halfling.Scene2D.SceneViewport.Draw()
      02/15/2020 22:30:01 | at Cosmoteer.Simulation.SimRoot.Draw(Boolean allowWorldInput, Single zoomScale)
      02/15/2020 22:30:01 | at Cosmoteer.Game.GameRoot.Draw(StateMethodInvoker drawParent)
      02/15/2020 22:30:01 | at Halfling.Application.AppStateEx.Halfling.Application.IAppState.Draw(StateMethodInvoker drawParent)
      02/15/2020 22:30:01 | at Halfling.Application.Director.CallDraw()
      02/15/2020 22:30:01 | at Halfling.Application.Director.DoDraw()
      02/15/2020 22:30:01 | at Halfling.Application.Director.GetRunIterator()+MoveNext()
      02/15/2020 22:30:01 | at Halfling.Application.Bases.GenericApp.ApplicationMainIterator()+MoveNext()
      02/15/2020 22:30:01 | at Halfling.Windows.D3D11.D3D11Window.RunGameLoop(String[] args, IEnumerable`1 iterator)
      02/15/2020 22:30:01 | at Halfling.Application.Bases.GenericApp.ApplicationMain(String[] args)

      here is a part of the error log

        Markush Thanks for posting the log and the details.
        The problem is ... from the design and code perspective this error should be impossible to come up. It points to a missing toggle component for multi-ammo which the part doesn't have. I've checked the code several times to make sure. So this leads me to the error before it which is a blueprint error. It shouldn't exist either. For multi-ammo a blueprint would be tied to the multi-ammo toggle. Since there's no such toggle there's also no connection made with any blueprint. The only thing I see is that I reused the same component name BlueprintsItem0_2 as in some of those that have such a toggle. However, the numbering doesn't match the foremost error ItemToggle0 which to match would have been ItemToggle2.
        So I'm certain this error is a game bug with the new changes Walt has made to blueprint handling and ToggleComponents. And somehow something messed up in part code management or so.
        Anyhow, I went through all settings and all and nothing happened. I think it happened due to some part constellation I do not know, hence, cannot replicate. So please provide a savegame and the ship file so @Walt can take a look at it.

          Lafiel thanks a lot for helping and looking into the issue. ive noticed that placing the torpedo tubes on their own doesnt crash the game, but once i place a bulk replicator it crashes within a few seconds. if i then remove the replicators i can mouse over the tubes safely again.

          here is the ship file, i replaced the large tubes with the older ones that dont use the photon torpedo ammo type.
          image https://forum.cosmoteer.net/assets/images/7128-eiY7zd2wrSYWs9iU.png

            Markush Yeah, I've updated the release post with nearly all the known crashes with 0.15.6.
            https://forum.cosmoteer.net/d/10469-abh-mod-v0-7-2-rc1-for-cosmoteer-0-15-6-0-15-6a

            It does seem 0.15.6 has trouble with custom ammo and probably in connection with the new pathing feature.

            Anyhow, I've uploaded an upgraded version of the old WIP that's compatible with (0.15.3 to) 0.15.5d. So if you play with Cosmoteer 0.15.5d you shouldn't have all the 0.15.6 crashes. Some old bugs might still be there since the WIP wasn't kept updated since I was ditching as 0.15.6 came out and I updated the mod.

              Lafiel Thanks a lot again for looking into this. Everything works fine with the older version, so i guess its a 1.15.6 problem

                Write a Reply...