jpcsupplies / Economy_mod

Basic Economy System for Space Engineers
13 stars 12 forks source link

BUG: CTD if player attempts trade with someone in space manager mode #84

Closed jpcsupplies closed 5 years ago

jpcsupplies commented 8 years ago

It seems there are a few issues with mods interacting with players in spectator mode, in our case it causes a CTD.

2015-11-08 10:29:43.000 - Thread: 1 -> CameraAttachedTo: Spectator 2015-11-08 10:29:43.005 - Thread: 1 -> Enity found ! id : 131918001700274043 existing : Default_Astronaut adding: Default_Astronaut 2015-11-08 10:29:43.098 - Thread: 1 -> Exception occured: System.Exception: double entity add at Sandbox.Game.Entities.MyEntityCreationThread.ConsumeResult() at Sandbox.Game.Entities.MyEntities.UpdateAfterSimulation() at Sandbox.Game.World.MySector.UpdateAfterSimulation() at Sandbox.Game.World.MySession.UpdateComponents() at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime) at Sandbox.MySandboxGame.Update() at Sandbox.Engine.Platform.Game.UpdateInternal() at Sandbox.Engine.Platform.FixedLoop.<>cDisplayClass2.b1() at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback) at Sandbox.Engine.Platform.Game.RunLoop() at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen) at SpaceEngineers.MyProgram.RunInternal(String[] args) at SpaceEngineers.MyProgram.Main(String[] args) 2015-11-08 10:29:43.100 - Thread: 1 -> Hiding window 2015-11-08 10:29:43.307 - Thread: 1 -> Network readers disposed 2015-11-08 10:29:44.094 - Thread: 1 -> Hiding window done 2015-11-08 10:29:44.094 - Thread: 1 -> Showing message 2015-11-08 10:29:44.210 - Thread: 1 -> ERROR: branch name cannot be resolved, services= 2015-11-08 10:29:44.210 - Thread: 1 -> ERROR: branch name cannot be resolved, services= 2015-11-08 10:29:44.210 - Thread: 1 -> ERROR: branch name cannot be resolved, services=

midspace commented 8 years ago

It's low level in SE code. Nothing we personally can do about it (apart from informing KeenSWH).

jpcsupplies commented 8 years ago

same issue exists in admin mod, but yours catches it as a mission window error, might need something similar for econ, so we at least dont ctd

midspace commented 8 years ago

Hmmm, strange, because the stack trace you posted doesn't indicate that it touches the Econ code. If it doesn't pass through the Econ code, then we can't catch the error.

jpcsupplies commented 8 years ago

you get a similar error in admin mod if you go to spectator / space manager, move to a far ship and use /stopall yours catches and passes to a notification without a ctd

jpcsupplies commented 8 years ago

Just to clarify - I was in space master Spectator mode, and a player attempted to trade with me. The result was I crashed to desktop with the above log. Not sure if this is still an issue, I just realized my description was terrible sorry!

jpcsupplies commented 8 years ago

Might just be spectator mode in general.. probably should retest this. Some servers allow normal players spectator mode. I don't think we want some exploit to allow people to trick others to CTD them.

jpcsupplies commented 5 years ago

@midspace might need a retest of this, ive not seen this occur for a long time.. can you load both your test accounts onto the same world, put one in space master and try to sell something and see if we still ctd.. if not close this issue.

midspace commented 5 years ago

I suspect the issue is not what is in the title, but in the description. mods interacting with players in spectator mode,

Players attempting to sell or buy will need to access their inventory. I'm sure under most cases we have this working properly, in location the player's physical character and their player character inventory. But we may have missed something with Spectator mode.

midspace commented 5 years ago

I can't reproduce the issue. I'm not sure what they meant by "trade", but buying, selling and worth commands work fine and as expected. That crash simply looks like a game issue. A search of the Keen forums shows the same issue occurred for other people in 2015/2016, and no evidence that our mod was even involved.

I'm closing this issue.