Opened 12 years ago

Closed 12 years ago

#121 closed defect (fixed)

C-h h a in hemlock window crashes the lisp on x86-64

Reported by: rme Owned by: gb
Priority: minor Milestone:
Component: IDE Version: 1.1
Keywords: Cc:



  1. start lisp.
  2. (require 'cocoa)
  3. command-N to make new hemlock editor window
  4. C-h h to get help popup window
  5. type "a"
  6. hot flaming death.
Unhandled exception 11 at 0x7fff82d3fa51, context->regs at #x7fff5fbfe960
Exception occurred while executing foreign code
? for help
[552] OpenMCL kernel debugger: b

Framepointer [#x7FFF5FBFEFF0] in unknown area.
[552] OpenMCL kernel debugger: p

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: 13 at address: 0x0000000000000000
0x00007fff82d3fa51 in objc_msgSend ()
(gdb) where
#0  0x00007fff82d3fa51 in objc_msgSend ()
#1  0x00007fff805bb647 in -[NSTextView insertText:replacementRange:] ()
#2  0x000000000000b8e7 in SPffcall () at ../x86-spentry64.s:3958
#3  0x00007fff805b297d in +[NSKeyBindingManager cancel] ()
#4  0x00007fff8312d584 in pthread_mutex_unlock ()
#5  0x00007fff82d313b6 in _class_lookupMethodAndLoadCache ()
#6  0x00007fff82d3dcc6 in _objc_fixupMessageRef ()
#7  0x00007fff82d3fbf7 in objc_msgSend_fixup ()
#8  0x000000000000be3e in SPcallback () at ../x86-spentry64.s:4473
#9  0x0000300040d93b3e in ?? ()

(gdb) info threads
  9 process 552 thread 0xdb03  0x00007fff831259aa in semaphore_timedwait_trap ()
  8 process 552 thread 0xd103  0x00007fff831557e6 in read ()
  7 process 552 thread 0xc203  SPsyscall () at ../x86-spentry64.s:4327
  5 process 552 thread 0xa303  0x00007fff831259aa in semaphore_timedwait_trap ()
  4 process 552 thread 0x6a03  0x00007fff8312c91e in __semwait_signal ()
  3 process 552 thread 0x4003  SPsyscall () at ../x86-spentry64.s:4327
  2 process 552 thread 0x1503  0x00007fff83125956 in mach_msg_trap ()
* 1 process 552 local thread 0x2f0b  0x00007fff82d3fa51 in objc_msgSend ()

Change History (1)

comment:1 Changed 12 years ago by gb

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

The textview in the popup window isn't editable, but key events directed to that view still go through #/insertText: (though the range is set to #$NSRangeNotFound.) We don't need to override #/insertText:, just need something to make the buffer editable and do an insertion.

(The fact that the editor is still waiting for the key event after the popup window appears suggests that the whole "editor help" UI needs to be a bit more ... real.)

In any case, key events when a "typeout window" has focus should be silently ignored, not a cause of hot flaming death. That should be fixed in r7550.

Note: See TracTickets for help on using tickets.