When glass objects in a bag, large box or chest break, other than fake gems, you might hear a muffled shatter. An egg gives a muffled cracking when it breaks. You will lose that object and will not know what it was.
Though you do get the Luck penalty for breaking a mirror even if it is in a box, you need not fear this when kicking open locked boxes because tools cannot be generated inside them.
Fake gems don't break[]
Prior to NetHack 3.2.0, a popular technique for identifying fake gems was dubbed "kickboxing": one would gather a large pile of gems, name all of them "fake red" or whatever color, dump them in a box, and then repeatedly kick the box until no more muffled shatters were heard. One would then retrieve the remaining gems and un-name them. In this way, the fake gems of all colors could be identified.
Starting with NetHack 3.2.0, fake gems no longer break. Thus "kickboxing" no longer works.