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

Junction manager fails to remove some rules when unloading #636

Closed
kianzarrin opened this issue Feb 2, 2020 · 0 comments · Fixed by #637
Closed

Junction manager fails to remove some rules when unloading #636

kianzarrin opened this issue Feb 2, 2020 · 0 comments · Fixed by #637
Labels
BUG Defect detected LABS TM:PE LABS branch STABLE TM:PE STABLE branch technical Tasks that need to be performed in order to improve quality and maintainability
Milestone

Comments

@kianzarrin
Copy link
Collaborator

kianzarrin commented Feb 2, 2020

how to reproduce

I created a + junction (thats 4 segments at at a node then:

  • made no TMPE traffic rule changes
  • saved the game as LoadTest0
  • loaded LoadTest0 *
  • worked as expected
  • toggled all rules on all 4 segments using only Junction restriction tool.
  • loaded LoadTest0 *
  • *** only one segment had lost its traffic rules (expected all to loose their traffic rules) see screanshot
  • re-applied all traffic rules
  • saved as LoadTestJM
  • loaded LoadTestJM *
  • *** all traffic rules stayed in place (as expected
  • activated TMPE rules using prioirty sings tool, lane connector, parking tool.
  • saved as LoadTestAll
  • loaded LoadTest0 *
  • *** All TMPE rules had disappeared expect Junction restrictions. the result looked exactly like the screanshot bellow
  • Note this bug is reproducible with or without exiting to the main menu. Exiting to desktop solves the problem

Screenshot (382)

###Log:
TMPE threw no exception. I saw nothing unusual.

EDIT:
###Code:

            for (int i = 0; i < segmentFlags_.Length; ++i) {
                segmentFlags_[i].Reset(true); 
            }
            public void Reset(bool? startNode = null, bool resetDefaults = true);

Conclusion:

Junction manger and only junction manger fails to remove all traffic rules when unloading. ~~i think it gives up after doing it only for one segment. ~~

###reason
The code confuses resetDefaults with startNode and resets only start node.

@kianzarrin kianzarrin added BUG Defect detected triage Awaiting issue categorisation labels Feb 2, 2020
@originalfoo originalfoo added this to the 11.0 milestone Feb 2, 2020
@originalfoo originalfoo added LABS TM:PE LABS branch STABLE TM:PE STABLE branch technical Tasks that need to be performed in order to improve quality and maintainability and removed triage Awaiting issue categorisation labels Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected LABS TM:PE LABS branch STABLE TM:PE STABLE branch technical Tasks that need to be performed in order to improve quality and maintainability
Projects
None yet
2 participants