Copter 4.0.4 Crash after cancelling RTL to Loiter

After autotune session i’m doing flight test and testing the RTL flight mode, because di RTL landing position is not suitable (above the tree), I cancelled RTL by switching to Loiter and Althold. Motor shutdown at 20 meter height and crash.

After i look the data flash log i’ve noticed that EV status has landed and doing crash check at altitude 20meter and then the motor shutdown. Before the motor shutdown I managed to move the quadcopter pitch and roll to clear from the tree, so I’m pretty sure that i’m not crashing the tree.

Please help me analyzed my dataflash log to solve this issue so I can prevent this happen again.

this is my dataflash log bin file
https://drive.google.com/file/d/1L9ae23r9gmDLp4ErsqnKOL7NzECn8f4I/view?usp=sharing

It “correctly” detected crash due to too long, too big difference between pitch and desired pitch.
(it was unable to correct it in time.)

There is no attempt to raise throttle on the front motors fast enough, so I took a look at your PID’s during the flight:
ATC_RAT_RLL_P,0.04983379 #updated from 0.0862
ATC_RAT_RLL_I,0.04983379 #updated from 0.0862
ATC_RAT_RLL_D,0.00201774 #updated from 0.00337
ATC_ANG_RLL_P,9.70688248 #updated from 7.30000019
ATC_ACCEL_R_MAX,182839 #updated from 135000
ATC_RAT_PIT_P,0.04924557 #updated from 0.08561
ATC_RAT_PIT_I,0.04924557 #updated from 0.08561
ATC_RAT_PIT_D,0.00295207 #updated from 0.00519
ATC_ANG_PIT_P,1.0186044 #updated from 7.30000019

ATC_ANG_PIT_P og 1.0 … seems to be the problem. Roll axis got increased to 9.7 … pitch axis down to 1.0 ? - there is your problem. - how exectly that did happen is another thing…

thank you,
after the crash, i plug my computer to the quad and check the PID. the ATC_ANG_PIT_P still 7.3.
I did autotune for Pitch and Roll axis before the crash.

I don’t understand about pitch axis down to 1.0186044 and what cause this.
will do some research on that.