Help with strange Motif warning and crash? - Motif

This is a discussion on Help with strange Motif warning and crash? - Motif ; Hopefully some of you all can help me with this problem I have been seeing recently: "Registering a widget as a drop site out of sequence..." I think I understand the gist of this warning. However, we do not have ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Help with strange Motif warning and crash?

  1. Help with strange Motif warning and crash?

    Hopefully some of you all can help me with this problem I have been
    seeing recently:

    "Registering a widget as a drop site out of sequence..."

    I think I understand the gist of this warning. However, we do not have
    any of our own widgets registering themselves as drop sites, so I don't
    believe it's anything we are doing wrong.

    The worst thing about this problem is that we usually get a core dump
    almost immediately after this message is issued, with the DropSMgr.c
    functions all over the top of the stack (DestroyInfo, RemoveInfo, etc).
    The most common core is one when the DropSiteInfo is being destroyed
    when the widget is destroyed.

    The second worst part about this problem is that it appears to be
    random. It happens a lot, but not always with the same widgets or
    class of widgets. I've seen the first warning happen with the Text
    child of a combo box, the VertScrollbar child of a list, a text widget
    by itself, and others.

    This may be related - it's a bit difficult to figure out what's
    happening, but it seems like if I break in after this message is
    issued, the widget in question will be registered as a COMPOSITE drop
    site when I think it should be a SIMPLE drop site (none of these
    widgets have children).

    This is Motif 2.1 on Solaris 8/9. We use both Motif widgets and XRT
    widgets.

    Please, if anybody has seen this or has any idea what could be causing
    it, or any suggestions as to how to proceed from here, I am all ears.
    Thanks!

    Rob


  2. Re: Help with strange Motif warning and crash?

    You are probably using a widget whose initializer (or class
    initializer) registers a drop site. I suggest you to compile the
    program with debug information, run it under a debugger
    and show a backtrace after a crash.

    --- Casantos


  3. Re: Help with strange Motif warning and crash?

    I believe all XmText and XmTextField widgets register as drop sites.
    Also, it appears that some scrollbar widgets do. And the shells and
    some forms register as COMPOSITE drop sites.

    I've seen so many stacks after these crashes it's getting frustrating.
    I think that because the widgets that "cause" the warning are sort of
    random, and normally they are registered correctly, the problem is
    really happening beforehand, and some internal DropSite Manager memory
    or data structures are getting trashed. That would also explain the
    crashes when unregistering widgets as drop sites (from the destroy
    callback).


  4. Re: Help with strange Motif warning and crash?

    There's a resource that disables dragging completely, you can try
    setting that and see if it avoids the problem. Try changing
    XmNdragReceiverProtocolStyle and see what happens... maybe DRAG_NONE
    will help?

  5. Re: Help with strange Motif warning and crash?

    I did try that - it looks like all that does it set the
    XmNdropSiteActivity to XmDROP_SITE_INACTIVE for all registered drop
    sites.

    Today I noticed that there are often widgets registered as COMPOSITE
    drop sites without SIMPLE descendants. And sometimes these same
    widgets when I make the tree again won't be registered.

    And then I get the warning, find out that the warned-about widget is a
    COMPOSITE XmText widget, and it crashes shortly thereafter.

    All very strange.

    Rob


  6. Re: Help with strange Motif warning and crash?

    The most common crash that I can reproduce here is in the
    XmNdestroyCallback that the drop site manager registers, probably to
    free the XmDropSiteManager stuff for the widget.

    This kind of crash seems to _alway_ happens right after the warning,
    and the widget in question (in the warning and in the destroy callback)
    is marked as COMPOSITE when I think it should be SIMPLE (i.e. it's a
    text field or a scrollbar).


  7. Re: Help with strange Motif warning and crash?

    I think I may be on to something here. I am having luck commenting out
    one of my calls to XtUnmanageChild which I use to hide large portions
    of the widget tree. There are drop sites within the unmanaged tree.

    This "technique" actually works with both of the windows that I have
    seen the problem in.

    Now the question is: Can I fix this by modifying the individual
    windows? How can I prevent this from cropping up later in similar
    windows? Does it sound like an honest-to-goodness bug, or am I doing
    anything wrong?

    Rob


  8. Re: Help with strange Motif warning and crash?

    If you need to hide a widget tree, maybe XtSetMappedWhenManaged will
    work? Unmanaging removes it from the geometry calculations, and may be
    overkill depending on what you're doing.

    Another techinque is to unmanage a group of children, instead of a
    single higher-level widget - perhaps that will work around the bug.

+ Reply to Thread