Got it. I thought about that as well. The first run was done in some old Adidas Climacool shoes, which were not specifically for trail running. I thought I better buy something more appropriate and the following training run + the race were done in these Columbia Ravenous Lite:
Different color than the ones in the link, but the shoes are the same.
No...nobody analyzed the way I run, and I doubt such service is common around here. My girlfriend is a much more frequent runner than myself (she ran a marathon this year) so she buys running shoes much more often than I do and she never had such service when buying shoes so...I think she just knows what works by now. I run so rarely "just for running" that I usually just grab what lies around...or run in my old tennis shoes. Until now...that is...when I bought these "trail running" things...
Guess I could film myself though...just to find out.
I never had my gait analyzed either. Just learned what I need by trial and error. During this period (which is long ago for me), I suffered the knee pain you speak of, until I "hit on" the right type of shoes (neutral).
As a road runner, I also get that pain if I run on the side of the road instead of the sidewalk. This is because the side of the road is sloped so the water will drain into the sewer. So maybe its just because you were doing a lot of running on uneven, sloped surfaces.