I feel there is a language barrier.
First: when I set the log level in Administration >> Log files maintenance to either Debug or Trace, nothing gets logged.
Second: what I sent to you is the fulles possible trace of a PHP calling stack. Let me expand one entry from it.
STACK: 46:/home/projeqtor/projeqtor/model/PlannedWork.php 2282; PlannedWork::reverse
This is the 46th call on the stack of the recursive function PlannedWork::reverse, which is at the 2282nd line of model/PlannedWork.php.
Following is the arguments of the reverse() function:
This is the first argument, called $nodeId.
The second argument is called &$cp (ref to $cp I guess), which is a large array of tasks(?) ordered reversed by end date(?). A sample:
array(3) {
["node"]=> array(40) {
["S"]=> array(4) {
["early"]=> string(10) "2023-01-09"
["late"]=> NULL
["before"]=> array(0) { }
["after"]=> array(10) {
[0]=> string(6) "S-S#20"
[1]=> string(5) "S-S#5"
[2]=> string(5) "S-S#9"
[3]=> string(6) "S-S#10"
[4]=> string(6) "S-S#11"
[5]=> string(6) "S-S#12"
[6]=> string(6) "S-S#16"
[7]=> string(6) "S-S#17"
[8]=> string(6) "S-S#19"
[9]=> string(6) "S-S#21"
}
}
["E"]=> array(4) {
["early"]=> string(10) "2023-11-01"
["late"]=> string(10) "2023-11-01"
["before"]=> array(7) {
[0]=> string(5) "E#8-E"
[1]=> string(5) "E#9-E"
[2]=> string(6) "E#10-E"
[3]=> string(6) "E#11-E"
[4]=> string(6) "E#12-E"
[5]=> string(6) "E#16-E"
[6]=> string(6) "E#17-E"
}
["after"]=> array(0) { }
}
["S#3"]=> array(4) {
["early"]=> string(10) "2023-08-01"
["late"]=> string(10) "2023-07-14"
["before"]=> array(1) {
[0]=> string(6) "#21-#3"
}
["after"]=> array(1) {
[0]=> string(2) "#3"
}
}
["E#3"]=> array(4) {
["early"]=> string(10) "2023-10-16"
["late"]=> string(10) "2023-09-28"
["before"]=> array(1) {
[0]=> string(2) "#3"
}
["after"]=> array(1) {
[0]=> string(5) "#3-#4"
}
}
["E#21"]=> array(4) {
["early"]=> string(10) "2023-08-01"
["late"]=> string(10) "2023-07-14"
["before"]=> array(1) {
[0]=> string(3) "#21"
}
["after"]=> array(1) {
[0]=> string(6) "#21-#3"
}
}
["S#20"]=> array(4) {
["early"]=> string(10) "2023-10-16"
["late"]=> string(10) "2023-09-28"
["before"]=> array(0) {
}
["after"]=> array(1) {
[0]=> string(3) "#20"
}
}
["E#20"]=> array(4) {
["early"]=> string(10) "2023-10-16"
["late"]=> string(10) "2023-09-28"
["before"]=> array(1) {
[0]=> string(3) "#20"
}
["after"]=> array(1) {
[0]=> string(6) "#20-#4"
}
}
["S#4"]=> array(4) {
["early"]=> string(10) "2023-09-28"
["late"]=> string(10) "2023-09-29"
["before"]=> array(2) {
[0]=> string(5) "#3-#4"
[1]=> string(6) "#20-#4"
}
["after"]=> array(1) {
[0]=> string(2) "#4"
}
}
["E#4"]=> array(4) {
["early"]=> string(10) "2023-10-30"
["late"]=> string(10) "2023-10-31"
["before"]=> array(1) {
[0]=> string(2) "#4"
}
["after"]=> array(1) {
[0]=> string(5) "#4-#8"
}
}
["S#5"]=> array(4) {
["early"]=> string(10) "2023-09-28"
["late"]=> string(10) "2023-08-10"
["before"]=> array(0) { }
["after"]=> array(1) {
[0]=> string(2) "#5"
}
}
["E#5"]=> array(4) {
["early"]=> string(10) "2023-10-04"
["late"]=> string(10) "2023-08-08"
["before"]=> array(1) {
[0]=> string(2) "#5"
}
["after"]=> array(3) {
[0]=> string(5) "#5-#6"
[1]=> string(5) "#5-#8"
[2]=> string(6) "#5-#13"
}
}
["S#6"]=> array(4) {
["early"]=> string(10) "2023-10-05"
["late"]=> string(10) "2023-08-09"
["before"]=> array(1) {
[0]=> string(5) "#5-#6"
}
["after"]=> array(1) {
[0]=> string(2) "#6"
}
}
["E#6"]=> array(4) {
["early"]=> string(10) "2023-10-08"
["late"]=> string(10) "2023-08-11"
["before"]=> array(2) {
[0]=> string(2) "#6"
[1]=> string(6) "#6-#19"
}
["after"]=> array(4) {
[0]=> string(6) "#6-#14"
[1]=> string(6) "#6-#18"
[2]=> string(5) "#6-#7"
[3]=> string(5) "#6-#8"
}
}
And the last argument is the $idProject:
["TEST"]=>
string(2) "OK"
}
int(2)
The file is a serialized output of standard php debug_print_backtrace(), and I appended the code to deserialize it for you. From then on you have a structured object of the dump, which you can freely display. I have added a simple code to dump only the calls, but above I have showed you that you have the
full stack trace of the endless recursive call.
Unfortunately I do not know what you call "E#13" or "S#15", as they do not seem to correlate with Activity id's, but you can see all the args, all the relations the reverse planner tried to resolve and failed, and you may able to spot (unlike me) what could possibly the bug in reverse planner which tries to infinitely recourse the args.
I would guess a developer only need to check one step (probably one from the end, like the above mentioned call 46, which is quite late in the recursion) to see where is the loop, and how reverse() could detect and prevent that.
Again, I am not php programmer, so it would take me much more time to reverse engineer PlannedWork.php than a developer of ProjeQtOr, that's why I kindly ask you to show the stack trace to a developer to make it possible to see the problem.
I do not know why the log does not log anything during this process, neither in Debug nor in Trace settings (and I have restored the original state of my modified code parts; it logs, for example, trace log from consistency checking): I only have apache telling me that it have crashed:
[Wed Oct 25 09:11:34.955321 2023] [php:error] [pid 1375439] [client 10.73.8.1:52436] PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 262144 bytes) in /home/projeqtor/projeqtor/model/persistence/SqlElement.php on line 786, referer: https://projeqtor/view/main.php