#57 NEdit crash on startup: X_GrabKey

release
closed-fixed
None
5
2001-08-23
2001-08-09
No

If NEdit has an accelerator definition that conflicts
with the SawFish window manager, it will get a
BadAccess error on startup and exit. This is most
easily reproduced by defining a shell or macro menu
entry (say bound to F1) and then defining the same key
as an accelerator in the SawFish window manager
(via the shortcuts screen in the gnome control
center). The window manager grabs the key, and then
when NEdit attempts to grab the same key on startup
the BadAccess error results.

Discussion

  • Joor Loohuis

    Joor Loohuis - 2001-08-10

    Logged In: YES
    user_id=197101

    I reproduced the problem by assigning ctrl-s to a function
    under swafish. The error message is:

    X Error of failed request: BadAccess (attempt to access
    private resource denied)
    Major opcode of failed request: 33 (X_GrabKey)
    Serial number of failed request: 3539
    Current serial number in output stream: 3704

    It appears this only happens for shotcuts assigned in the
    'Global' and 'Window' contexts, but shortcuts are quite
    meaningless in the other contexts.

    I tested with netscape to see if I could reproduce the
    problem, but I couldn't. I assigned alt-s (save) in sawfish,
    and the result was that netscape apparently never received
    the key, making the function inaccessible. It did handle
    this gracefully.

    Are there similar problems with other window managers?

     
  • Scott Tringali

    Scott Tringali - 2001-08-18
    • milestone: --> release
     
  • Scott Tringali

    Scott Tringali - 2001-08-18

    Logged In: YES
    user_id=11321

    The problem appears to lie in the implementation of the
    CapsLock/NumLock fix, which does a few XtGrabKey for each
    accelerator.

    I've rewritten the CapsLock support so that it doesn't
    directly use Xt grabs. Instead, it simply patches the
    accelerator to pull in multiple keys, and lets Motif do the
    work.

    OSF's documentation is quite vague when it comes to
    accelerator support. So, the big question is whether this
    works with LessTif, OpenMotif, or even earlier versions of
    OSF Motif. This works apparently fine with OSF Motif 2.1.
    Please try out the patch and let me know if there are any
    problems.

     
  • Scott Tringali

    Scott Tringali - 2001-08-20
    • status: open --> open-fixed
     
  • Scott Tringali

    Scott Tringali - 2001-08-20

    Logged In: YES
    user_id=11321

    I think this is fixed now. I peeked at the Motif source to
    see what they do that avoids crashing. Turns out they don't
    do shell-level grabs, instead, they do it on the nearest
    Manager widget above the destination. This seems to do the
    trick. Please verify.

    Checking in window.c;
    /cvsroot/nedit/nedit/source/window.c,v <-- window.c
    new revision: 1.32; previous revision: 1.31
    done

    (The old patch works only on OSF Motif 2.x, not good enough
    for us.)

     
  • Nobody/Anonymous

    Logged In: NO

    Well as of 8/20/2001 RedHat nedit rpm crashed with the
    openmotif from MetroLink (openmotif-2.1.30-4_MLI.i386.rpm).
    It works OK with OSF 2.1 and I presume since RedHat is
    including lesstiff for motif with that too.

    Solution: recompile nedit from source rpm and the new rpm
    works with openmotif.

     
  • Alexander Mai

    Alexander Mai - 2001-08-23

    Logged In: YES
    user_id=15180

    Close it for now.
    If current code (=RC1) is buggy, someone should open up a new report ...

     
  • Alexander Mai

    Alexander Mai - 2001-08-23
    • assigned_to: nobody --> tringali
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks