Hmm ... Unfortunately the code you provide kind of breaks the contract of the showPopup() method. You are supposed to pass the parent Component (the one on which the popup is to be displayed) as the second param. In my understanding you're getting the error because the dummy panel isn't displayed. So what you'd really want is to pass the popup menu item itself, but as far as I know you can't get it via this API.
However, I'll discuss it with some other developers and see if there's a way to do it. If not you'll have to use a little window rather than a submenu, for the time being.
Regards,
Manne