After running
caption("my text");sometimes the window is blank:

When I run the same code again, the cation text is visible.
Up to now I could not find an explanation when a caption text is displayed and when it's not.
Did anybody experience the same thing ?