I remember this is an issue in some other episodes, but at least in the episode The Big GoodbyeThe Big Goodbye it definitely happens.
Picard and some crew members are in the holodeck in a program. A computer malfunction occurs and they can't leave the holodeck. I understand this, because they cant see the exit and have no access to a terminal or something else and the computer does not react to voice commands.
But Riker, Wesley and Geordi try to open the holodeck from the outside. Because the computer has a malfunction they can not open the door and need to repair the computer.
But why can't they open the door in a mechanical way (manual emergency switch) or by force (phaser, some tools) or just beam them out (maybe beaming does not work because of the computer malfunction or some holodeck-restrictions, but it is not mentioned in the episode).
Are the holodeck doors somehow secured by force fields or by some special unbreakable materials or is there a danger to people in the program when the door is opened by force when the program is running? Wesley mentions something that everybody will disappear if he does not repair the computer, but doesn't that disagree with the canon about how holodecks work?
As said, I am not sure, but I remember there were some more episodes with the same issue (maybe the Moriarty ones, but then the situation was more complicated because Moriarty controlled the ship).
An out-of-universe answer is easy: if they could open the door, the episode would have been boring and short. But was there ever an in-universe answer about the problems with opening the holodeck from outside without the computer?
Edit: If the people inside would die because of this, then why would they die? We often see the holodock still running when the door is open...