#52 self_insert crashes from macro

release
closed-fixed
Alexander Mai
None
7
2001-08-09
2001-07-31
Scott Tringali
No

(Found by jf505@yahoo.de)

Calling self_insert from a macro crashes NEdit. Here's
a stack trace.

XLookupString, FP=11fffd6e0
_XimLookupMBText, FP=11fffd880
_XimLocalMbLookupString, FP=11fffd8d0
XmbLookupString, FP=11fffd900
XmImMbLookupString, FP=11fffd910
selfInsertAP, FP=11fffd940
callSubroutine, FP=11fffd9c0
ContinueMacro, FP=11fffdab0
ExecuteMacro, FP=11fffdb20
runMacro, FP=11fffdb70
DoMacro, FP=11fffdbd0
DoNamedMacroMenuCmd, FP=11fffdc20
macroMenuAP, FP=11fffdc40
XtCallActionProc, FP=11fffdc70
macroMenuCB, FP=11fffdce0
XtCallCallbackList, FP=11fffdd20
XmCreatePanedWindow, FP=11fffdd60
_XtMatchAtom, FP=11fffddf0
_XtMatchAtom, FP=11fffde40
_XtTranslateEvent, FP=11fffdf20
XtDispatchEventToWidget, FP=11fffdfc0
_XtOnGrabList, FP=11fffe2e0
XtDispatchEvent, FP=11fffe4b0
XtAppMainLoop, FP=11fffe4f0
main, FP=11fffe5c0
__start, FP=11fffee50

The synthetic event that is generated for a macro call
doesn't fill in the XKeyEvent structure completely.

Note that self_insert doesn't really make sense to call
from a macro file, use insert_string instead.

Still, NEdit should not crash. It should disallow
calling self_insert from the macro language, or have it
be a no-op.

Discussion

  • Alexander Mai
    Alexander Mai
    2001-08-02

    Logged In: YES
    user_id=15180

    CVS has now a patch which fixes the faked
    key event passed to those AP calls (which in
    turn fixes the crash at least on one system
    here).
    However if this macro is really not to be
    called that way it should be disabled. I
    leave this someone else ...

     
  • Scott Tringali
    Scott Tringali
    2001-08-06

    Logged In: YES
    user_id=11321

    Fix committed.

     
  • Scott Tringali
    Scott Tringali
    2001-08-06

    • assigned_to: nobody --> amai
    • status: open --> open-fixed
     
  • Scott Tringali
    Scott Tringali
    2001-08-09

    Logged In: YES
    user_id=11321

    Looks good. Thanks, Alexander. Closed.

     
  • Scott Tringali
    Scott Tringali
    2001-08-09

    • status: open-fixed --> closed-fixed