Almost fly away during hover test

Today I did my third small hover test with my (first) 250 build. All was ok until about 5 min then the copter suddently increased throttle (not to max, I guess it just got stuck in the latest transmitter command) and flew over my head over the neighbors garden, still gaining altitude. First I put the throttle stick to minimum but it didn’t respond at all and once I realized I completely lost control over the copter I switched off the radio control. Eventually the copter came down but I don’t know exactly if it was because of me turning the radio off or because some kind of timeout. I found it in high grass, nothing is broken at all, a bit suprising considering the barometer says it went up to almost 30m.

Because it was just a small test I didn’t have any fail safe set up, but afterwards I checked that the receiver goes down to 900 (1075 is throttle all down) once I switch off the radio. So that will most likely be the cause for the fast descent. But why did it fly off with me only 3m away?

RCIN tells me all channel values start forming a horizontal line a moment before the ascent. It seems that all control suddenly freezes. RCOUT still has some variation, but less than before.
If this is the result of lost contact (maybe bad antenna orientation or interference with my 2.4Ghz wifi), why didn’t it failsafe to 900 until I turn the whole thing off?

I have a Turningy 9x.

Does anyone who knows how to read the logs have an idea?
Thanks in advance!

22 26.02.2017 17-26-04.bin (3.4 MB)

check the connection between your handset and rf module, if it lost the ppm from the handset then it would freeze the channels and not engage failsafe.

First up I notice you are running 3.4rc5 rather than the final stable release.
It might be wise to update to 3.4.5 and retest.

Having said that, I did notice you had an EKF2 IMU0 in-flight yaw alignment just prior to the flyaway.
This is the second log I have looked at this morning with the same problem.

The NKF2 filters flatline at about 50000 in the log when you switch mode, then at about 82500 there is a reset which is followed by the flyaway.
It is curious that there is an indicated mode change from Stabilise to Stabilise ?? when the EKF2 flatlines.
The RCIN is functional the whole time until you turn it off, just ignored it seems.

I would suggest:
Update to 3.4.5
Redo compass calibrations
Do your Motor/compass calibrations (yes. they are worth doing)
Setup your failsafe, although if the EKF has blown up I am not sure what good that will do.
Retest.

@George_Muirhead I checked it immediately after the crash, all responded fine.

@mboland Thanks for the detailed answer.
You are right, I should update the firmware.

I don’t know where this mode change came from, I didn’t do anything.

I haven’t done any compass calibration because I didn’t mount my GPS (+ compass) yet. I am not so confident mounting it when my quad behaves like that, or do you recommend to always use GPS?

By motor calibration, do you mean ESC calibration? To this day I did ESC, radio and accel calibration, the latter I re-do when I change something.

@Bennet by Compass/Motor calibration I mean what is described here about half way down the page.

A compass calibration is mandatory as far as I know.
How did you get around that?
You must calibrate the compass (Internal?)

I realized just now that my flight controller indeed has an internal compass. My understanding was that it is only used for auto-kind flight modes.
I updated to 3.4.5 successfully and calibrated the compass. I won’t be able to do anything on the copter for a week but I will eventually do the motor/compass calibration.

Thank you.