Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

[SOLVED] cyclic dep...
 
Notifications
Clear all

[SOLVED] cyclic dependencies via parents - creating a stack overflow

3 Posts
2 Users
0 Reactions
3,196 Views
(@matthiaspnowak)
Posts: 4
Active Member
Topic starter
 
[#3082]

One user entered dependencies in the project, effectively disabling the planning functionality.

He created a milestone. Then an activity with a successor link to that milestone. A sub-activity had the same milestone as a predecessor. This created a cycle via a parent.

When pressing the planning button - i get no response, probably there is a stack overflow message on the remote server. Using traceLog i was able to pinpoint the problem.

In model/PlanningElement in the function initializeFullList($list) there is a call to a recursive function self::getRecursivePredecessor($directPredecessors,...) which keeps running and probably running out of space.

What is the best idea and place to discover cycles in the planning structure?


 
Posted : 22 Feb 2016 18H51
(@matthiaspnowak)
Posts: 4
Active Member
Topic starter
 

(third trial to add my solution)

I added a check to the getRecursivePredecessor function in PlanningElement.php The added argument $visited keeps tabs on which $idPrec are already visited. Therefore it will prevent a stack overflow. It seems that the dependency check also used this function and wasn't able to discover a cycle due to the stack overflow.


 
Posted : 23 Feb 2016 13H34
babynus
(@babynus)
Posts: 14966
Main Contributor Admin
 

Hi,

Great.
Tanks for the fix : it will ensure that planning will wotk on any cases.

On my side, I worked on fixing dependency loop control to avoid this use case.
Will be included in V5.3


 
Posted : 24 Feb 2016 20H32
Share:

Scroll to Top