Mine stalled out at start up.....it would turn over...but wouldn't hold the idle.
The dealership narrowed it down to it being a Fuel Cord/harness.
The part #: 81802pa100
Only a $36.00 part...no idea where it is on the car though
It's at
www.Subaruparts.com
It might be worth a try.