* bug#11141: 24.0.94; crash with `x-popup-dialog' @ 2012-03-31 21:23 Drew Adams 2012-04-01 6:17 ` Chong Yidong 0 siblings, 1 reply; 7+ messages in thread From: Drew Adams @ 2012-03-31 21:23 UTC (permalink / raw) To: 11141 100% reproducible, from emacs -Q. (defun titi (event) (interactive "e") (let ((choice (x-popup-dialog event '("ABC" "DEF" ("OK" . bar))))) (and choice (call-interactively choice)))) (defun bar () (interactive) t) (global-set-key [double-mouse-2] 'titi) (global-set-key [mouse-2] nil) Then double-click mouse-2. Note that if you remove the string "DEF" there is no crash. In GNU Emacs 24.0.94.1 (i386-mingw-nt5.1.2600) of 2012-03-19 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --no-opt --enable-checking --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include' ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11141: 24.0.94; crash with `x-popup-dialog' 2012-03-31 21:23 bug#11141: 24.0.94; crash with `x-popup-dialog' Drew Adams @ 2012-04-01 6:17 ` Chong Yidong 2012-04-01 6:31 ` Drew Adams 0 siblings, 1 reply; 7+ messages in thread From: Chong Yidong @ 2012-04-01 6:17 UTC (permalink / raw) To: Drew Adams; +Cc: 11141 "Drew Adams" <drew.adams@oracle.com> writes: > 100% reproducible, from emacs -Q. > > (defun titi (event) > (interactive "e") > (let ((choice (x-popup-dialog > event > '("ABC" > "DEF" > ("OK" . bar))))) > (and choice (call-interactively choice)))) > > (defun bar () (interactive) t) > > (global-set-key [double-mouse-2] 'titi) > (global-set-key [mouse-2] nil) > > Then double-click mouse-2. Note that if you remove the string "DEF" > there is no crash. No crash on latest trunk, x86_64-unknown-linux-gnu. Maybe a Windows issue. Any backtrace? ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11141: 24.0.94; crash with `x-popup-dialog' 2012-04-01 6:17 ` Chong Yidong @ 2012-04-01 6:31 ` Drew Adams 2012-04-01 6:34 ` Drew Adams 2012-04-01 7:16 ` Andreas Schwab 0 siblings, 2 replies; 7+ messages in thread From: Drew Adams @ 2012-04-01 6:31 UTC (permalink / raw) To: 'Chong Yidong'; +Cc: 11141 > No crash on latest trunk, x86_64-unknown-linux-gnu. Maybe a Windows > issue. Any backtrace? $ ./gdb -p 5128 GNU gdb (GDB) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "mingw32". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Attaching to process 5128 [New Thread 5128.0xfdc] [New Thread 5128.0xc58] [New Thread 5128.0x1584] Reading symbols from C:\Emacs-24-2012-03-19\bin\emacs.exe...done. [Switching to Thread 5128.0x1584] Warning: c:\drews-lisp-20\bin/../lwlib: No such file or directory. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] Environment variable "DISPLAY" not defined. TERM = cygwin .gdbinit:1328: Error in sourced command file: No symbol "Vsystem_type" in current context. (gdb) c Continuing. Program received signal SIGTRAP, Trace/breakpoint trap. [Switching to Thread 5128.0xfdc] 0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll (gdb) bt #0 0x7c90120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll #1 0x0114f2fe in w32_abort () at w32fns.c:7210 #2 0x010421b3 in die ( msg=0x15d2e48 "assertion failed: CONSP (((0+(((((((((enum Lisp_Type) ((((options))) & ((((int) 1) << 3) - 1))) == Lisp_Cons)) || suppress_checking ? (void) 0 : die ((\"assertio n failed: \" \"CONSP ((options))\"), \"w32me"..., file=0x15d26b7 "w32menu.c", line=1185) at alloc.c:6339 #3 0x012b59ab in is_simple_dialog (contents=75445966) at w32menu.c:1185 #4 0x012b3507 in Fx_popup_dialog (position=74376382, contents=75445966, header=54724634) at w32menu.c:195 #5 0x01034e58 in eval_sub (form=75445950) at eval.c:2356 #6 0x01031fed in Flet (args=75446038) at eval.c:1090 #7 0x01034965 in eval_sub (form=75445934) at eval.c:2298 #8 0x010301ee in Fprogn (args=75446094) at eval.c:364 #9 0x01037a0f in funcall_lambda (fun=75446182, nargs=1, arg_vector=0x83f944) at eval.c:3226 #10 0x010370ed in Ffuncall (nargs=2, args=0x83f940) at eval.c:3063 #11 0x010e354c in Fcall_interactively (function=76468802, record_flag=54724634, keys=54745861) at callint.c:852 #12 0x01036cf3 in Ffuncall (nargs=4, args=0x83fb70) at eval.c:3009 #13 0x0103620f in call3 (fn=54844778, arg1=76468802, arg2=54724634, arg3=54724634) at eval.c:2802 #14 0x0101f9e2 in Fcommand_execute (cmd=76468802, record_flag=54724634, keys=54724634, special=54724634) at keyboard.c:10328 #15 0x0100658f in command_loop_1 () at keyboard.c:1571 #16 0x01032beb in internal_condition_case (bfun=0x100569b <command_loop_1>, handlers=54782362, hfun=0x1004eba <cmd_error>) at eval.c:1515 #17 0x010052f7 in command_loop_2 (ignore=54724634) at keyboard.c:1159 #18 0x0103260e in internal_catch (tag=54780386, func=0x10052d3 <command_loop_2>, arg=54724634) at eval.c:1272 #19 0x010052b3 in command_loop () at keyboard.c:1138 #20 0x0100488f in recursive_edit_1 () at keyboard.c:758 #21 0x01004baa in Frecursive_edit () at keyboard.c:822 #22 0x010028b5 in main (argc=3, argv=0x33c68) at emacs.c:1715 Lisp Backtrace: "x-popup-dialog" (0x83f574) "let" (0x83f75c) "titi" (0x83f944) "call-interactively" (0x83fb74) (gdb) ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11141: 24.0.94; crash with `x-popup-dialog' 2012-04-01 6:31 ` Drew Adams @ 2012-04-01 6:34 ` Drew Adams 2012-04-01 7:16 ` Andreas Schwab 1 sibling, 0 replies; 7+ messages in thread From: Drew Adams @ 2012-04-01 6:34 UTC (permalink / raw) To: 'Drew Adams', 'Chong Yidong'; +Cc: 11141 > > No crash on latest trunk, x86_64-unknown-linux-gnu. Maybe a Windows > > issue. Sounds likely. Windows has its own implementation of `x-popup-dialog'. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11141: 24.0.94; crash with `x-popup-dialog' 2012-04-01 6:31 ` Drew Adams 2012-04-01 6:34 ` Drew Adams @ 2012-04-01 7:16 ` Andreas Schwab 2012-04-01 16:34 ` Eli Zaretskii 1 sibling, 1 reply; 7+ messages in thread From: Andreas Schwab @ 2012-04-01 7:16 UTC (permalink / raw) To: Drew Adams; +Cc: 'Chong Yidong', 11141 Please try this. Andreas. * w32menu.c (is_simple_dialog): Properly check lisp types. diff --git a/src/w32menu.c b/src/w32menu.c index b5cc680..b25edf0 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1173,18 +1173,23 @@ w32_dialog_show (FRAME_PTR f, int keymaps, static int is_simple_dialog (Lisp_Object contents) { - Lisp_Object options = XCDR (contents); + Lisp_Object options; Lisp_Object name, yes, no, other; + if (!CONSP (contents)) + return 0; + options = XCDR (contents); + yes = build_string ("Yes"); no = build_string ("No"); if (!CONSP (options)) return 0; - name = XCAR (XCAR (options)); - if (!CONSP (options)) + name = XCAR (options); + if (!CONSP (name)) return 0; + name = XCAR (name); if (!NILP (Fstring_equal (name, yes))) other = no; @@ -1197,7 +1202,10 @@ is_simple_dialog (Lisp_Object contents) if (!CONSP (options)) return 0; - name = XCAR (XCAR (options)); + name = XCAR (options); + if (!CONSP (name)) + return 0; + name = XCAR (name); if (NILP (Fstring_equal (name, other))) return 0; -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply related [flat|nested] 7+ messages in thread
* bug#11141: 24.0.94; crash with `x-popup-dialog' 2012-04-01 7:16 ` Andreas Schwab @ 2012-04-01 16:34 ` Eli Zaretskii 2012-04-01 16:46 ` Andreas Schwab 0 siblings, 1 reply; 7+ messages in thread From: Eli Zaretskii @ 2012-04-01 16:34 UTC (permalink / raw) To: Andreas Schwab; +Cc: cyd, 11141 > From: Andreas Schwab <schwab@linux-m68k.org> > Date: Sun, 01 Apr 2012 09:16:57 +0200 > Cc: 'Chong Yidong' <cyd@gnu.org>, 11141@debbugs.gnu.org > > Please try this. > > Andreas. > > * w32menu.c (is_simple_dialog): Properly check lisp types. Works for me, thanks. ^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#11141: 24.0.94; crash with `x-popup-dialog' 2012-04-01 16:34 ` Eli Zaretskii @ 2012-04-01 16:46 ` Andreas Schwab 0 siblings, 0 replies; 7+ messages in thread From: Andreas Schwab @ 2012-04-01 16:46 UTC (permalink / raw) To: 11141-done Fixed. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-04-01 16:46 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-31 21:23 bug#11141: 24.0.94; crash with `x-popup-dialog' Drew Adams 2012-04-01 6:17 ` Chong Yidong 2012-04-01 6:31 ` Drew Adams 2012-04-01 6:34 ` Drew Adams 2012-04-01 7:16 ` Andreas Schwab 2012-04-01 16:34 ` Eli Zaretskii 2012-04-01 16:46 ` Andreas Schwab
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).