How do I debug X protocol errors (e.g., BadWindow, BadMatch) in Motif applications?
http://www.rahul.net/kenton/perrors.html Here are two common problems. First, if you get a BadWindow error showing a 0x0 window ID, you’re probably calling XtWindow() on a widget that is not realized. See the previous subject. Second, a BadMatch error often indicates that the depth of a window or a pixmap is not correct. You could be using a depth 1 pixmap when you should be using a pixmap with the depth of the associated window. Or, you could be creating a new shell with a depth that does not match its visual type or colormap. Ken Lee, http://www.rahul.net/kenton/ —————————————————————————– Subject: 326) Why doesn’t XtNameToWidget (widget, “MyName”) work? [Last modified: Apr 95] Answer: The second argument must be a qualified specification (like a resource specification). In most cases, you’ll use something like “*MyName”. The leading ‘*’ is required. Ken Lee, http://www.rahul.net/kenton/ ———————————————-