I am getting the following error message in my code:

Error: XtPopdown requires a subclass of ShellWidget class"

My code uses openmotif libraries and the code crashes with this error at different places of the code at different times. I have no clue how to solve this problem. Can anyone help me out?