Ticket #444 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

Display error when entering #\

Reported by: gz Owned by: gb
Priority: major Milestone: Cocoa IDE v1
Component: IDE Version:
Keywords: Cc:

Description

I get this fairly often when editing a file with lot of character constants, like format.lisp. In this case I was typing on a fresh line in the middle of a function: " (format scan-check #" and then I typed a backslash, but it crashed before the backslash got displayed. Below is the entire contents of the AltConsole window that popped up:

*** Error in event process: Array index 35 out of bounds for "  (format-scan-check #\\" .

  0: (:INTERNAL GUI::|-[HemlockTextView drawRect:]|) at pc +149
     Arguments: (#:G25462)
       #:G25462: #<SIMPLE-ERROR Array index 35 out of bounds for "  (format-scan-check #\\" . #x300041E3CEAD>
     Local bindings:
       #:COMPILER-VAR: (NIL)
       #:G25459: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFC8A0>

  1: SIGNAL at pc +981
     Arguments: (CONDITION &REST CCL::ARGS)
       CONDITION: #<SIMPLE-ERROR Array index 35 out of bounds for "  (format-scan-check #\\" . #x300041E3CEAD>
       CCL::ARGS: NIL
     Local bindings:
       CCL::%HANDLERS%: ((ERROR) (ERROR))
       CCL::TAG: #<SIMPLE-ERROR Array index 35 out of bounds for "  (format-scan-check #\\" . #x300041E3CEAD>
       CCL::HANDLERS: CCL::*BACKTRACE-CONTEXTS*
       CCL::FN: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextView drawRect:]|) #x493DBF>

  2: %ERROR at pc +117
     Arguments: (CONDITION CCL::ARGS CCL::ERROR-POINTER)
       CONDITION: #<SIMPLE-ERROR Array index 35 out of bounds for "  (format-scan-check #\\" . #x300041E3CEAD>
       CCL::ARGS: (35 "  (format-scan-check #\\")
       CCL::ERROR-POINTER: 558478

  3: (:INTERNAL CCL::%XERR-DISP) at pc +2485
     Arguments: ()
     Local bindings:
       CCL::FRAME-PTR: 558478
       CCL::FN: #<Compiled-function HEMLOCK-INTERFACE:LINE-CHARACTER #x30004140F18F>
       CCL::OP0: 205
       CCL::OP1: 200
       CCL::OP2: 254
       CCL::SKIP: -1
       CCL::XP: #<A Foreign Pointer #x7FFF5FBFC540>
       CCL::XCF: #<A Foreign Pointer #x442C70>

  4: FUNCALL-WITH-ERROR-REENTRY-DETECTION at pc +181
     Arguments: (CCL::THUNK)
       CCL::THUNK: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%XERR-DISP) #x493CCF>
     Local bindings:
       COUNT: 0
       CCL::*ERROR-REENTRY-COUNT*: 0

  5: CCL::%XERR-DISP at pc +501
     Arguments: (#:G128837)
       #:G128837: 17591849973666
     Local bindings:
       #:G128847: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFBD10>
       CCL::XCF: #<A Foreign Pointer #x442C70>
       CCL::XP: #<A Foreign Pointer #x7FFF5FBFC540>
       #:G128848: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%XERR-DISP) #x493CCF>

  6: %PASCAL-FUNCTIONS% at pc +397
     Arguments: (CCL::INDEX CCL::ARGS-PTR-FIXNUM)
       CCL::INDEX: 2
       CCL::ARGS-PTR-FIXNUM: 17591849973666
     Local bindings:
       CCL::LISP-FUNCTION: #<Compiled-function CCL::

(it just ends here)

Change History

comment:1 Changed 5 years ago by gb

  • Status changed from new to closed
  • Resolution set to worksforme

I can't reproduce this in the trunk as of r12125, though I don't remember any specific change that might have fixed it.

comment:2 Changed 5 years ago by gz

  • Status changed from closed to reopened
  • Resolution worksforme deleted

Just happened to me again, 1.4-dev-r12724, full backtrace this time:

1 > (:b :show-frame-contents t)
  0: (:INTERNAL GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|) at pc +141
     Arguments: (#:G27224)
       #:G27224: #<SIMPLE-ERROR  Array index 35 out of bounds for "        (write-char #\\" . #x300042E8DDFD>
     Local bindings:
       #:COMPILER-VAR: (NIL)
       #:G27222: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFE810>

  1: SIGNAL at pc +973
     Arguments: (CONDITION &REST CCL::ARGS)
       CONDITION: #<SIMPLE-ERROR  Array index 35 out of bounds for "        (write-char #\\" . #x300042E8DDFD>
       CCL::ARGS: NIL
     Local bindings:
       CCL::%HANDLERS%: ((CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView keyDown:]|) #x493BDF>) (CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[LispApplication sendEvent:]|) #x493D6F>))
       CCL::TAG: (CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|) #x49365F>)
       CCL::HANDLERS: (CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|) #x49365F>)
       CCL::FN: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|) #x49365F>

  2: %ERROR at pc +117
     Arguments: (CONDITION CCL::ARGS CCL::ERROR-POINTER)
       CONDITION: #<SIMPLE-ERROR  Array index 35 out of bounds for "        (write-char #\\" . #x300042E8DDFD>
       CCL::ARGS: (35 "        (write-char #\\")
       CCL::ERROR-POINTER: 558268

  3: (:INTERNAL CCL::%XERR-DISP) at pc +2701
     Arguments: ()
     Local bindings:
       CCL::FRAME-PTR: 558268
       CCL::FN: #<Compiled-function HEMLOCK-INTERFACE:LINE-CHARACTER #x300041C579AF>
       CCL::OP0: 205
       CCL::OP1: 200
       CCL::OP2: 254
       CCL::SKIP: -1
       CCL::XP: #<A Foreign Pointer #x7FFF5FBFE4E0>
       CCL::XCF: #<A Foreign Pointer #x4425E0>

  4: FUNCALL-WITH-ERROR-REENTRY-DETECTION at pc +181
     Arguments: (CCL::THUNK)
       CCL::THUNK: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%XERR-DISP) #x49356F>
     Local bindings:
       COUNT: 0
       CCL::*ERROR-REENTRY-COUNT*: 0

  5: CCL::%XERR-DISP at pc +501
     Arguments: (#:G138660)
       #:G138660: 17591849974678
     Local bindings:
       #:G138669: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFDCB0>
       CCL::XP: #<A Foreign Pointer #x7FFF5FBFE4E0>
       CCL::XCF: #<A Foreign Pointer #x4425E0>
       #:G138670: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL CCL::%XERR-DISP) #x49356F>

  6: %PASCAL-FUNCTIONS% at pc +365
     Arguments: (CCL::INDEX CCL::ARGS-PTR-FIXNUM)
       CCL::INDEX: 2
       CCL::ARGS-PTR-FIXNUM: 17591849974678
     Local bindings:
       CCL::LISP-FUNCTION: #<Compiled-function CCL::%XERR-DISP (Non-Global)  #x3000405E1CAF>
       WITHOUT-INTERRUPTS: NIL
       CCL::*CALLBACK-TRACE-P*: NIL

  7: <non-function frame> at pc NIL#<error printing args and locals>

  8: LINE-CHARACTER at pc +743 [Exception]
     Arguments: (HI:LINE HI::INDEX)
       HI:LINE: #<Hemlock Line "        (write-char #\">
       HI::INDEX: 35
     Local bindings:
       HI::CHARS: "        (write-char #\\"

  9: SET-TEMPORARY-CHARACTER-ATTRIBUTES at pc +941
     Arguments: (GUI::LAYOUT GUI::POS GUI::START-LINE GUI::END-LINE)
       GUI::LAYOUT: #<NS-LAYOUT-MANAGER <NSLayoutManager: 0x13058200>
    1 containers, text backing has 67726 characters
    selected character range {47944, 0} affinity: upstream granularity: character
    marked character range {67726, 0}
    Currently holding 67726 glyphs.
    Glyph tree contents:  67726 characters, 67726 glyphs, 50 nodes, 3200 node bytes, 71232 storage bytes, 74432 total bytes, 1.10 bytes per character, 1.10 bytes per glyph
    Layout tree contents:  67726 characters, 67726 glyphs, 67726 laid glyphs, 1902 laid line fragments, 22 nodes, 1408 node bytes, 249568 storage bytes, 250976 total bytes, 3.71 bytes per character, 3.71 bytes per glyph, 35.61 laid glyphs per laid line fragment, 131.95 bytes per laid line fragment
 (#x13058200)>
       GUI::POS: 46703
       GUI::START-LINE: #<Hemlock Line "          (values object (cons label instr) :static))">
       GUI::END-LINE: #<Hemlock Line "      (loop (if (null q) (return))">
     Local bindings:
       GUI::RANGE: "        (write-char #\\"
       GUI::COLOR-ATTRIBUTE: #<NS-MUTABLE-STRING "NSColor" (#x7FFF70308F68)>
       GUI::STRING-COLOR: #<NS-COLOR NSCalibratedRGBColorSpace 0 0 1 1 (#x1F4770)>
       GUI::COMMENT-COLOR: #<NS-COLOR NSCalibratedWhiteColorSpace 0.333333 1 (#x1F5C80)>
       GUI::P: 47922
       GUI::LINE: #<Hemlock Line "        (write-char #\">
       GUI::PARSE-INFO: #S(HEMLOCK::LISP-INFO :BEGINS-QUOTED NIL :ENDING-QUOTED NIL :RANGES-TO-IGNORE ((36 . 37) (32 . 33)) :NET-OPEN-PARENS 1 :NET-CLOSE-PARENS ...)
       #:G27341: ((32 . 33))
       GUI::R: (36 . 37)
       #:ARGS27343: #<CCL::DESTRUCTURE-STATE #x4935CD>
       GUI::ISTART: 35
       #:REST27344: 37

 10: #<STANDARD-METHOD GUI::COMPUTE-TEMPORARY-ATTRIBUTES (GUI::HEMLOCK-TEXTSTORAGE-TEXT-VIEW)> at pc +1773
     Arguments: (GUI::SELF)
       GUI::SELF: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x13058c50>
    Frame = {{0.00, 0.00}, {724.00, 22836.00}}, Bounds = {{0.00, 0.00}, {724.00, 22836.00}}
    Horizontally resizable: YES, Vertically resizable: YES
    MinSize = {682.00, 643.00}, MaxSize = {10000000.00, 10000000.00}
 (#x13058C50)>
     Local bindings:
       GUI::CONTAINER: #<NS-TEXT-CONTAINER <NSTextContainer: 0x13057e40> (#x13057E40)>
       GUI::SCROLLVIEW: #<NS-SCROLL-VIEW <NSScrollView: 0x13057530> (#x13057530)>
       GUI::CONTENTVIEW: #<TEXT-PANE-CLIP-VIEW <TextPaneClipView: 0x130596a0> (#x130596A0)>
       GUI::RECT: #<NS-RECT 682 X 643 @ 0,15360 [gcable] (#x17C427A0) #x300042E9C4CD>
       GUI::LAYOUT: #<NS-LAYOUT-MANAGER <NSLayoutManager: 0x13058200>
    1 containers, text backing has 67726 characters
    selected character range {47944, 0} affinity: upstream granularity: character
    marked character range {67726, 0}
    Currently holding 67726 glyphs.
    Glyph tree contents:  67726 characters, 67726 glyphs, 50 nodes, 3200 node bytes, 71232 storage bytes, 74432 total bytes, 1.10 bytes per character, 1.10 bytes per glyph
    Layout tree contents:  67726 characters, 67726 glyphs, 67726 laid glyphs, 1902 laid line fragments, 22 nodes, 1408 node bytes, 249568 storage bytes, 250976 total bytes, 3.71 bytes per character, 3.71 bytes per glyph, 35.61 laid glyphs per laid line fragment, 131.95 bytes per laid line fragment
 (#x13058200)>
       GUI::GLYPH-RANGE: #<NS-RANGE 46703/1975 [gcable] (#x130FBBA0) #x300042E9C45D>
       GUI::CHAR-RANGE: #<NS-RANGE 46703/1975 [gcable] (#x17C86E30) #x300042E9AFAD>
       GUI::START: 46703
       LENGTH: 1975
       GUI::TS: #<HEMLOCK-TEXT-STORAGE HemlockTextStorage : string <HemlockBufferString for #<Hemlock Buffer "describe.lisp /Users/gz/ClozureCL/svn/ccl-latest/lib/">> (#x1B06D0)>
       GUI::CACHE: #S(GUI::BUFFER-CACHE :BUFFER #<Hemlock Buffer "describe.lisp /Users/gz/ClozureCL/svn/ccl-latest/lib/"> :BUFLEN 67726 :WORKLINE #<Hemlock Line "      (write-char #\( stream)"> :WORKLINE-OFFSET 48678 :WORKLINE-LENGTH ...)
       HI::*CURRENT-BUFFER*: #<Hemlock Buffer "describe.lisp /Users/gz/ClozureCL/svn/ccl-latest/lib/">
       GUI::START-LINE: #<Hemlock Line "          (values object (cons label instr) :static))">
       GUI::START-OFFSET: 0
       GUI::END-LINE: #<Hemlock Line "      (write-char #\( stream)">

 11: #<STANDARD-METHOD GUI::UPDATE-PAREN-HIGHLIGHT (GUI::HEMLOCK-TEXTSTORAGE-TEXT-VIEW)> at pc +1221
     Arguments: (GUI::SELF)
       GUI::SELF: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x13058c50>
    Frame = {{0.00, 0.00}, {724.00, 22836.00}}, Bounds = {{0.00, 0.00}, {724.00, 22836.00}}
    Horizontally resizable: YES, Vertically resizable: YES
    MinSize = {682.00, 643.00}, MaxSize = {10000000.00, 10000000.00}
 (#x13058C50)>
     Local bindings:
       GUI::BUFFER: #<Hemlock Buffer "describe.lisp /Users/gz/ClozureCL/svn/ccl-latest/lib/">
       HI::*CURRENT-BUFFER*: #<Hemlock Buffer "describe.lisp /Users/gz/ClozureCL/svn/ccl-latest/lib/">
       GUI::POINT: #<Hemlock Mark "        (write-char #\^">

 12: GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]| at pc +781
     Arguments: (#:G27221)
       #:G27221: 17591849975042
     Local bindings:
       #:G27236: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFE810>
       #:G27222: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFE810>
       #:COMPILER-VAR: (NIL)
       #:G27226: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|) #x49365F>
       #:G27237: (CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|) #x49365F>)
       CCL::%HANDLERS%: ((CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]|) #x49365F>) (CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView keyDown:]|) #x493BDF>) (CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[LispApplication sendEvent:]|) #x493D6F>))
       GUI::SELF: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x13058c50>
    Frame = {{0.00, 0.00}, {724.00, 22836.00}}, Bounds = {{0.00, 0.00}, {724.00, 22836.00}}
    Horizontally resizable: YES, Vertically resizable: YES
    MinSize = {682.00, 643.00}, MaxSize = {10000000.00, 10000000.00}
 (#x13058C50)>
       GUI::POS: 47944
       LENGTH: 0
       GUI::AFFINITY: 1

 13: %PASCAL-FUNCTIONS% at pc +365
     Arguments: (CCL::INDEX CCL::ARGS-PTR-FIXNUM)
       CCL::INDEX: 78
       CCL::ARGS-PTR-FIXNUM: 17591849975042
     Local bindings:
       CCL::LISP-FUNCTION: #<Compiled-function GUI::|-[HemlockTextstorageTextView updateSelection:length:affinity:]| (Non-Global)  #x3000423651AF>
       WITHOUT-INTERRUPTS: NIL
       CCL::*CALLBACK-TRACE-P*: NIL

 14: <non-function frame> at pc NIL#<error printing args and locals>

 15: #<Anonymous Function #x300042365E5F> at pc +389
     Arguments: (#:G30990 #:G30991 CCL::ARG0 CCL::ARG1 CCL::ARG2)
       #:G30990: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x13058c50>
    Frame = {{0.00, 0.00}, {724.00, 22836.00}}, Bounds = {{0.00, 0.00}, {724.00, 22836.00}}
    Horizontally resizable: YES, Vertically resizable: YES
    MinSize = {682.00, 643.00}, MaxSize = {10000000.00, 10000000.00}
 (#x13058C50)>
       #:G30991: #S(CCL::OBJC-SELECTOR :NAME "updateSelection:length:affinity:" :%SEL #<A Foreign Pointer #x1A02D0>)
       CCL::ARG0: 47944
       CCL::ARG1: 0
       CCL::ARG2: 1

 16: (:INTERNAL CCL::SEND-UNAMBIGUOUS-MESSAGE (SHARED-INITIALIZE :AFTER (CCL::OBJC-DISPATCH-FUNCTION T))) at pc +485
     Arguments: (CCL::RECEIVER &REST CCL::ARGS)
       CCL::RECEIVER: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x13058c50>
    Frame = {{0.00, 0.00}, {724.00, 22836.00}}, Bounds = {{0.00, 0.00}, {724.00, 22836.00}}
    Horizontally resizable: YES, Vertically resizable: YES
    MinSize = {682.00, 643.00}, MaxSize = {10000000.00, 10000000.00}
 (#x13058C50)>
       CCL::ARGS: (47944 0 1)
     Local bindings:
       CCL::SELECTOR: #S(CCL::OBJC-SELECTOR :NAME "updateSelection:length:affinity:" :%SEL #<A Foreign Pointer #x1A02D0>)
       FUNCTION: #<Anonymous Function #x300042365E5F>

 17: FOR-EACH-TEXTVIEW-USING-STORAGE at pc +429
     Arguments: (GUI::TEXTSTORAGE GUI::F)
       GUI::TEXTSTORAGE: #<HEMLOCK-TEXT-STORAGE HemlockTextStorage : string <HemlockBufferString for #<Hemlock Buffer "describe.lisp /Users/gz/ClozureCL/svn/ccl-latest/lib/">> (#x1B06D0)>
       GUI::F: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL (GUI::UPDATE-HEMLOCK-SELECTION (GUI::HEMLOCK-TEXT-STORAGE))) #x300042E9C9EF>
     Local bindings:
       GUI::LAYOUTS: #<NS-MUTABLE-ARRAY (
    <NSLayoutManager: 0x13058200>
    1 containers, text backing has 67726 characters
    selected character range {47944, 0} affinity: upstream granularity: character
    marked character range {67726, 0}
    Currently holding 67726 glyphs.
    Glyph tree contents:  67726 characters, 67726 glyphs, 50 nodes, 3200 node bytes, 71232 storage bytes, 74432 total bytes, 1.10 bytes per character, 1.10 bytes per glyph
    Layout tree contents:  67726 characters, 67726 glyphs, 67726 laid glyphs, 1902 laid line fragments, 22 nodes, 1408 node bytes, 249568 storage bytes, 250976 total bytes, 3.71 bytes per character, 3.71 bytes per glyph, 35.61 laid glyphs per laid line fragment, 131.95 bytes per laid line fragment

) (#x1B0740)>
       #:G26621: 1
       GUI::I: 0
       GUI::LAYOUT: #<NS-LAYOUT-MANAGER <NSLayoutManager: 0x13058200>
    1 containers, text backing has 67726 characters
    selected character range {47944, 0} affinity: upstream granularity: character
    marked character range {67726, 0}
    Currently holding 67726 glyphs.
    Glyph tree contents:  67726 characters, 67726 glyphs, 50 nodes, 3200 node bytes, 71232 storage bytes, 74432 total bytes, 1.10 bytes per character, 1.10 bytes per glyph
    Layout tree contents:  67726 characters, 67726 glyphs, 67726 laid glyphs, 1902 laid line fragments, 22 nodes, 1408 node bytes, 249568 storage bytes, 250976 total bytes, 3.71 bytes per character, 3.71 bytes per glyph, 35.61 laid glyphs per laid line fragment, 131.95 bytes per laid line fragment
 (#x13058200)>
       GUI::CONTAINERS: #<NS-MUTABLE-ARRAY (
    <NSTextContainer: 0x13057e40>
) (#x130583B0)>
       #:G26623: 1
       GUI::J: 0
       GUI::CONTAINER: #<NS-TEXT-CONTAINER <NSTextContainer: 0x13057e40> (#x13057E40)>
       GUI::TV: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x13058c50>
    Frame = {{0.00, 0.00}, {724.00, 22836.00}}, Bounds = {{0.00, 0.00}, {724.00, 22836.00}}
    Horizontally resizable: YES, Vertically resizable: YES
    MinSize = {682.00, 643.00}, MaxSize = {10000000.00, 10000000.00}
 (#x13058C50)>

 18: INVOKE-MODIFYING-BUFFER-STORAGE at pc +277
     Arguments: (GUI::BUFFER GUI::THUNK)
       GUI::BUFFER: #<Hemlock Buffer "describe.lisp /Users/gz/ClozureCL/svn/ccl-latest/lib/">
       GUI::THUNK: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL (HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T))) #x300042E9DBAF>
     Local bindings:
       GUI::OLD: NIL

 19: #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T)> at pc +893
     Arguments: (HI::VIEW HI::KEY)
       HI::VIEW: #<HI:HEMLOCK-VIEW #x300042A1DF7D>
       HI::KEY: #<Key-Event \>
     Local bindings:
       #:ABORT-BREAK: #<RESTART ABORT-BREAK #x4939ED>
       #:ABORT: #<RESTART ABORT #x49399D>
       #:G12376: (#<RESTART ABORT #x49399D> #<RESTART ABORT-BREAK #x4939ED>)
       CCL::%RESTARTS%: ((#<RESTART ABORT #x49399D> #<RESTART ABORT-BREAK #x4939ED>) (#<RESTART ABORT #x493F3D>))
       HI::*CURRENT-VIEW*: #<HI:HEMLOCK-VIEW #x300042A1DF7D>
       HI::*CURRENT-BUFFER*: #<Hemlock Buffer "describe.lisp /Users/gz/ClozureCL/svn/ccl-latest/lib/">
       HI::*NEXT-VIEW-START*: NIL
       HI::TEXT-BUFFER: #<Hemlock Buffer "describe.lisp /Users/gz/ClozureCL/svn/ccl-latest/lib/">
       MOD: (1648 47943 . 47943)

 20: %CALL-NEXT-METHOD at pc +1005
     Arguments: (CCL::MAGIC &REST CCL::ARGS)
       CCL::MAGIC: (NIL #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T)> . 558467)
       CCL::ARGS: NIL
     Local bindings:
       CCL::NEXT-METHODS: (#<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T)>)
       CCL::ARGS: 558467
       CDR: NIL
       METHOD-FUNCTION: #<METHOD-FUNCTION HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T)>

 21: #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT :AROUND (HI:HEMLOCK-VIEW T)> at pc +173
     Arguments: (GUI::VIEW GUI::EVENT)
       GUI::VIEW: #<HI:HEMLOCK-VIEW #x300042A1DF7D>
       GUI::EVENT: #<Key-Event \>
     Local bindings:
       #:NEXT-METHOD-CONTEXT: (NIL #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T)> . 558467)
       #:G26879: #<NS-AUTORELEASE-POOL <NSAutoreleasePool: 0x130cf320> (#x130CF320)>

 22: %%STANDARD-COMBINED-METHOD-DCODE at pc +693
     Arguments: (CCL::METHODS CCL::ARGS)
       CCL::METHODS: (#<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT :AROUND (HI:HEMLOCK-VIEW T)> #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T)>)
       CCL::ARGS: 558467
     Local bindings:
       CCL::CAR-METHS: #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT :AROUND (HI:HEMLOCK-VIEW T)>
       CCL::CELL-2: (#<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T)> . 558467)
       CCL::MAGIC: (NIL #<STANDARD-METHOD HI::HANDLE-HEMLOCK-EVENT (HI:HEMLOCK-VIEW T)> . 558467)
       #:G103289: #<METHOD-FUNCTION HI::HANDLE-HEMLOCK-EVENT :AROUND (HI:HEMLOCK-VIEW T)>

 23: <non-function frame> at pc NIL#<error printing args and locals>

 24: GUI::|-[HemlockTextstorageTextView keyDown:]| at pc +1253
     Arguments: (#:G26845)
       #:G26845: 17591849975072
     Local bindings:
       #:G26860: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFE900>
       #:G26846: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFE900>
       #:COMPILER-VAR: (NIL)
       #:G26850: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView keyDown:]|) #x493BDF>
       #:G26861: (CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView keyDown:]|) #x493BDF>)
       CCL::%HANDLERS%: ((CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[HemlockTextstorageTextView keyDown:]|) #x493BDF>) (CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[LispApplication sendEvent:]|) #x493D6F>))
       GUI::SELF: #<HEMLOCK-TEXT-VIEW <HemlockTextView: 0x13058c50>
    Frame = {{0.00, 0.00}, {724.00, 22836.00}}, Bounds = {{0.00, 0.00}, {724.00, 22836.00}}
    Horizontally resizable: YES, Vertically resizable: YES
    MinSize = {682.00, 643.00}, MaxSize = {10000000.00, 10000000.00}
 (#x13058C50)>
       GUI::EVENT: #<NS-EVENT NSEvent: type=KeyDown loc=(0,708) time=5436224.3 flags=0x100 win=0x0 winNum=31883 ctxt=0x0 chars="\" unmodchars="\" repeat=0 keyCode=42 (#x17C676C0)>
       GUI::VIEW: #<HI:HEMLOCK-VIEW #x300042A1DF7D>
       GUI::QUOTE-P: NIL
       GUI::HEMLOCK-KEY: #<Key-Event \>

 25: %PASCAL-FUNCTIONS% at pc +365
     Arguments: (CCL::INDEX CCL::ARGS-PTR-FIXNUM)
       CCL::INDEX: 73
       CCL::ARGS-PTR-FIXNUM: 17591849975072
     Local bindings:
       CCL::LISP-FUNCTION: #<Compiled-function GUI::|-[HemlockTextstorageTextView keyDown:]| (Non-Global)  #x30004235661F>
       WITHOUT-INTERRUPTS: NIL
       CCL::*CALLBACK-TRACE-P*: NIL

 26: <non-function frame> at pc NIL#<error printing args and locals>

 27: #<Anonymous Function #x3000418EA2CF> at pc +365
     Arguments: (#:G5099 #:G5100 CCL::ARG0)
       #:G5099: #<A Foreign Pointer [stack-allocated] (:* (:STRUCT :OBJC_SUPER)) #x7FFF5FBFEDB0>
       #:G5100: #<A Foreign Pointer #x7FFF81A88D48>
       CCL::ARG0: #<NS-EVENT NSEvent: type=KeyDown loc=(0,708) time=5436224.3 flags=0x100 win=0x0 winNum=31883 ctxt=0x0 chars="\" unmodchars="\" repeat=0 keyCode=42 (#x17C676C0)>

 28: %CALL-NEXT-OBJC-METHOD at pc +773
     Arguments: (CCL::SELF CLASS CCL::SELECTOR CCL::SIG &REST CCL::ARGS)
       CCL::SELF: #<LISP-APPLICATION <LispApplication: 0x1cc3b0> (#x1CC3B0)>
       CLASS: #<OBJC:OBJC-CLASS GUI::LISP-APPLICATION (#x196510)>
       CCL::SELECTOR: #<A Foreign Pointer #x7FFF81A88D48>
       CCL::SIG: (:VOID :ID)
       CCL::ARGS: (#<NS-EVENT NSEvent: type=KeyDown loc=(0,708) time=5436224.3 flags=0x100 win=0x0 winNum=31883 ctxt=0x0 chars="\" unmodchars="\" repeat=0 keyCode=42 (#x17C676C0)>)
     Local bindings:
       CCL::S: #<A Foreign Pointer [stack-allocated] (:* (:STRUCT :OBJC_SUPER)) #x7FFF5FBFEDB0>
       CCL::SIGINFO: #S(CCL::OBJC-METHOD-SIGNATURE-INFO :TYPE-SIGNATURE (:VOID :ID) :FUNCTION #<Anonymous Function #x3000418EA67F> :SUPER-FUNCTION #<Anonymous Function #x3000418EA2CF>)
       FUNCTION: #<Anonymous Function #x3000418EA2CF>

 29: GUI::|-[LispApplication sendEvent:]| at pc +965
     Arguments: (#:G5921)
       #:G5921: 17591849975264
     Local bindings:
       #:G5936: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFEF00>
       #:G5922: #<A Foreign Pointer [stack-allocated] #x7FFF5FBFEF00>
       #:COMPILER-VAR: (NIL)
       #:G5926: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[LispApplication sendEvent:]|) #x493D6F>
       #:G5937: (CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[LispApplication sendEvent:]|) #x493D6F>)
       CCL::%HANDLERS%: ((CONDITION #<COMPILED-LEXICAL-CLOSURE (:INTERNAL GUI::|-[LispApplication sendEvent:]|) #x493D6F>))
       GUI::SELF: #<LISP-APPLICATION <LispApplication: 0x1cc3b0> (#x1CC3B0)>
       GUI::E: #<NS-EVENT NSEvent: type=KeyDown loc=(0,708) time=5436224.3 flags=0x100 win=0x0 winNum=31883 ctxt=0x0 chars="\" unmodchars="\" repeat=0 keyCode=42 (#x17C676C0)>
       CCL::ARGS: (#<NS-EVENT NSEvent: type=KeyDown loc=(0,708) time=5436224.3 flags=0x100 win=0x0 winNum=31883 ctxt=0x0 chars="\" unmodchars="\" repeat=0 keyCode=42 (#x17C676C0)>)

 30: %PASCAL-FUNCTIONS% at pc +365
     Arguments: (CCL::INDEX CCL::ARGS-PTR-FIXNUM)
       CCL::INDEX: 15
       CCL::ARGS-PTR-FIXNUM: 17591849975264
     Local bindings:
       CCL::LISP-FUNCTION: #<Compiled-function GUI::|-[LispApplication sendEvent:]| (Non-Global)  #x30004196D76F>
       WITHOUT-INTERRUPTS: NIL
       CCL::*CALLBACK-TRACE-P*: NIL

 31: <non-function frame> at pc NIL#<error printing args and locals>

 32: #<Anonymous Function #x300041822D2F> at pc +173
     Arguments: (#:G3349 #:G3350)
       #:G3349: #<LISP-APPLICATION <LispApplication: 0x1cc3b0> (#x1CC3B0)>
       #:G3350: #S(CCL::OBJC-SELECTOR :NAME "run" :%SEL #<A Foreign Pointer #x7FFF81B3FD68>)

 33: (:INTERNAL CCL::SEND-UNAMBIGUOUS-MESSAGE (SHARED-INITIALIZE :AFTER (CCL::OBJC-DISPATCH-FUNCTION T))) at pc +485
     Arguments: (CCL::RECEIVER &REST CCL::ARGS)
       CCL::RECEIVER: #<LISP-APPLICATION <LispApplication: 0x1cc3b0> (#x1CC3B0)>
       CCL::ARGS: NIL
     Local bindings:
       CCL::SELECTOR: #S(CCL::OBJC-SELECTOR :NAME "run" :%SEL #<A Foreign Pointer #x7FFF81B3FD68>)
       FUNCTION: #<Anonymous Function #x300041822D2F>

 34: EVENT-LOOP at pc +421
     Arguments: (&OPTIONAL GUI::END-TEST)
       GUI::END-TEST: NIL
     Local bindings:
       GUI::APP: #<LISP-APPLICATION <LispApplication: 0x1cc3b0> (#x1CC3B0)>
       GUI::THREAD: #<APPKIT-PROCESS Initial(0) [Active] #x3000404C091D>
       #:ABORT: #<RESTART ABORT #x493F3D>
       #:G8019: (#<RESTART ABORT #x493F3D>)
       CCL::%RESTARTS%: ((#<RESTART ABORT #x493F3D>))

1 > 

comment:3 Changed 5 years ago by gb

  • Owner changed from gz to gb
  • Status changed from reopened to new

We might want to fix backtrace (frame 7 above), too.

comment:4 Changed 5 years ago by gb

The syntax-highlighting code is looking at the lines that it thinks are onscreen and at the associated lisp parse info, trying to find strings and ;-comment regions (which are among the "regions to ignore" in the parse info. The line it's looking at (in frame 9) is:

       GUI::LINE: #<Hemlock Line "        (write-char #\">

which seems to be 22 characters long, and the parse info (with a newline embedded for readability) is:

       GUI::PARSE-INFO: #S(HEMLOCK::LISP-INFO :BEGINS-QUOTED NIL :ENDING-QUOTED NIL 
:RANGES-TO-IGNORE ((36 . 37) (32 . 33)) :NET-OPEN-PARENS 1 :NET-CLOSE-PARENS ...)

Both of those "ranges to ignore" seem to be beyond the end of the string, and the syntax-highlighting code is trying to look at the characters which precede and follow the ignored range to see if it describes a string or a ;-comment. (I'd guess that they may both describe something else, but don't know why they're out-of-bounds.)

So the syntax highlighting code needs to be less trusting of the ranges it sees, and whatever's generating the bogus ranges should be fixed.

(I'm not sure whether the Hemlock gap stuff is involved here.)

comment:5 Changed 4 years ago by gz

  • Status changed from new to closed
  • Resolution set to fixed

(In [13186]) A bunch of Hemlock Lisp mode changes:

  • Add parsing support for |symbol quoting| and #| nested comments |#. This fixes bug 421.
  • Change comment syntax coloring color from light gray to brown. Use it to color #| |# blocks as well as ;;; comments. Do NOT use it to color escaped symbol constituents.
  • Add support for moving over lisp forms without pre-parsing info, for use when pre-parsing info is not available. Use this to allow navigation (i.e. c-m-f et. al.) inside strings and comment (seems like there would have been a ticket for this but I didn't find one).
  • Make meta-. work inside comments
  • Extend double-click selection to work inside comments/strings, ditto for Enter. This fixes bug 503 and bug 509.
  • Fix a couple bugs in pre-parsing of lines with escape at end. This was the underlying cause of bug 444, so this fixes bug 444.
  • Make triple-click select symbols vs. words for double-click. This addresses bug 496.
  • parse-over-block: fix the constant reparsing of the first line.
  • set-temporary-character-attributes: do not force reparsing, as this is called a lot.
  • fix macroexpand commands to act in-lisp context
  • Init hemlock syntax attributes from ccl::%standard-readtable%
  • Replace Editor Compile Defun and Editor Evaluate Defun with Editor Execute Defun, and replace Editor Compile Region and Editor Evaluate Region with Editor Execute Expression.
  • Make the form selected by double-clicking be the same as the form used for execution and macroexpansion commands, and make it be more general. This fixes bug 577 and bug 65 and bug 188.
  • some other changes that I no longer remember because I had this checked out for way too long...
Note: See TracTickets for help on using tickets.