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

CalculateCornerException #881

Closed
kianzarrin opened this issue May 7, 2020 · 4 comments · Fixed by #883
Closed

CalculateCornerException #881

kianzarrin opened this issue May 7, 2020 · 4 comments · Fixed by #883
Assignees
Labels
BUG Defect detected confirmed Represents confirmed issue or bug Overlays Overlays, data vis, etc.
Milestone

Comments

@kianzarrin
Copy link
Collaborator

@krzychu124
i run 868 and I'm getting exception after loading savegame. I will try different one and also disable all mods to be sure it's not other mod or something

  at NetSegment.CalculateCorner (.NetInfo info, Vector3 startPos, Vector3 endPos, Vector3 startDir, Vector3 endDir, .NetInfo extraInfo1, Vector3 extraEndPos1, Vector3 extraStartDir1, Vector3 extraEndDir1, .NetInfo extraInfo2, Vector3 extraEndPos2, Vector3 extraStartDir2, Vector3 extraEndDir2, UInt16 ignoreSegmentID, UInt16 startNodeID, Boolean heightOffset, Boolean leftSide, UnityEngine.Vector3& cornerPos, UnityEngine.Vector3& cornerDirection, System.Boolean& smooth) [0x00000] in <filename unknown>:0 
  at NetSegment.CalculateCorner (UInt16 segmentID, Boolean heightOffset, Boolean start, Boolean leftSide, UnityEngine.Vector3& cornerPos, UnityEngine.Vector3& cornerDirection, System.Boolean& smooth) [0x00000] in <filename unknown>:0 
  at TrafficManager.Manager.Impl.ExtSegmentEndManager.CalculateCorners (UInt16 segmentId, Boolean startNode) [0x00000] in <filename unknown>:0 
  at TrafficManager.Manager.Impl.ExtSegmentEndManager.OnLevelLoading () [0x00000] in <filename unknown>:0 
  at TrafficManager.LoadingExtension.OnLevelLoaded (LoadMode mode) [0x00000] in <filename unknown>:0 
  at LoadingWrapper.OnLevelLoaded (UpdateMode mode) [0x00000] in <filename unknown>:0 
Rethrow as ModException: The Mod C:\Users\krzychu\AppData\Local\Colossal Order\Cities_Skylines\Addons\Mods\TrafficManager [CSUtil.CameraControl.dll, CSUtil.Commons.dll, TMPE.GenericGameBridge.dll, TMPE.API.dll, TMPE.CitiesGameBridge.dll, TrafficManager.dll] has caused an error

UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
LoadingWrapper:OnLevelLoaded(UpdateMode)
<LoadLevelComplete>c__Iterator9:MoveNext()
LoadingManager:Update()

works on new game, probably because of no roads touched by TM:PE code, loads game it saved when I started new game but throws exception when I'm starting particular savegame

I'm not sure if calculate corners doesn't need a little bit of refactor because of null check

I meant missing NetInfo from missing assets, which cause corners to throw exception ;) segments/nodes were still 'valid' from simulation aspect

@kvakvs that Nullptr with corners on null Netinfo, let me know if its a breaking problem, i'll address it asap

@kianzarrin kianzarrin added BUG Defect detected triage Awaiting issue categorisation labels May 7, 2020
@kianzarrin
Copy link
Collaborator Author

How can I get a null info? which asset is causing it. I want to sub to that asset so that I can reproduce the problem.

@originalfoo
Copy link
Member

It can be caused if the asset is removed perhaps? The segments/nodes might still be present (flagged created and not deleted), but not have an associated netinfo.

@kianzarrin
Copy link
Collaborator Author

I managed to reproduce the problem by loading a saved city with placed roads from which I had unsubed.

@kianzarrin
Copy link
Collaborator Author

fixed it by checking for IsSegmentValid

@originalfoo originalfoo added this to the 11.5.0 milestone May 7, 2020
@originalfoo originalfoo added confirmed Represents confirmed issue or bug Overlays Overlays, data vis, etc. and removed triage Awaiting issue categorisation labels May 7, 2020
@kianzarrin kianzarrin mentioned this issue May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected confirmed Represents confirmed issue or bug Overlays Overlays, data vis, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants