Example with a context (Wikipedia article):
A stack may be implemented to have a bounded capacity. If the stack is full and does not contain enough space to accept an entity to be pushed, the stack is then considered to be in an overflow state. The pop operation removes an item from the top of the stack. A pop either reveals previously concealed items or results in an empty stack, but, if the stack is empty, it goes into underflow state, which means no items are present in stack to be removed.
Could you please explain when we should use the word state with an article (countable noun) and when with no article (mass noun)? The meaning of the word state that I'm referring to here, of course, has to do with a particular condition that something is in at a specific time as in the usage example above that talks about software objects such as stacks that can change their state during their lifetime.