New to posting

So the other day i went out for a drive and then something happened, cant really remember/explain, but the car started revving by it self between 600rpm - 1500rpm then cut's out after about 20 seconds.

Some people said it was my maf sensor, changed this, didnt work, then changed my idle control valve as some said it could be this aswell, which this was a fault as it had stopped opening, but still hasnt sorted the problem but now i have this error code p0103 "mass or volume air flow circuit high input"
(Car is still revving by itself)

Edit been compression tested all fine

Please help