GNU bug report logs -
#11141
24.0.94; crash with `x-popup-dialog'
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sat, 31 Mar 2012 21:25:02 UTC
Severity: normal
Found in version 24.0.94
Done: Andreas Schwab <schwab <at> linux-m68k.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 11141 in the body.
You can then email your comments to 11141 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11141
; Package
emacs
.
(Sat, 31 Mar 2012 21:25:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 31 Mar 2012 21:25:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11141
; Package
emacs
.
(Sun, 01 Apr 2012 06:19:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 11141 <at> debbugs.gnu.org (full text, mbox):
"Drew Adams" <drew.adams <at> 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?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11141
; Package
emacs
.
(Sun, 01 Apr 2012 06:33:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 11141 <at> debbugs.gnu.org (full text, mbox):
> 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)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11141
; Package
emacs
.
(Sun, 01 Apr 2012 06:36:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 11141 <at> debbugs.gnu.org (full text, mbox):
> > 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'.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11141
; Package
emacs
.
(Sun, 01 Apr 2012 07:18:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 11141 <at> debbugs.gnu.org (full text, mbox):
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 <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#11141
; Package
emacs
.
(Sun, 01 Apr 2012 16:36:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 11141 <at> debbugs.gnu.org (full text, mbox):
> From: Andreas Schwab <schwab <at> linux-m68k.org>
> Date: Sun, 01 Apr 2012 09:16:57 +0200
> Cc: 'Chong Yidong' <cyd <at> gnu.org>, 11141 <at> debbugs.gnu.org
>
> Please try this.
>
> Andreas.
>
> * w32menu.c (is_simple_dialog): Properly check lisp types.
Works for me, thanks.
Reply sent
to
Andreas Schwab <schwab <at> linux-m68k.org>
:
You have taken responsibility.
(Sun, 01 Apr 2012 16:47:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"Drew Adams" <drew.adams <at> oracle.com>
:
bug acknowledged by developer.
(Sun, 01 Apr 2012 16:47:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 11141-done <at> debbugs.gnu.org (full text, mbox):
Fixed.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 30 Apr 2012 11:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 58 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.