unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1435: C-Click on a mode in the mode-line causes crash in MacOS X.
@ 2008-11-26 16:03 Jason Schadel
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Schadel @ 2008-11-26 16:03 UTC (permalink / raw)
  To: emacs-pretest-bug

When a Control-Click is made on a mode in the mode-line, emacs crashes  
with the error below.

Emacs Version Info
---------- Begin ----------
In GNU Emacs 23.0.60.1 (i386-apple-darwin9.5.0, NS apple-appkit-949.35)
  of 2008-11-26 on Jason-Schadels-MacBook-Pro.local
Windowing system distributor `Apple', version  
97.112.112.108.101.45.97.112.112.107.105.116.45.57.52.57.46.51.53
configured using `configure  '--with-ns' 'CFLAGS=-g''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: en_US.UTF-8
   value of $XMODIFIERS: nil
   locale-coding-system: utf-8-unix
   default-enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
   tooltip-mode: t
   mouse-wheel-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   global-auto-composition-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t
---------- End ----------

Debug Output
---------- Begin ----------
2008-11-26 09:23:10.993 Emacs[53741:813] *** -[EmacsView  
writeSelectionToPasteboard:types:]: unrecognized selector sent to  
instance 0x6c0cb50
2008-11-26 09:23:10.994 Emacs[53741:813] An uncaught exception was  
raised
2008-11-26 09:23:10.994 Emacs[53741:813] *** -[EmacsView  
writeSelectionToPasteboard:types:]: unrecognized selector sent to  
instance 0x6c0cb50
2008-11-26 09:23:10.995 Emacs[53741:813] *** Terminating app due to  
uncaught exception 'NSInvalidArgumentException', reason: '*** - 
[EmacsView writeSelectionToPasteboard:types:]: unrecognized selector  
sent to instance 0x6c0cb50'
2008-11-26 09:23:10.995 Emacs[53741:813] Stack: (
     2445988171,
     2434797115,
     2446017354,
     2446010700,
     2446010898,
     213437042,
     213435210,
     35150243,
     35150157,
     35760590,
     35148029,
     16540974,
     16539500,
     16539341,
     16539181,
     16538726,
     16538435,
     2702344,
     2706698,
     2718407,
     1470803,
     1429763,
     1477375,
     1414943,
     2056321,
     1412871,
     2054797,
     1412752,
     1410163,
     1410684,
     1403269,
     11666
)

Program received signal SIGTRAP, Trace/breakpoint trap.
0x91cacff4 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ ()
---------- End ----------

Full Backtrace
---------- Begin ----------
(gdb) bt full
#0  0x91cacff4 in ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ ()
No symbol table info available.
#1  0x91200e3b in objc_exception_throw ()
No symbol table info available.
#2  0x91cb434a in -[NSObject doesNotRecognizeSelector:] ()
No symbol table info available.
#3  0x91cb294c in ___forwarding___ ()
No symbol table info available.
#4  0x91cb2a12 in __forwarding_prep_0___ ()
No symbol table info available.
#5  0x0cb8ca72 in CopyCocoaTextSelection ()
No symbol table info available.
#6  0x0cb8c34a in QuickAddExamineContext ()
No symbol table info available.
#7  0x021859a3 in TContextualMenuPlugin::ExamineContext ()
No symbol table info available.
#8  0x0218594d in TContextualMenuPluginList::ExamineContext ()
No symbol table info available.
#9  0x0221a9ce in _ContextualMenuInsertItems ()
No symbol table info available.
#10 0x021850fd in _ContextualMenuInsertItems ()
No symbol table info available.
#11 0x00fc652e in _NSPopUpCarbonMenu3 ()
No symbol table info available.
#12 0x00fc5f6c in _NSPopUpCarbonMenu2 ()
No symbol table info available.
#13 0x00fc5ecd in _NSPopUpCarbonMenu1 ()
No symbol table info available.
#14 0x00fc5e2d in -[NSCarbonMenuImpl  
_popUpContextMenu:withEvent:forView:withFont:] ()
No symbol table info available.
#15 0x00fc5c66 in -[NSMenu  
_popUpContextMenu:withEvent:forView:withFont:] ()
No symbol table info available.
#16 0x00fc5b43 in -[NSMenu _popUpContextMenu:withEvent:forView:] ()
No symbol table info available.
#17 0x00293c08 in -[EmacsMenu runMenuAt:forFrame:keymaps:]  
(self=0xd722650, _cmd=0x2c3f96, p={x = 1018, y = 27}, f=0x48bb850,  
keymaps=1) at nsmenu.m:735
	view = (EmacsView *) 0x6c0cb50
	e = (NSEvent *) 0xf470410
	event = (NSEvent *) 0xf443ef0
	retVal = 2702481
#18 0x00294d0a in ns_popup_menu (position=87910205, menu=87930821) at  
nsmenu.m:1135
	pmenu = (EmacsMenu *) 0xd722650
	f = (struct frame *) 0x48bb850
	p = {
   x = 1018,
   y = 827
}
	window = 256341252
	x = 2432
	y = 3352
	tem = 92274697
	keymap = 73594421
	title = 100792459
	gcpro1 = {
   next = 0x9123ebf4,
   var = 0x0,
   nvars = 125773824
}
	specpdl_count = 2
	specpdl_count2 = 3
	error_name = 0x0
	keymaps = 1
	wv = (widget_value *) 0xd7225c0
	first_wv = (widget_value *) 0xf493b50
#19 0x00297ac7 in Fx_popup_menu (position=87910205, menu=87930821) at  
nsmenu.m:1922
No locals.
#20 0x00167153 in read_char_x_menu_prompt (nmaps=4, maps=0xbfffebd0,  
prev_event=87910205, used_mouse_menu=0xbfffed78) at keyboard.c:8493
	realmaps = (Lisp_Object *) 0xbfffe970
	value = 128190
	nmaps1 = 1
	mapno = 4
	name = 100792459
#21 0x0015d103 in read_char (commandflag=1, nmaps=4, maps=0xbfffebd0,  
prev_event=87910205, used_mouse_menu=0xbfffed78, end_time=0x0) at  
keyboard.c:2854
	c = 92274697
	count = 1510961
	jmpcount = 2
	local_getcjmp = {2491263, 0, 8099, 1426703, -1073746448, 0, 4,  
-1073746992, -1073747064, -1073747504, 102891551, 658, 1428558,  
92274711, 92274719, 71106591, 102891520, 55}
	save_jump = {-1073747192, 1513827, 92274697, 1, 1, 2502472, 92274697,  
92274697, 3478900, 70873573, 0, 1512657, 100440305, 92274697, 3650717,  
100440305, 73594421, 1951602}
	key_already_recorded = 0
	tem = 1473571
	save = -1073747128
	previous_echo_area_message = 92274697
	also_record = 92274697
	reread = 0
	gcpro1 = {
   next = 0x5800009,
   var = 0x10,
   nvars = 1512315
}
	gcpro2 = {
   next = 0x2,
   var = 0x58071a1,
   nvars = -1073747304
}
	polling_stopped_here = 0
	orig_kboard = (struct kboard *) 0x4846610
#22 0x00168aff in read_key_sequence (keybuf=0xbfffefa4, bufsize=30,  
prompt=92274697, dont_downcase_last=0, can_return_switch_frame=1,  
fix_current_buffer=1) at keyboard.c:9344
	interrupted_kboard = (KBOARD *) 0x4846610
	interrupted_frame = (struct frame *) 0x48bb850
	key = 87910205
	used_mouse_menu = 0
	echo_local_start = 0
	last_real_key_start = 2
	keys_local_start = 2
	local_first_binding = 2
	from_string = 235642243
	count = 2
	t = 2
	echo_start = 0
	keys_start = 0
	nmaps = 4
	nmaps_allocated = 4
	defs = (Lisp_Object * volatile) 0xbfffebb0
	submaps = (Lisp_Object * volatile) 0xbfffebd0
	orig_local_map = 3650693
	orig_keymap = 92274697
	localized_local_map = 1
	first_binding = 2
	first_unbound = 31
	mock_input = 2
	fkey = {
   parent = 71245389,
   map = 71245389,
   start = 2,
   end = 2
}
	keytran = {
   parent = 70733693,
   map = 70733693,
   start = 2,
   end = 2
}
	indec = {
   parent = 71245397,
   map = 71245397,
   start = 2,
   end = 2
}
	shift_translated = 0
	delayed_switch_frame = 92274697
	original_uppercase = -1073746408
	original_uppercase_position = -1
	dummyflag = 0
	starting_buffer = (struct buffer *) 0xc1c5d90
	fake_prefixed_keys = 87910197
	gcpro1 = {
   next = 0x622acd9,
   var = 0x5800009,
   nvars = 2
}
#23 0x0015971f in command_loop_1 () at keyboard.c:1621
	cmd = 102935769
	lose = 32
	nonundocount = 0
	keybuf = {92303801, 87910205, 0, 3250635, -1073746096, -1073745976,  
1492944, -1073745796, 1412030, -1073745912, 1412519, 224649653,  
92274745, -1073745882, 100794081, 152, 163, 125796672, 368690, 232,  
14, 0, 76265552, -1073746208, 1411579, -1073745816, 1411941,  
224649637, -1073745882, 70799261}
	i = 1
	prev_modiff = 9026
	prev_buffer = (struct buffer *) 0xc1c5d90
	already_adjusted = 0
#24 0x001f6081 in internal_condition_case (bfun=0x159271  
<command_loop_1>, handlers=92314385, hfun=0x1589ef <cmd_error>) at  
eval.c:1511
	val = 70799261
	c = {
   tag = 92274697,
   val = 92274697,
   next = 0xbffff16c,
   gcpro = 0x0,
   jmp = {-1073806465, 82, 8098, 2056032, 117522432, 2054597, 0, 0,  
-1073745624, -1073745808, 31, 658, 2056198, -1859256297, 31, 31, 0, 55},
   backlist = 0x0,
   handlerlist = 0x0,
   lisp_eval_depth = 0,
   pdlcount = 2,
   poll_suppress_count = 1,
   interrupt_input_blocked = 0,
   byte_stack = 0x0
}
	h = {
   handler = 92314385,
   var = 92274697,
   chosen_clause = 92274745,
   tag = 0xbffff0a8,
   next = 0x0
}
#25 0x00158f07 in command_loop_2 () at keyboard.c:1338
	val = 8368128
#26 0x001f5a8d in internal_catch (tag=92310457, func=0x158ed2  
<command_loop_2>, arg=92274697) at eval.c:1247
	c = {
   tag = 92310457,
   val = 92274697,
   next = 0x0,
   gcpro = 0x0,
   jmp = {-1859320961, 0, 8098, 2054597, -1859280203, 0, 0, 0,  
-1073745432, -1073745584, 92405791, 662, 2054782, 23, 92274719,  
-1073807329, 92405760, 92405815},
   backlist = 0x0,
   handlerlist = 0x0,
   lisp_eval_depth = 0,
   pdlcount = 2,
   poll_suppress_count = 1,
   interrupt_input_blocked = 0,
   byte_stack = 0x0
}
#27 0x00158e90 in command_loop () at keyboard.c:1317
No locals.
#28 0x00158473 in recursive_edit_1 () at keyboard.c:942
	count = 1
	val = 2071153
#29 0x0015867c in Frecursive_edit () at keyboard.c:1004
	count = 0
	buffer = 92274697
#30 0x00156985 in main (argc=1, argv=0xbffff3c0) at emacs.c:1777
	dummy = 0
	stack_bottom_variable = -65 '\277'
	do_initial_setlocale = 1
	skip_args = 0
	rlim = {
   rlim_cur = 8388608,
   rlim_max = 67104768
}
	no_loadup = 0
	junk = 0x0
	dname_arg = 0x0
---------- End ----------






^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#1435: C-Click on a mode in the mode-line causes crash in MacOS X
@ 2009-01-23 10:32 Adrian Robert
  2009-02-02 15:50 ` Jason Schadel
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Robert @ 2009-01-23 10:32 UTC (permalink / raw)
  To: 1435; +Cc: Jason Schadel

I still cannot reproduce it.  The only clue I can find is that the  
crash seems to be deep inside OS X's own menu code, when it  
apparently tries to send a selection to -[EmacsView
writeSelectionToPasteboard:types:].  This should only occur if a  
native services menu selection is made, however for Emacs.app we  
override the services menu with our own items, so any selection from  
the actual visible services menu goes through ns-perform-service.

In your case, it seems doing your mouse action is somehow triggering  
a call into the (hidden and overridden) original services menu.  Do  
you know why this might be?  Do you have anything unusual running on  
your Mac, such as something that automatically is active when a  
selection is made or a menu item chosen, or a certain type of mouse- 
click made, or something like that?

Anyway, I have checked in something that might at least avoid the  
crash for now, it simply stubs out the methods in question:

-writeSelectionToPasteboard:types: and -readSelectionFromPasteboard:

Let me know if this stops the crash, and if so, if any behavior that  
is normally expected (in connection with this behind-the-scenes  
service call if you know what it is) is not observed.

thanks,
Adrian







^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#1435: C-Click on a mode in the mode-line causes crash in MacOS X
  2009-01-23 10:32 bug#1435: C-Click on a mode in the mode-line causes crash in MacOS X Adrian Robert
@ 2009-02-02 15:50 ` Jason Schadel
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Schadel @ 2009-02-02 15:50 UTC (permalink / raw)
  To: Adrian Robert; +Cc: 1435

I do have a Kensington Expert Mouse with their ancient Mouseworks  
software installed.  I wouldn't be surprised if that is the problem.

No more crashes with your update.  Here are the results:
<mode-line> <C-mouse-1> is undefined
mode-line down-mouse-3- shows the minor-mode menu
mode-line down-mouse-1- shows the mode menu

-Jason

On Jan 23, 2009, at 5:32 AM, Adrian Robert wrote:

> I still cannot reproduce it.  The only clue I can find is that the  
> crash seems to be deep inside OS X's own menu code, when it  
> apparently tries to send a selection to -[EmacsView
> writeSelectionToPasteboard:types:].  This should only occur if a  
> native services menu selection is made, however for Emacs.app we  
> override the services menu with our own items, so any selection from  
> the actual visible services menu goes through ns-perform-service.
>
> In your case, it seems doing your mouse action is somehow triggering  
> a call into the (hidden and overridden) original services menu.  Do  
> you know why this might be?  Do you have anything unusual running on  
> your Mac, such as something that automatically is active when a  
> selection is made or a menu item chosen, or a certain type of mouse- 
> click made, or something like that?
>
> Anyway, I have checked in something that might at least avoid the  
> crash for now, it simply stubs out the methods in question:
>
> -writeSelectionToPasteboard:types: and -readSelectionFromPasteboard:
>
> Let me know if this stops the crash, and if so, if any behavior that  
> is normally expected (in connection with this behind-the-scenes  
> service call if you know what it is) is not observed.
>
> thanks,
> Adrian
>







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-02 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-23 10:32 bug#1435: C-Click on a mode in the mode-line causes crash in MacOS X Adrian Robert
2009-02-02 15:50 ` Jason Schadel
  -- strict thread matches above, loose matches on Subject: below --
2008-11-26 16:03 Jason Schadel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).