Subject: Re: bug#11138: 23.3; on Windows, message-box does not display line breaks in the message

From: Juanma Barranquero <[email-masked]>
Date: Sat, 31 Mar 2012 23:36:01 +0200

On Sat, Mar 31, 2012 at 20:06, Eli Zaretskii <[email-masked]> wrote:

> The Windows port doesn't really have an implementation of a message
> box, it just pops up a menu.  And in a menu, each item is one line.

And some checking for excessive length is missing, BTW:

emacs -Q
M-: (message-box (make-string (/ most-positive-fixnum 2) ?a) "") <RETURN>

Program received signal SIGSEGV, Segmentation fault.
0x754f8dd2 in strcat () from C:\Windows\syswow64\msvcrt.dll
(gdb) bt
#0  0x754f8dd2 in strcat () from C:\Windows\syswow64\msvcrt.dll
#1  0x64c9000c in ?? ()
#2  0x012b68f4 in fill_in_menu (menu=0x37640627, wv=0x9f1740) at w32menu.c:1564
#3  0x012b5673 in w32_menu_show (f=0x3a22e00, x=340, y=304,
for_click=0, keymaps=0, title=55546785, error=0x88f290) at
w32menu.c:867
#4  0x0129e565 in Fx_popup_menu (position=59320198, menu=59320214) at
menu.c:1323
#5  0x012b3782 in Fx_popup_dialog (position=54708274,
contents=59320166, header=54708274) at w32menu.c:206
#6  0x011061d6 in Fmessage_box (nargs=2, args=0x88f3a0) at editfns.c:3420
#7  0x01034c46 in eval_sub (form=59319710) at eval.c:2322
#8  0x01034572 in Feval (form=59319710, lexical=54708250) at eval.c:2204
#9  0x01036ce9 in Ffuncall (nargs=3, args=0x88f570) at eval.c:3005
#10 0x010dec96 in exec_byte_code (bytestr=20473265, vector=20473381,
maxdepth=20, args_template=54708250, nargs=0, args=0x0) at
bytecode.c:785
#11 0x01037b9c in funcall_lambda (fun=20473213, nargs=2,
arg_vector=0x342c81a) at eval.c:3233
#12 0x01037082 in Ffuncall (nargs=3, args=0x88f870) at eval.c:3051
#13 0x01035c57 in Fapply (nargs=2, args=0x88f904) at eval.c:2507
#14 0x010361a4 in apply1 (fn=55149410, arg=59320094) at eval.c:2745
#15 0x010e1a41 in Fcall_interactively (function=55149410,
record_flag=54708250, keys=54729477) at callint.c:377
#16 0x01036d57 in Ffuncall (nargs=4, args=0x88fb40) at eval.c:3009
#17 0x01036273 in call3 (fn=54828442, arg1=55149410, arg2=54708250,
arg3=54708250) at eval.c:2802
#18 0x0101f9f4 in Fcommand_execute (cmd=55149410,
record_flag=54708250, keys=54708250, special=54708250) at
keyboard.c:10330
#19 0x0100658f in command_loop_1 () at keyboard.c:1572
#20 0x01032c4f in internal_condition_case (bfun=0x100569b
<command_loop_1>, handlers=54766026, hfun=0x1004eba <cmd_error>) at
eval.c:1515
#21 0x010052f7 in command_loop_2 (ignore=54708250) at keyboard.c:1160
#22 0x01032672 in internal_catch (tag=54764026, func=0x10052d3
<command_loop_2>, arg=54708250) at eval.c:1272
#23 0x010052b3 in command_loop () at keyboard.c:1139
#24 0x0100488f in recursive_edit_1 () at keyboard.c:759
#25 0x01004baa in Frecursive_edit () at keyboard.c:823
#26 0x010028b5 in main (argc=2, argv=0xbe15f8) at emacs.c:1715

Lisp Backtrace:
"message-box" (0x88f3a0)
"eval" (0x88f574)
"eval-expression" (0x88f874)
"call-interactively" (0x88fb44)
(gdb)

    Juanma