If this is not a question of misjudged intent, and probably after trying to clear it up with your immediate manager (but be subtle/diplomatic about it), I would consider my future with that company.
The other thing to note is that us tech managers are notoriously bad at people skills. It's possible both your manager and your manager's boss think you're doing great work most of the time, and say nothing, and just say something when they feel it needs improvement. So on the whole they think highly of you despite your perception that they are critical. Again, a more open talk with your manager, while being a little careful, should help clarify this. This is a good conversation to have after you've accomplished a major goal (like "pretty much done"). Just ask for feedback in a neutral way, don't accuse anyone of anything... If you get great feedback, it's a good time to ask for a raise or a bonus if you feel you deserve that! If you're not having these conversations it's really hard to gauge what people are really thinking...
Good luck!