* "Not an in-range integer,..." when using Synergy @ 2011-09-14 2:36 Yoshiaki Kasahara 2011-09-14 4:32 ` bug#9498: " Paul Eggert ` (3 more replies) 0 siblings, 4 replies; 23+ messages in thread From: Yoshiaki Kasahara @ 2011-09-14 2:36 UTC (permalink / raw) To: emacs-devel Hello, With recent Emacs trunk, sometimes I see the following message in the minibuffer: Not an in-range integer, float, or cons of integers I'm using Synergy (http://synergy-foss.org/) to share my keyboard and mouse connected to FreeBSD 8.2 (amd64) with Windows 7 PC. The error occurs when the mouse pointer leaves FreeBSD desktop and enters to Windows desktop. Emacs is running on FreeBSD side. debug-on-error is not helpful: Debugger entered--Lisp error: (error "Not an in-range integer, float, or cons of integers") It seems that it is clipboard related. When I highlight some text on Emacs, the error occurs. But after I copy text on Windows, it doesn't happen (until I select some text on Emacs again). Clipboard is shared by Synergy. Any ideas? -- Yoshiaki Kasahara Research Institute for Information Technology, Kyushu University kasahara@nc.kyushu-u.ac.jp ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 2:36 "Not an in-range integer,..." when using Synergy Yoshiaki Kasahara @ 2011-09-14 4:32 ` Paul Eggert 2011-09-14 4:54 ` Eli Zaretskii 2011-09-14 4:52 ` Paul Eggert ` (2 subsequent siblings) 3 siblings, 1 reply; 23+ messages in thread From: Paul Eggert @ 2011-09-14 4:32 UTC (permalink / raw) To: 9498 [This bug report is copied here from <http://lists.gnu.org/archive/html/emacs-devel/2011-09/msg00337.html>.] Date: Wed, 14 Sep 2011 11:36:19 +0900 (JST) From: Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> Hello, With recent Emacs trunk, sometimes I see the following message in the minibuffer: Not an in-range integer, float, or cons of integers I'm using Synergy (http://synergy-foss.org/) to share my keyboard and mouse connected to FreeBSD 8.2 (amd64) with Windows 7 PC. The error occurs when the mouse pointer leaves FreeBSD desktop and enters to Windows desktop. Emacs is running on FreeBSD side. debug-on-error is not helpful: Debugger entered--Lisp error: (error "Not an in-range integer, float, or cons of integers") It seems that it is clipboard related. When I highlight some text on Emacs, the error occurs. But after I copy text on Windows, it doesn't happen (until I select some text on Emacs again). Clipboard is shared by Synergy. Any ideas? -- Yoshiaki Kasahara Research Institute for Information Technology, Kyushu University kasahara@nc.kyushu-u.ac.jp ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 4:32 ` bug#9498: " Paul Eggert @ 2011-09-14 4:54 ` Eli Zaretskii 0 siblings, 0 replies; 23+ messages in thread From: Eli Zaretskii @ 2011-09-14 4:54 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: 9498, Paul Eggert > Date: Tue, 13 Sep 2011 21:32:45 -0700 > From: Paul Eggert <eggert@cs.ucla.edu> > > Debugger entered--Lisp error: (error "Not an in-range integer, float, or cons of integers") > > It seems that it is clipboard related. When I highlight some text on > Emacs, the error occurs. But after I copy text on Windows, it doesn't > happen (until I select some text on Emacs again). Clipboard is shared > by Synergy. Can you run Emacs on under a debugger? If so, please put a breakpoint in the function `error', reproduce the problem, and post here the backtrace. Judging by your description, I would guess that the error is thrown from xselect.c, but that's a guess. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 2:36 "Not an in-range integer,..." when using Synergy Yoshiaki Kasahara 2011-09-14 4:32 ` bug#9498: " Paul Eggert @ 2011-09-14 4:52 ` Paul Eggert 2011-09-14 4:52 ` Paul Eggert 2011-09-14 5:03 ` bug#9498: " Paul Eggert 3 siblings, 0 replies; 23+ messages in thread From: Paul Eggert @ 2011-09-14 4:52 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: 9498, emacs-devel I created a bug report for this at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9498> and will follow up there. ^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: "Not an in-range integer,..." when using Synergy 2011-09-14 2:36 "Not an in-range integer,..." when using Synergy Yoshiaki Kasahara 2011-09-14 4:32 ` bug#9498: " Paul Eggert 2011-09-14 4:52 ` Paul Eggert @ 2011-09-14 4:52 ` Paul Eggert 2011-09-14 5:03 ` bug#9498: " Paul Eggert 3 siblings, 0 replies; 23+ messages in thread From: Paul Eggert @ 2011-09-14 4:52 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: 9498, emacs-devel I created a bug report for this at <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9498> and will follow up there. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 2:36 "Not an in-range integer,..." when using Synergy Yoshiaki Kasahara ` (2 preceding siblings ...) 2011-09-14 4:52 ` Paul Eggert @ 2011-09-14 5:03 ` Paul Eggert 2011-09-14 7:31 ` Yoshiaki Kasahara 3 siblings, 1 reply; 23+ messages in thread From: Paul Eggert @ 2011-09-14 5:03 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: 9498 On 09/13/11 19:36, Yoshiaki Kasahara wrote: > Not an in-range integer, float, or cons of integers This message is generated by cons_to_unsigned or cons_to_signed and indicates that an Emacs Lisp representation of a low-level integer is out of that low-level integer's range. Previously, Emacs had undefined behavior if that happened (often, but not always, wrapping the integer around), but now it attempts to report the errors more systematically. Can you please run the FreeBSD Emacs under GDB, put a breakpoint on the 'error' function, make the bug happen, and then send us a C backtrace? Something like this: $ gdb ./emacs [lots of chatter] (gdb) b error (gdb) run [make the error happen] (gdb) where ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 5:03 ` bug#9498: " Paul Eggert @ 2011-09-14 7:31 ` Yoshiaki Kasahara 2011-09-14 8:29 ` Eli Zaretskii 2011-09-14 8:31 ` Eli Zaretskii 0 siblings, 2 replies; 23+ messages in thread From: Yoshiaki Kasahara @ 2011-09-14 7:31 UTC (permalink / raw) To: eggert; +Cc: 9498 On Tue, 13 Sep 2011 22:03:06 -0700, Paul Eggert <eggert@cs.ucla.edu> said: > Can you please run the FreeBSD Emacs under GDB, put > a breakpoint on the 'error' function, make the bug happen, > and then send us a C backtrace? Something like this: % gdb ./emacs GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... DISPLAY = :0.0 TERM = xterm-256color Breakpoint 1 at 0x4fbd30: file emacs.c, line 385. Breakpoint 2 at 0x517a60: file sysdep.c, line 855. (gdb) b error Breakpoint 3 at 0x56d390: file eval.c, line 1972. (gdb) run -Q Starting program: /usr/local/src/Emacs24/emacs/src/emacs -Q [New LWP 101693] [New Thread ecbc00 (LWP 101693/initial thread)] [New Thread f15400 (LWP 101465/emacs)] [Switching to Thread ecbc00 (LWP 101693/initial thread)] Breakpoint 3, error ( m=0x5f3530 "Not an in-range integer, float, or cons of integers") at eval.c:1972 1972 { (gdb) bt #0 error (m=0x5f3530 "Not an in-range integer, float, or cons of integers") at eval.c:1972 #1 0x000000000055abbc in cons_to_signed (c=6239536, min=-2147483648, max=2147483647) at data.c:2430 #2 0x00000000004d4e52 in x_convert_selection (event=Variable "event" is not available. ) at xselect.c:1790 #3 0x00000000004d530a in x_handle_selection_event (event=0x7fffffffcff0) at xselect.c:858 #4 0x0000000000506d6c in swallow_events (do_display=1) at keyboard.c:4183 #5 0x00000000005aa662 in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=10827826, wait_proc=0x0, just_wait_proc=0) at process.c:4695 #6 0x0000000000418a34 in sit_for (timeout=120, reading=1, do_display=1) at dispnew.c:5967 #7 0x000000000050ae06 in read_char (commandflag=1, nmaps=2, maps=0x7fffffffd760, prev_event=Variable "prev_event" is not available. ) at keyboard.c:2690 #8 0x000000000050c5f2 in read_key_sequence (keybuf=0x7fffffffd990, bufsize=30, prompt=10827826, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9285 #9 0x000000000050e86f in command_loop_1 () at keyboard.c:1446 #10 0x00000000005703c4 in internal_condition_case ( bfun=0x50e6c0 <command_loop_1>, handlers=10908418, hfun=0x5089f0 <cmd_error>) at eval.c:1491 #11 0x000000000050861a in command_loop_2 (ignore=Variable "ignore" is not available. ) at keyboard.c:1157 #12 0x00000000005704b8 in internal_catch (tag=Variable "tag" is not available. ) at eval.c:1248 #13 0x0000000000508c82 in recursive_edit_1 () at keyboard.c:1136 #14 0x0000000000508dcd in Frecursive_edit () at keyboard.c:820 #15 0x00000000004fce02 in main (argc=2, argv=0x7fffffffde40) at emacs.c:1706 ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 7:31 ` Yoshiaki Kasahara @ 2011-09-14 8:29 ` Eli Zaretskii 2011-09-14 8:31 ` Eli Zaretskii 1 sibling, 0 replies; 23+ messages in thread From: Eli Zaretskii @ 2011-09-14 8:29 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: 9498, eggert > Date: Wed, 14 Sep 2011 16:31:25 +0900 (JST) > From: Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> > Cc: 9498@debbugs.gnu.org > > Breakpoint 3, error ( > m=0x5f3530 "Not an in-range integer, float, or cons of integers") > at eval.c:1972 > 1972 { > (gdb) bt > #0 error (m=0x5f3530 "Not an in-range integer, float, or cons of integers") > at eval.c:1972 > #1 0x000000000055abbc in cons_to_signed (c=6239536, min=-2147483648, > max=2147483647) at data.c:2430 > #2 0x00000000004d4e52 in x_convert_selection (event=Variable "event" is not available. > ) at xselect.c:1790 Thanks. Please do (gdb) frame 0 (gdb) p val (gdb) pp c (gdb) up (gdb) pp obj and show the output. In order for the "pp" command to work, you will need to start GDB from the src directory of the Emacs source tree. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 7:31 ` Yoshiaki Kasahara 2011-09-14 8:29 ` Eli Zaretskii @ 2011-09-14 8:31 ` Eli Zaretskii 2011-09-14 8:51 ` Yoshiaki Kasahara 1 sibling, 1 reply; 23+ messages in thread From: Eli Zaretskii @ 2011-09-14 8:31 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: 9498, eggert > Date: Wed, 14 Sep 2011 16:31:25 +0900 (JST) > From: Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> > Cc: 9498@debbugs.gnu.org Sorry, the previous message was in error in the instructions I wrote. Please use this one instead. > Breakpoint 3, error ( > m=0x5f3530 "Not an in-range integer, float, or cons of integers") > at eval.c:1972 > 1972 { > (gdb) bt > #0 error (m=0x5f3530 "Not an in-range integer, float, or cons of integers") > at eval.c:1972 > #1 0x000000000055abbc in cons_to_signed (c=6239536, min=-2147483648, > max=2147483647) at data.c:2430 > #2 0x00000000004d4e52 in x_convert_selection (event=Variable "event" is not available. > ) at xselect.c:1790 Thanks. Please do (gdb) frame 1 (gdb) p val (gdb) pp c (gdb) up (gdb) pp obj and show the output. In order for the "pp" command to work, you will need to start GDB from the src directory of the Emacs source tree. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 8:31 ` Eli Zaretskii @ 2011-09-14 8:51 ` Yoshiaki Kasahara 2011-09-14 9:35 ` Eli Zaretskii 0 siblings, 1 reply; 23+ messages in thread From: Yoshiaki Kasahara @ 2011-09-14 8:51 UTC (permalink / raw) To: eliz; +Cc: 9498, eggert On Wed, 14 Sep 2011 04:31:47 -0400, Eli Zaretskii <eliz@gnu.org> said: > Thanks. Please do > > (gdb) frame 1 > (gdb) p val > (gdb) pp c > (gdb) up > (gdb) pp obj > > and show the output. > > In order for the "pp" command to work, you will need to start GDB from > the src directory of the Emacs source tree. Thank you for the instruction. But I couldn't get some of the values... (gdb) frame 1 #1 0x000000000055abbc in cons_to_signed (c=6239536, min=-2147483648, max=2147483647) at data.c:2430 2430 error ("Not an in-range integer, float, or cons of integers"); (gdb) p val Variable "val" is not available. (gdb) pp c 1559884 (gdb) up #2 0x00000000004d4e52 in x_convert_selection (event=Variable "event" is not available. ) at xselect.c:1790 1790 (*(long **) data_ret) [0] = cons_to_signed (obj, X_LONG_MIN, X_LONG_MAX); (gdb) pp obj No symbol "obj" in current context. Do I need to recompile emacs without compiler optimization? ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 8:51 ` Yoshiaki Kasahara @ 2011-09-14 9:35 ` Eli Zaretskii 2011-09-14 10:24 ` Yoshiaki Kasahara 0 siblings, 1 reply; 23+ messages in thread From: Eli Zaretskii @ 2011-09-14 9:35 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: 9498, eggert > Date: Wed, 14 Sep 2011 17:51:17 +0900 (JST) > Cc: eggert@cs.ucla.edu, 9498@debbugs.gnu.org > From: Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> > > (gdb) p val > Variable "val" is not available. > (gdb) pp c > 1559884 > (gdb) up > #2 0x00000000004d4e52 in x_convert_selection (event=Variable "event" is not available. > ) at xselect.c:1790 > 1790 (*(long **) data_ret) [0] = cons_to_signed (obj, X_LONG_MIN, X_LONG_MAX); > (gdb) pp obj > No symbol "obj" in current context. > > Do I need to recompile emacs without compiler optimization? Yes, please. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 9:35 ` Eli Zaretskii @ 2011-09-14 10:24 ` Yoshiaki Kasahara 2011-09-14 12:10 ` Eli Zaretskii 2011-09-14 14:58 ` Chong Yidong 0 siblings, 2 replies; 23+ messages in thread From: Yoshiaki Kasahara @ 2011-09-14 10:24 UTC (permalink / raw) To: eliz; +Cc: 9498, eggert On Wed, 14 Sep 2011 05:35:06 -0400, Eli Zaretskii <eliz@gnu.org> said: >> Do I need to recompile emacs without compiler optimization? > > Yes, please. Ok. Breakpoint 3, error ( m=0x6e80b8 "Not an in-range integer, float, or cons of integers") at eval.c:1974 1974 va_start (ap, m); (gdb) where #0 error (m=0x6e80b8 "Not an in-range integer, float, or cons of integers") at eval.c:1974 #1 0x0000000000605166 in cons_to_signed (c=12826385284, min=-2147483648, max=2147483647) at data.c:2430 #2 0x0000000000526be7 in lisp_data_to_selection_data (display=0x10cc000, obj=12826385284, data_ret=0xc70680, type_ret=0xc70698, size_ret=0xc70688, format_ret=0xc70690, nofree_ret=0xc706a0) at xselect.c:1790 #3 0x0000000000524ee5 in x_convert_selection (event=0x7fffffffcbc0, selection_symbol=11922226, target_symbol=12298130, property=271, for_multiple=0, dpyinfo=0xfec400) at xselect.c:937 #4 0x0000000000524c77 in x_handle_selection_request (event=0x7fffffffcbc0) at xselect.c:858 #5 0x0000000000525180 in x_handle_selection_event (event=0x7fffffffcbc0) at xselect.c:1018 #6 0x000000000057cfa2 in swallow_events (do_display=1) at keyboard.c:4183 #7 0x0000000000682388 in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=11855922, wait_proc=0x0, just_wait_proc=0) at process.c:4695 #8 0x000000000042284a in sit_for (timeout=120, reading=1, do_display=1) at dispnew.c:5967 #9 0x0000000000579c91 in read_char (commandflag=1, nmaps=2, maps=0x7fffffffd380, prev_event=11855922, used_mouse_menu=0x7fffffffd604, end_time=0x0) at keyboard.c:2690 #10 0x00000000005870e9 in read_key_sequence (keybuf=0x7fffffffd8a0, bufsize=30, prompt=11855922, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9285 #11 0x0000000000577259 in command_loop_1 () at keyboard.c:1446 #12 0x000000000061d363 in internal_condition_case ( bfun=0x576ea0 <command_loop_1>, handlers=11936514, hfun=0x576770 <cmd_error>) at eval.c:1491 #13 0x0000000000576b62 in command_loop_2 (ignore=11855922) at keyboard.c:1157 #14 0x000000000061ccd8 in internal_catch (tag=11928466, func=0x576b40 <command_loop_2>, arg=11855922) at eval.c:1248 #15 0x0000000000576b14 in command_loop () at keyboard.c:1136 #16 0x0000000000576272 in recursive_edit_1 () at keyboard.c:756 #17 0x000000000057641f in Frecursive_edit () at keyboard.c:820 #18 0x00000000005747e9 in main (argc=2, argv=0x7fffffffde40) at emacs.c:1706 (gdb) frame 1 #1 0x0000000000605166 in cons_to_signed (c=12826385284, min=-2147483648, max=2147483647) at data.c:2430 2430 error ("Not an in-range integer, float, or cons of integers"); (gdb) p val $1 = 3206596321 (gdb) pp c 3206596321 (gdb) up #2 0x0000000000526be7 in lisp_data_to_selection_data (display=0x10cc000, obj=12826385284, data_ret=0xc70680, type_ret=0xc70698, size_ret=0xc70688, format_ret=0xc70690, nofree_ret=0xc706a0) at xselect.c:1790 1790 (*(long **) data_ret) [0] = cons_to_signed (obj, X_LONG_MIN, X_LONG_MAX); (gdb) pp obj 3206596321 ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 10:24 ` Yoshiaki Kasahara @ 2011-09-14 12:10 ` Eli Zaretskii 2011-09-14 14:58 ` Chong Yidong 1 sibling, 0 replies; 23+ messages in thread From: Eli Zaretskii @ 2011-09-14 12:10 UTC (permalink / raw) To: Yoshiaki Kasahara, Jan Djärv; +Cc: 9498, eggert > Date: Wed, 14 Sep 2011 19:24:07 +0900 (JST) > Cc: eggert@cs.ucla.edu, 9498@debbugs.gnu.org > From: Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> > > 2430 error ("Not an in-range integer, float, or cons of integers"); > (gdb) p val > $1 = 3206596321 > (gdb) pp c > 3206596321 > (gdb) up > #2 0x0000000000526be7 in lisp_data_to_selection_data (display=0x10cc000, > obj=12826385284, data_ret=0xc70680, type_ret=0xc70698, size_ret=0xc70688, > format_ret=0xc70690, nofree_ret=0xc706a0) at xselect.c:1790 > 1790 (*(long **) data_ret) [0] = cons_to_signed (obj, X_LONG_MIN, X_LONG_MAX); > (gdb) pp obj > 3206596321 Looks like garbage to me. This value comes from here: lisp_selection = x_get_local_selection (selection_symbol, target_symbol, 0, dpyinfo); ... lisp_data_to_selection_data (SELECTION_EVENT_DISPLAY (event), lisp_selection, &(cs->data), &(cs->type), &(cs->size), &(cs->format), &(cs->nofree)); The commentary to x_get_local_selection says: /* Given a selection-name and desired type, look up our local copy of the selection value and convert it to the type. The value is nil or a string. So we need to receive a string, not an integer. Could you please go up one stack frame, to frame #3, and show the value of lisp_selection (with the same "pp" command)? Jan, feel free to chime in, as I'm already on unfamiliar turf. I smell a Synergy bug, but only an expert can tell for sure. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 10:24 ` Yoshiaki Kasahara 2011-09-14 12:10 ` Eli Zaretskii @ 2011-09-14 14:58 ` Chong Yidong 2011-09-15 2:15 ` Yoshiaki Kasahara 1 sibling, 1 reply; 23+ messages in thread From: Chong Yidong @ 2011-09-14 14:58 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: eggert, 9498 Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> writes: > #0 error (m=0x6e80b8 "Not an in-range integer, float, or cons of integers") > at eval.c:1974 > #1 0x0000000000605166 in cons_to_signed (c=12826385284, min=-2147483648, > max=2147483647) at data.c:2430 > #2 0x0000000000526be7 in lisp_data_to_selection_data (display=0x10cc000, > obj=12826385284, data_ret=0xc70680, type_ret=0xc70698, size_ret=0xc70688, > format_ret=0xc70690, nofree_ret=0xc706a0) at xselect.c:1790 > #3 0x0000000000524ee5 in x_convert_selection (event=0x7fffffffcbc0, > selection_symbol=11922226, target_symbol=12298130, property=271, > for_multiple=0, dpyinfo=0xfec400) at xselect.c:937 > #4 0x0000000000524c77 in x_handle_selection_request (event=0x7fffffffcbc0) > at xselect.c:858 Could you also do f 3 pp selection_symbol ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-14 14:58 ` Chong Yidong @ 2011-09-15 2:15 ` Yoshiaki Kasahara 2011-09-15 3:04 ` Eli Zaretskii 0 siblings, 1 reply; 23+ messages in thread From: Yoshiaki Kasahara @ 2011-09-15 2:15 UTC (permalink / raw) To: eliz; +Cc: 9498, cyd, eggert On Wed, 14 Sep 2011 08:10:00 -0400, Eli Zaretskii <eliz@gnu.org> said: > Could you please go up one stack frame, to frame #3, and show the > value of lisp_selection (with the same "pp" command)? (gdb) pp lisp_selection 3206596321 On Wed, 14 Sep 2011 10:58:48 -0400, Chong Yidong <cyd@stupidchicken.com> said: > Could you also do > > f 3 > pp selection_symbol (gdb) pp selection_symbol PRIMARY Then I updated the source tree and tried again. Breakpoint 3, error ( m=0x6e7eb8 "Not an in-range integer, float, or cons of integers") at eval.c:1974 1974 va_start (ap, m); (gdb) where #0 error (m=0x6e7eb8 "Not an in-range integer, float, or cons of integers") at eval.c:1974 #1 0x00000000006050b6 in cons_to_signed (c=13044703648, min=-2147483648, max=2147483647) at data.c:2430 #2 0x0000000000526b37 in lisp_data_to_selection_data (display=0x10f1000, obj=13044703648, data_ret=0xbf8800, type_ret=0xbf8818, size_ret=0xbf8808, format_ret=0xbf8810, nofree_ret=0xbf8820) at xselect.c:1790 #3 0x0000000000524e25 in x_convert_selection (event=0x7fffffffcbc0, selection_symbol=11922226, target_symbol=12298082, property=271, for_multiple=0, dpyinfo=0x1003400) at xselect.c:937 #4 0x0000000000524bb7 in x_handle_selection_request (event=0x7fffffffcbc0) at xselect.c:858 #5 0x00000000005250c0 in x_handle_selection_event (event=0x7fffffffcbc0) at xselect.c:1018 #6 0x000000000057cef2 in swallow_events (do_display=1) at keyboard.c:4183 #7 0x00000000006822d8 in wait_reading_process_output (time_limit=30, microsecs=0, read_kbd=-1, do_display=1, wait_for_cell=11855922, wait_proc=0x0, just_wait_proc=0) at process.c:4695 #8 0x000000000042284a in sit_for (timeout=120, reading=1, do_display=1) at dispnew.c:5967 #9 0x0000000000579be1 in read_char (commandflag=1, nmaps=2, maps=0x7fffffffd380, prev_event=11855922, used_mouse_menu=0x7fffffffd604, end_time=0x0) at keyboard.c:2690 #10 0x0000000000587039 in read_key_sequence (keybuf=0x7fffffffd8a0, bufsize=30, prompt=11855922, dont_downcase_last=0, can_return_switch_frame=1, fix_current_buffer=1) at keyboard.c:9285 #11 0x00000000005771a9 in command_loop_1 () at keyboard.c:1446 #12 0x000000000061d2b3 in internal_condition_case ( bfun=0x576df0 <command_loop_1>, handlers=11936514, hfun=0x5766c0 <cmd_error>) at eval.c:1491 #13 0x0000000000576ab2 in command_loop_2 (ignore=11855922) at keyboard.c:1157 #14 0x000000000061cc28 in internal_catch (tag=11928466, func=0x576a90 <command_loop_2>, arg=11855922) at eval.c:1248 #15 0x0000000000576a64 in command_loop () at keyboard.c:1136 #16 0x00000000005761c2 in recursive_edit_1 () at keyboard.c:756 #17 0x000000000057636f in Frecursive_edit () at keyboard.c:820 #18 0x0000000000574739 in main (argc=2, argv=0x7fffffffde40) at emacs.c:1706 (gdb) frame 1 #1 0x00000000006050b6 in cons_to_signed (c=13044703648, min=-2147483648, max=2147483647) at data.c:2430 2430 error ("Not an in-range integer, float, or cons of integers"); (gdb) p val $1 = 3261175912 (gdb) pp c 3261175912 (gdb) up #2 0x0000000000526b37 in lisp_data_to_selection_data (display=0x10f1000, obj=13044703648, data_ret=0xbf8800, type_ret=0xbf8818, size_ret=0xbf8808, format_ret=0xbf8810, nofree_ret=0xbf8820) at xselect.c:1790 1790 (*(long **) data_ret) [0] = cons_to_signed (obj, X_LONG_MIN, X_LONG_MAX); (gdb) pp obj 3261175912 (gdb) up #3 0x0000000000524e25 in x_convert_selection (event=0x7fffffffcbc0, selection_symbol=11922226, target_symbol=12298082, property=271, for_multiple=0, dpyinfo=0x1003400) at xselect.c:937 937 lisp_data_to_selection_data (SELECTION_EVENT_DISPLAY (event), (gdb) pp lisp_selection 3261175912 (gdb) pp selection_symbol PRIMARY ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-15 2:15 ` Yoshiaki Kasahara @ 2011-09-15 3:04 ` Eli Zaretskii 2011-09-15 17:08 ` Chong Yidong 0 siblings, 1 reply; 23+ messages in thread From: Eli Zaretskii @ 2011-09-15 3:04 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: 9498, cyd, eggert > Date: Thu, 15 Sep 2011 11:15:32 +0900 (JST) > Cc: jan.h.d@swipnet.se, eggert@cs.ucla.edu, 9498@debbugs.gnu.org, > cyd@stupidchicken.com > From: Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp> > > On Wed, 14 Sep 2011 08:10:00 -0400, > Eli Zaretskii <eliz@gnu.org> said: > > > Could you please go up one stack frame, to frame #3, and show the > > value of lisp_selection (with the same "pp" command)? > > (gdb) pp lisp_selection > 3206596321 So I think we should not go with a "selection" that is not a string or nil. Jan? ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-15 3:04 ` Eli Zaretskii @ 2011-09-15 17:08 ` Chong Yidong 2011-09-16 1:06 ` Yoshiaki Kasahara 0 siblings, 1 reply; 23+ messages in thread From: Chong Yidong @ 2011-09-15 17:08 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 9498, Yoshiaki Kasahara, eggert Eli Zaretskii <eliz@gnu.org> writes: >> (gdb) pp lisp_selection >> 3206596321 > > So I think we should not go with a "selection" that is not a string or > nil. We should figure out is why such a value gets there in the first place. Yoshiaki: could you do f 3 pp target_symbol pp dpyinfo->terminal->Vselection_alist so that we can see what selection value was recorded, and how Emacs tried to convert it. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-15 17:08 ` Chong Yidong @ 2011-09-16 1:06 ` Yoshiaki Kasahara 2011-09-16 1:31 ` Chong Yidong 0 siblings, 1 reply; 23+ messages in thread From: Yoshiaki Kasahara @ 2011-09-16 1:06 UTC (permalink / raw) To: cyd; +Cc: 9498, eggert On Thu, 15 Sep 2011 13:08:05 -0400, Chong Yidong <cyd@stupidchicken.com> said: > We should figure out is why such a value gets there in the first place. > > Yoshiaki: could you do > > f 3 > pp target_symbol > pp dpyinfo->terminal->Vselection_alist > > so that we can see what selection value was recorded, and how Emacs > tried to convert it. Sure. Breakpoint 3, error ( m=0x6e7eb8 "Not an in-range integer, float, or cons of integers") at eval.c:1974 1974 va_start (ap, m); (gdb) f 3 #3 0x0000000000524e25 in x_convert_selection (event=0x7fffffffcbc0, selection_symbol=11922226, target_symbol=12298082, property=271, for_multiple=0, dpyinfo=0x1003400) at xselect.c:937 937 lisp_data_to_selection_data (SELECTION_EVENT_DISPLAY (event), (gdb) pp target_symbol TIMESTAMP (gdb) pp dpyinfo->terminal->Vselection_alist ((PRIMARY "to c" 3345671365 #<frame emacs@elvenbow.cc.kyushu-u.ac.jp 0x1546c00>)) "to c" is the text I highlighted on *scratch* buffer. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-16 1:06 ` Yoshiaki Kasahara @ 2011-09-16 1:31 ` Chong Yidong 2011-09-16 6:59 ` Eli Zaretskii 2011-09-16 18:05 ` Paul Eggert 0 siblings, 2 replies; 23+ messages in thread From: Chong Yidong @ 2011-09-16 1:31 UTC (permalink / raw) To: eggert; +Cc: Yoshiaki Kasahara, 9498 Thanks. The culprit seems to be Paul Eggert's 2011-08-26 change (Bug#9196) to lisp_data_to_selection_data, which forces numeric values to be saved to the X selection data member with a maximum allowed value of X_LONG_MAX == 2147483647. This breaks for timestamps like 3345671365. The patch below probably fixes the error for this specific bug, but I will leave it up to Paul to figure out if it's the right fix. Paul, please review your change. Thanks. === modified file 'src/xselect.c' *** src/xselect.c 2011-09-14 15:47:21 +0000 --- src/xselect.c 2011-09-16 01:28:22 +0000 *************** *** 1787,1793 **** *format_ret = 32; *size_ret = 1; (*data_ret) [sizeof (long)] = 0; ! (*(long **) data_ret) [0] = cons_to_signed (obj, X_LONG_MIN, X_LONG_MAX); if (NILP (type)) type = QINTEGER; } else if (VECTORP (obj)) --- 1787,1793 ---- *format_ret = 32; *size_ret = 1; (*data_ret) [sizeof (long)] = 0; ! (*(long **) data_ret) [0] = cons_to_signed (obj, LONG_MIN, LONG_MAX); if (NILP (type)) type = QINTEGER; } else if (VECTORP (obj)) ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-16 1:31 ` Chong Yidong @ 2011-09-16 6:59 ` Eli Zaretskii 2011-09-16 18:05 ` Paul Eggert 1 sibling, 0 replies; 23+ messages in thread From: Eli Zaretskii @ 2011-09-16 6:59 UTC (permalink / raw) To: Chong Yidong; +Cc: 9498, eggert, kasahara > From: Chong Yidong <cyd@stupidchicken.com> > Cc: Yoshiaki Kasahara <kasahara@nc.kyushu-u.ac.jp>, eliz@gnu.org, > jan.h.d@swipnet.se, 9498@debbugs.gnu.org > Date: Thu, 15 Sep 2011 21:31:20 -0400 > > Thanks. > > The culprit seems to be Paul Eggert's 2011-08-26 change (Bug#9196) to > lisp_data_to_selection_data, which forces numeric values to be saved to > the X selection data member with a maximum allowed value of X_LONG_MAX > == 2147483647. This breaks for timestamps like 3345671365. If integer values are allowed in values returned by x_get_local_selection, I Think we should update the commentary to that function. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-16 1:31 ` Chong Yidong 2011-09-16 6:59 ` Eli Zaretskii @ 2011-09-16 18:05 ` Paul Eggert 2011-09-20 9:44 ` Yoshiaki Kasahara 1 sibling, 1 reply; 23+ messages in thread From: Paul Eggert @ 2011-09-16 18:05 UTC (permalink / raw) To: Chong Yidong; +Cc: Yoshiaki Kasahara, 9498 On 09/15/11 18:31, Chong Yidong wrote: > The patch below probably fixes the error for this specific bug, but I > will leave it up to Paul to figure out if it's the right fix. That's on the right track, but it assumes the value in question is less than LONG_MAX, which is true on a 64-bit host but not on a 32-bit host. I came up with a revised patch to address that. I also reviewed my earlier change and found an inverted test, which I also fixed, as part of bzr 105796 on the trunk. This patch also adds a comment along the line that Eli suggested. I'm still a bit concerned by the difference between what was in Emacs 23.3 (it sometimes deals with unsigned quantities in X selections, and sometimes signed) and what we have now (usually signed quantities, at Jan D.'s suggestion, but unsigned in the case above, now). The Emacs 23.3 code is obviously wrong in some cases: for example: else if (INTEGERP (obj) && XINT (obj) < 0xFFFF && XINT (obj) > -0xFFFF) as a test whether OBJ fits into 16 bits is clearly wrong, as the range -65534 .. 65534 doesn't make any sense. The current code is better, but could well have remaining gotchas. A review by Jan D. would help, I think. ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-16 18:05 ` Paul Eggert @ 2011-09-20 9:44 ` Yoshiaki Kasahara 2011-09-20 18:39 ` Paul Eggert 0 siblings, 1 reply; 23+ messages in thread From: Yoshiaki Kasahara @ 2011-09-20 9:44 UTC (permalink / raw) To: eggert; +Cc: 9498 Today I updated Emacs and the error disappeared. Thank you very much! ^ permalink raw reply [flat|nested] 23+ messages in thread
* bug#9498: "Not an in-range integer,..." when using Synergy 2011-09-20 9:44 ` Yoshiaki Kasahara @ 2011-09-20 18:39 ` Paul Eggert 0 siblings, 0 replies; 23+ messages in thread From: Paul Eggert @ 2011-09-20 18:39 UTC (permalink / raw) To: Yoshiaki Kasahara; +Cc: 9498-done On 09/20/11 02:44, Yoshiaki Kasahara wrote: > Today I updated Emacs and the error disappeared. Thank you very much! You're welcome; and thanks for checking (and thanks to the others who helped as well). ^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2011-09-20 18:39 UTC | newest] Thread overview: 23+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-09-14 2:36 "Not an in-range integer,..." when using Synergy Yoshiaki Kasahara 2011-09-14 4:32 ` bug#9498: " Paul Eggert 2011-09-14 4:54 ` Eli Zaretskii 2011-09-14 4:52 ` Paul Eggert 2011-09-14 4:52 ` Paul Eggert 2011-09-14 5:03 ` bug#9498: " Paul Eggert 2011-09-14 7:31 ` Yoshiaki Kasahara 2011-09-14 8:29 ` Eli Zaretskii 2011-09-14 8:31 ` Eli Zaretskii 2011-09-14 8:51 ` Yoshiaki Kasahara 2011-09-14 9:35 ` Eli Zaretskii 2011-09-14 10:24 ` Yoshiaki Kasahara 2011-09-14 12:10 ` Eli Zaretskii 2011-09-14 14:58 ` Chong Yidong 2011-09-15 2:15 ` Yoshiaki Kasahara 2011-09-15 3:04 ` Eli Zaretskii 2011-09-15 17:08 ` Chong Yidong 2011-09-16 1:06 ` Yoshiaki Kasahara 2011-09-16 1:31 ` Chong Yidong 2011-09-16 6:59 ` Eli Zaretskii 2011-09-16 18:05 ` Paul Eggert 2011-09-20 9:44 ` Yoshiaki Kasahara 2011-09-20 18:39 ` Paul Eggert
Code repositories for project(s) associated with this external index https://git.savannah.gnu.org/cgit/emacs.git https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.