I know a little bit of theory and im fairly good at bass. i can play many songs and i would say that my fingers are pretty disciplined. i know a few scales and many chords. however whenever im put on the spot to jam with my friends drummer, i go braindead and i cant play anything . i usually end up just playing the root note and that some random progression. but i know that i am way better than this.

what is my problem?

is there more for me to learn?
am i just subconsiously shy?

has anyone else had this problem? and also what can i do that will help me escape this problem. whether its a musical or a psychological issue.

i hope that i can learn something from this.
I think you need to step out of your comfort zone and just jam. Don't be scared to play "wrong" notes. Try something new and go with it. If it doesn't sound good, don't play it again. Jamming is all about making mistakes and learning from them.
Jesus loves you.
Scales, my friend.

Practice your scales every day. Up and down the neck, all of the time. I'm not suggesting that you learn them. I am suggesting you digest them untill they are completely subconscious.

Once that has happened, pay attention to the minor/major 3rd and 7th of each chord you are playing over. These (including the 5th on occasion) allow for chord changes in a single-note melody. Once you have all of those sounds in your ear you just start figuring ways to connect all of the important notes of each chord.

The way you connect the different notes depends on the style of music you are playing.
There may be times when it is impossible to prevent injustice, but there should never be a time when we fail to protest it.

Take a trip down the Scenic River

Call me Charlie.