* bug#16051: 24.3.50; Emacs hang - resize frame manually @ 2013-12-04 14:40 Drew Adams 2013-12-04 17:56 ` Eli Zaretskii 2013-12-21 13:44 ` Jarek Czekalski 0 siblings, 2 replies; 48+ messages in thread From: Drew Adams @ 2013-12-04 14:40 UTC (permalink / raw) To: 16051 emacs -Q Grab the right edge of the frame with your mouse and move it left. Move it far enough and the frame turns white and Emacs hangs. You will need to kill it using the task manager. (If you change a frame parameter (I tried tool-bar-lines) then you need not move the frame border as much before getting a hang.) In GNU Emacs 24.3.50.2 (i686-pc-mingw32) of 2013-11-28 on LEG570 Bzr revision: 115271 rgm@gnu.org-20131128203155-qjc1xsp19z2k64b2 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1' ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-04 14:40 bug#16051: 24.3.50; Emacs hang - resize frame manually Drew Adams @ 2013-12-04 17:56 ` Eli Zaretskii 2013-12-05 14:03 ` martin rudalics 2014-12-25 10:55 ` martin rudalics 2013-12-21 13:44 ` Jarek Czekalski 1 sibling, 2 replies; 48+ messages in thread From: Eli Zaretskii @ 2013-12-04 17:56 UTC (permalink / raw) To: Drew Adams; +Cc: 16051 > Date: Wed, 4 Dec 2013 06:40:15 -0800 (PST) > From: Drew Adams <drew.adams@oracle.com> > > emacs -Q > > Grab the right edge of the frame with your mouse and move it left. > > Move it far enough and the frame turns white and Emacs hangs. You will > need to kill it using the task manager. Don't you get an abort dialog? I do, and the backtrace is below: dispnew.c:1369: Emacs fatal error: assertion failed: row >= 0 && row < matrix->nrows Breakpoint 1, terminate_due_to_signal (sig=22, backtrace_limit=2147483647) at emacs.c:350 350 signal (sig, SIG_DFL); (gdb) bt #0 terminate_due_to_signal (sig=22, backtrace_limit=2147483647) at emacs.c:350 #1 0x01168801 in die ( msg=0x148f378 <DEFAULT_REHASH_SIZE+704> "row >= 0 && row < matrix->nrows", file=0x148f124 <DEFAULT_REHASH_SIZE+108> "dispnew.c", line=1369) at alloc.c:6726 #2 0x01004ad5 in matrix_row (matrix=0x36ce000, row=7) at dispnew.c:1369 #3 0x010415de in hscroll_window_tree (window=59745149) at xdisp.c:12607 #4 0x01041c34 in hscroll_windows (window=59726325) at xdisp.c:12733 #5 0x0104409b in redisplay_internal () at xdisp.c:13627 #6 0x01044918 in redisplay_preserve_echo_area (from_where=8) at xdisp.c:13852 #7 0x011073fb in detect_input_pending_run_timers (do_display=true) at keyboard.c:9882 #8 0x011d5c9e in wait_reading_process_output (time_limit=0, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=56436762, wait_proc=0x0, just_wait_proc=0) at process.c:4680 #9 0x010fb5eb in kbd_buffer_get_event (kbp=0x82f94c, used_mouse_menu=0x82fc9b, end_time=0x0) at keyboard.c:3897 #10 0x010f7985 in read_event_from_main_queue (end_time=0x0, local_getcjmp=0x82fb40, used_mouse_menu=0x82fc9b) at keyboard.c:2242 #11 0x010f7bbc in read_decoded_event_from_main_queue (end_time=0x0, local_getcjmp=0x82fb40, prev_event=56436762, used_mouse_menu=0x82fc9b) at keyboard.c:2306 #12 0x010f8f62 in read_char (commandflag=1, map=60377926, prev_event=56436762, used_mouse_menu=0x82fc9b, end_time=0x0) at keyboard.c:2891 #13 0x01105902 in read_key_sequence (keybuf=0x82fd80, bufsize=30, prompt=56436762, dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9074 #14 0x010f5ee3 in command_loop_1 () at keyboard.c:1445 #15 0x01184d4b in internal_condition_case (bfun=0x10f5b7c <command_loop_1>, handlers=56487250, hfun=0x10f53e5 <cmd_error>) at eval.c:1344 #16 0x010f584b in command_loop_2 (ignore=56436762) at keyboard.c:1170 #17 0x01184336 in internal_catch (tag=56477154, func=0x10f5828 <command_loop_2>, arg=56436762) at eval.c:1108 #18 0x010f5803 in command_loop () at keyboard.c:1149 #19 0x010f4f9f in recursive_edit_1 () at keyboard.c:777 #20 0x010f514f in Frecursive_edit () at keyboard.c:841 #21 0x010f32f3 in main (argc=2, argv=0xa42878) at emacs.c:1598 ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-04 17:56 ` Eli Zaretskii @ 2013-12-05 14:03 ` martin rudalics 2013-12-05 17:52 ` Eli Zaretskii 2014-12-25 10:55 ` martin rudalics 1 sibling, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-05 14:03 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 >> emacs -Q >> >> Grab the right edge of the frame with your mouse and move it left. >> >> Move it far enough and the frame turns white and Emacs hangs. You will >> need to kill it using the task manager. > > Don't you get an abort dialog? I do, and the backtrace is below: FWIW I never ever managed to get anything weird here. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-05 14:03 ` martin rudalics @ 2013-12-05 17:52 ` Eli Zaretskii 2013-12-05 17:59 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-05 17:52 UTC (permalink / raw) To: martin rudalics; +Cc: 16051 > Date: Thu, 05 Dec 2013 15:03:01 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: Drew Adams <drew.adams@oracle.com>, 16051@debbugs.gnu.org > > >> emacs -Q > >> > >> Grab the right edge of the frame with your mouse and move it left. > >> > >> Move it far enough and the frame turns white and Emacs hangs. You will > >> need to kill it using the task manager. > > > > Don't you get an abort dialog? I do, and the backtrace is below: > > FWIW I never ever managed to get anything weird here. Did you drag the mouse far enough to the left? ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-05 17:52 ` Eli Zaretskii @ 2013-12-05 17:59 ` martin rudalics 2013-12-05 18:21 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-05 17:59 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 > Did you drag the mouse far enough to the left? How could I? It stops as expected when a minimum width is encountered. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-05 17:59 ` martin rudalics @ 2013-12-05 18:21 ` Eli Zaretskii 2013-12-05 18:27 ` martin rudalics 2013-12-05 18:30 ` Eli Zaretskii 0 siblings, 2 replies; 48+ messages in thread From: Eli Zaretskii @ 2013-12-05 18:21 UTC (permalink / raw) To: martin rudalics; +Cc: 16051 > Date: Thu, 05 Dec 2013 18:59:33 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: drew.adams@oracle.com, 16051@debbugs.gnu.org > > > Did you drag the mouse far enough to the left? > > How could I? It stops as expected when a minimum width > is encountered. Yes, and that's when it aborts on my machine. Do it several times and quickly, if it doesn't happen otherwise. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-05 18:21 ` Eli Zaretskii @ 2013-12-05 18:27 ` martin rudalics 2013-12-05 18:30 ` Eli Zaretskii 1 sibling, 0 replies; 48+ messages in thread From: martin rudalics @ 2013-12-05 18:27 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 > Yes, and that's when it aborts on my machine. Do it several times and > quickly, if it doesn't happen otherwise. Doesn't happen here. Probably you have some transitional effects (or whatever they are called in English) activated on your Windows. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-05 18:21 ` Eli Zaretskii 2013-12-05 18:27 ` martin rudalics @ 2013-12-05 18:30 ` Eli Zaretskii 2013-12-06 14:32 ` martin rudalics 1 sibling, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-05 18:30 UTC (permalink / raw) To: rudalics; +Cc: 16051 > Date: Thu, 05 Dec 2013 20:21:42 +0200 > From: Eli Zaretskii <eliz@gnu.org> > Cc: 16051@debbugs.gnu.org > > > Date: Thu, 05 Dec 2013 18:59:33 +0100 > > From: martin rudalics <rudalics@gmx.at> > > CC: drew.adams@oracle.com, 16051@debbugs.gnu.org > > > > > Did you drag the mouse far enough to the left? > > > > How could I? It stops as expected when a minimum width > > is encountered. > > Yes, and that's when it aborts on my machine. Do it several times and > quickly, if it doesn't happen otherwise. FWIW, it aborts because 'row' is 7, whereas matrix->nrows is 5. From these numbers, I'm guessing that the problem happens when Emacs tries to redisplay the tool-bar window (which gets taller when you shrink the frame width like this). Some missing block_input somewhere, perhaps? ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-05 18:30 ` Eli Zaretskii @ 2013-12-06 14:32 ` martin rudalics 2013-12-06 15:31 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-06 14:32 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 > FWIW, it aborts because 'row' is 7, whereas matrix->nrows is 5. From > these numbers, I'm guessing that the problem happens when Emacs tries > to redisplay the tool-bar window (which gets taller when you shrink > the frame width like this). > > Some missing block_input somewhere, perhaps? Maybe I don't get it then because I build without image support. But I can't reproduce it on Debian where I have image support. What is your oldest build where this abort occurs? martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-06 14:32 ` martin rudalics @ 2013-12-06 15:31 ` Eli Zaretskii 2013-12-06 16:21 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-06 15:31 UTC (permalink / raw) To: martin rudalics; +Cc: 16051 > Date: Fri, 06 Dec 2013 15:32:24 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: 16051@debbugs.gnu.org > > > FWIW, it aborts because 'row' is 7, whereas matrix->nrows is 5. From > > these numbers, I'm guessing that the problem happens when Emacs tries > > to redisplay the tool-bar window (which gets taller when you shrink > > the frame width like this). > > > > Some missing block_input somewhere, perhaps? > > Maybe I don't get it then because I build without image support. What, not even XPM? That's all that is needed in "emacs -Q". > But I can't reproduce it on Debian where I have image support. Depending on the toolkit, Emacs does not necessarily draw the tool bar on Unix. > What is your oldest build where this abort occurs? It occurs as far back as Oct 19. I think this is an old bug, so you don't need to worry. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-06 15:31 ` Eli Zaretskii @ 2013-12-06 16:21 ` martin rudalics 2013-12-06 18:16 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-06 16:21 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 >> Maybe I don't get it then because I build without image support. > > What, not even XPM? That's all that is needed in "emacs -Q". I always compiled --without-xpm. But with MSYS I apparently don't pass this option any more. What happens in configure if it's not here? In any case I can't find the libraries anywhere on my system. Funny. >> But I can't reproduce it on Debian where I have image support. > > Depending on the toolkit, Emacs does not necessarily draw the tool bar > on Unix. This is with-x-toolkit=no. >> What is your oldest build where this abort occurs? > > It occurs as far back as Oct 19. I think this is an old bug, so you > don't need to worry. Does it occur with Emacs 24.3 ? martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-06 16:21 ` martin rudalics @ 2013-12-06 18:16 ` Eli Zaretskii 2013-12-06 18:57 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-06 18:16 UTC (permalink / raw) To: martin rudalics; +Cc: 16051 > Date: Fri, 06 Dec 2013 17:21:00 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: 16051@debbugs.gnu.org > > >> Maybe I don't get it then because I build without image support. > > > > What, not even XPM? That's all that is needed in "emacs -Q". > > I always compiled --without-xpm. But with MSYS I apparently don't pass > this option any more. What happens in configure if it's not here? In > any case I can't find the libraries anywhere on my system. Funny. > > >> But I can't reproduce it on Debian where I have image support. > > > > Depending on the toolkit, Emacs does not necessarily draw the tool bar > > on Unix. > > This is with-x-toolkit=no. So what kind of tool bar you get with that? (I didn't see such a build in a long time.) > >> What is your oldest build where this abort occurs? > > > > It occurs as far back as Oct 19. I think this is an old bug, so you > > don't need to worry. > > Does it occur with Emacs 24.3 ? No. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-06 18:16 ` Eli Zaretskii @ 2013-12-06 18:57 ` martin rudalics 2013-12-06 19:07 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-06 18:57 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 > So what kind of tool bar you get with that? (I didn't see such a > build in a long time.) How can I tell you? I could send you a screenshot. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-06 18:57 ` martin rudalics @ 2013-12-06 19:07 ` Eli Zaretskii 2013-12-07 12:25 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-06 19:07 UTC (permalink / raw) To: martin rudalics; +Cc: 16051 > Date: Fri, 06 Dec 2013 19:57:03 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: 16051@debbugs.gnu.org > > > So what kind of tool bar you get with that? (I didn't see such a > > build in a long time.) > > How can I tell you? I could send you a screenshot. Yes, please. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-06 19:07 ` Eli Zaretskii @ 2013-12-07 12:25 ` martin rudalics 2013-12-07 12:31 ` martin rudalics 2013-12-07 13:12 ` Eli Zaretskii 0 siblings, 2 replies; 48+ messages in thread From: martin rudalics @ 2013-12-07 12:25 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 >> How can I tell you? I could send you a screenshot. > > Yes, please. Attached find two screenshots. The Windows one is from a build configured as "CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=/c/emacs/... --enable-checking=yes --enable-gcc-warnings=yes --enable-check-lisp-object-type=yes" The XFCE is from a build configured as "CFLAGS='-O0 -g3' ./configure --without-tiff --with-x-toolkit=no --enable-checking=yes --enable-check-lisp-object-type=yes" Can you say what the build scripts did? I never cared about these because I don't use the toolbar. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-07 12:25 ` martin rudalics @ 2013-12-07 12:31 ` martin rudalics 2013-12-07 13:12 ` Eli Zaretskii 1 sibling, 0 replies; 48+ messages in thread From: martin rudalics @ 2013-12-07 12:31 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 [-- Attachment #1: Type: text/plain, Size: 73 bytes --] > Attached find two screenshots. And now I really attach them. martin [-- Attachment #2: Windows.png --] [-- Type: image/png, Size: 6254 bytes --] [-- Attachment #3: XFCE.png --] [-- Type: image/png, Size: 28339 bytes --] ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-07 12:25 ` martin rudalics 2013-12-07 12:31 ` martin rudalics @ 2013-12-07 13:12 ` Eli Zaretskii 2013-12-07 14:23 ` martin rudalics 1 sibling, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-07 13:12 UTC (permalink / raw) To: martin rudalics; +Cc: 16051 > Date: Sat, 07 Dec 2013 13:25:06 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: 16051@debbugs.gnu.org > > >> How can I tell you? I could send you a screenshot. > > > > Yes, please. > > Attached find two screenshots. The Windows one is from a build > configured as > > "CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=/c/emacs/... --enable-checking=yes --enable-gcc-warnings=yes --enable-check-lisp-object-type=yes" > > The XFCE is from a build configured as > > "CFLAGS='-O0 -g3' ./configure --without-tiff --with-x-toolkit=no --enable-checking=yes --enable-check-lisp-object-type=yes" Now I understand why your build doesn't crash: you didn't specify GLYPH_DEBUG. I build with --enable-checking='yes,glyphs'. The function where Emacs hits the assertion is not compiled in without GLYPH_DEBUG being defined. > Can you say what the build scripts did? Not sure what are you asking. The Windows build seems indeed to be devoid of XPM, but the Unix build does display color icons on the toolbar. Try using image-type-available-p to see which image types are supported. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-07 13:12 ` Eli Zaretskii @ 2013-12-07 14:23 ` martin rudalics 2013-12-07 15:18 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-07 14:23 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 >> Attached find two screenshots. The Windows one is from a build >> configured as >> >> "CFLAGS='-O0 -g3' ./nt/msysconfig.sh --prefix=/c/emacs/... --enable-checking=yes --enable-gcc-warnings=yes --enable-check-lisp-object-type=yes" >> >> The XFCE is from a build configured as >> >> "CFLAGS='-O0 -g3' ./configure --without-tiff --with-x-toolkit=no --enable-checking=yes --enable-check-lisp-object-type=yes" > > Now I understand why your build doesn't crash: you didn't specify > GLYPH_DEBUG. I build with --enable-checking='yes,glyphs'. The > function where Emacs hits the assertion is not compiled in without > GLYPH_DEBUG being defined. OK. But Drew's didn't crash either and he talked about a hang IIRC. >> Can you say what the build scripts did? > > Not sure what are you asking. The Windows build seems indeed to be > devoid of XPM, Yes. Currently building as Does Emacs use -lXaw3d? no Does Emacs use -lXpm? no Does Emacs use -ljpeg? no Does Emacs use -ltiff? no Does Emacs use a gif library? no Does Emacs use -lpng? no Does Emacs use -lrsvg-2? no Does Emacs use imagemagick? no Why did the build script not complain (not that I mind - I rather prefer it this way)? Earlier I had to explicitly specify --without-xpm --without-png --without-jpeg --without-tiff --without-gif And BTW what happend to ./nt/msysconfig.sh? I just noticed bash: ./nt/msysconfig.sh: No such file or directory > but the Unix build does display color icons on the > toolbar. Try using image-type-available-p to see which image types > are supported. All but for tiff, as specified. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-07 14:23 ` martin rudalics @ 2013-12-07 15:18 ` Eli Zaretskii 2013-12-07 15:47 ` martin rudalics [not found] ` <<52A342F7.1070707@gmx.at> 0 siblings, 2 replies; 48+ messages in thread From: Eli Zaretskii @ 2013-12-07 15:18 UTC (permalink / raw) To: martin rudalics; +Cc: 16051 > Date: Sat, 07 Dec 2013 15:23:53 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: 16051@debbugs.gnu.org > > > Now I understand why your build doesn't crash: you didn't specify > > GLYPH_DEBUG. I build with --enable-checking='yes,glyphs'. The > > function where Emacs hits the assertion is not compiled in without > > GLYPH_DEBUG being defined. > > OK. But Drew's didn't crash either and he talked about a hang IIRC. His build is with GLYPH_DEBUG: In GNU Emacs 24.3.50.2 (i686-pc-mingw32) of 2013-11-28 on LEG570 Bzr revision: 115271 rgm@gnu.org-20131128203155-qjc1xsp19z2k64b2 Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1' I don't know why it didn't crash. > > Not sure what are you asking. The Windows build seems indeed to be > > devoid of XPM, > > Yes. Currently building as > > Does Emacs use -lXaw3d? no > Does Emacs use -lXpm? no > Does Emacs use -ljpeg? no > Does Emacs use -ltiff? no > Does Emacs use a gif library? no > Does Emacs use -lpng? no > Does Emacs use -lrsvg-2? no > Does Emacs use imagemagick? no > > Why did the build script not complain (not that I mind - I rather prefer > it this way)? Complain about what? It is perfectly OK to build without XPM, it's just not common. > Earlier I had to explicitly specify > > --without-xpm --without-png --without-jpeg --without-tiff --without-gif Maybe on Unix. > And BTW what happend to ./nt/msysconfig.sh? Its functionality was incorporated into configure. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-07 15:18 ` Eli Zaretskii @ 2013-12-07 15:47 ` martin rudalics 2013-12-07 16:28 ` Eli Zaretskii 2013-12-07 17:00 ` Dani Moncayo [not found] ` <<52A342F7.1070707@gmx.at> 1 sibling, 2 replies; 48+ messages in thread From: martin rudalics @ 2013-12-07 15:47 UTC (permalink / raw) To: Eli Zaretskii; +Cc: 16051 > In GNU Emacs 24.3.50.2 (i686-pc-mingw32) > of 2013-11-28 on LEG570 > Bzr revision: 115271 rgm@gnu.org-20131128203155-qjc1xsp19z2k64b2 > Windowing system distributor `Microsoft Corp.', version 6.1.7601 > Configured using: > `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1' How do you get this information? >> Earlier I had to explicitly specify >> >> --without-xpm --without-png --without-jpeg --without-tiff --without-gif > > Maybe on Unix. On Windows of course! >> And BTW what happend to ./nt/msysconfig.sh? > > Its functionality was incorporated into configure. OK. I see there must have been other changes as well. I currently do c:/Programme/MinGW/msys/1.0/bin/bash.exe --login -i -c "cd /c/emacs/trunk/ ; CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' --prefix=/c/emacs/trunk --enable-checking=yes --enable-gcc-warnings=yes --enable-check-lisp-object-type=yes" and am immediately told bash: --prefix=/c/emacs/trunk: No such file or directory but what's more annoying that apparently my gcc directives don't get through any more. I see, for example gcc -std=gnu99 -c -mtune=pentium4 -DUSE_CRT_DLL=1 -I /c/emacs/trunk/nt/inc -Demacs -I. -I. -I../lib -I./../lib -mtune=pentium4 -MMD -MF deps/firstfile.d -MP -g3 -O2 -gdwarf-2 firstfile.c that is -O0 has become -O2 IIUC. Any ideas? Thanks, martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-07 15:47 ` martin rudalics @ 2013-12-07 16:28 ` Eli Zaretskii 2013-12-07 17:00 ` Dani Moncayo 1 sibling, 0 replies; 48+ messages in thread From: Eli Zaretskii @ 2013-12-07 16:28 UTC (permalink / raw) To: martin rudalics; +Cc: 16051 > Date: Sat, 07 Dec 2013 16:47:03 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: 16051@debbugs.gnu.org > > > In GNU Emacs 24.3.50.2 (i686-pc-mingw32) > > of 2013-11-28 on LEG570 > > Bzr revision: 115271 rgm@gnu.org-20131128203155-qjc1xsp19z2k64b2 > > Windowing system distributor `Microsoft Corp.', version 6.1.7601 > > Configured using: > > `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1' > > How do you get this information? Drew reported it with his original bug report. > >> Earlier I had to explicitly specify > >> > >> --without-xpm --without-png --without-jpeg --without-tiff --without-gif > > > > Maybe on Unix. > > On Windows of course! > > >> And BTW what happend to ./nt/msysconfig.sh? > > > > Its functionality was incorporated into configure. > > OK. I see there must have been other changes as well. I currently do > > c:/Programme/MinGW/msys/1.0/bin/bash.exe --login -i -c "cd /c/emacs/trunk/ ; CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' --prefix=/c/emacs/trunk --enable-checking=yes --enable-gcc-warnings=yes --enable-check-lisp-object-type=yes" > > and am immediately told > > bash: --prefix=/c/emacs/trunk: No such file or directory > > but what's more annoying that apparently my gcc directives don't get > through any more. I see, for example > > gcc -std=gnu99 -c -mtune=pentium4 -DUSE_CRT_DLL=1 -I /c/emacs/trunk/nt/inc -Demacs -I. -I. -I../lib -I./../lib -mtune=pentium4 -MMD -MF deps/firstfile.d -MP -g3 -O2 -gdwarf-2 firstfile.c > > that is -O0 has become -O2 IIUC. Any ideas? None, except that I invoke the command from the Bash prompt. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-07 15:47 ` martin rudalics 2013-12-07 16:28 ` Eli Zaretskii @ 2013-12-07 17:00 ` Dani Moncayo 2013-12-07 17:36 ` martin rudalics 1 sibling, 1 reply; 48+ messages in thread From: Dani Moncayo @ 2013-12-07 17:00 UTC (permalink / raw) To: martin rudalics; +Cc: 16051 >>> And BTW what happend to ./nt/msysconfig.sh? >> >> Its functionality was incorporated into configure. > > OK. I see there must have been other changes as well. I currently do > > c:/Programme/MinGW/msys/1.0/bin/bash.exe --login -i -c "cd /c/emacs/trunk/ > ; CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' --prefix=/c/emacs/trunk > --enable-checking=yes --enable-gcc-warnings=yes > --enable-check-lisp-object-type=yes" > > and am immediately told > > bash: --prefix=/c/emacs/trunk: No such file or directory Your command should invoke the configure script. What you probably want to to is: c:/Programme/MinGW/msys/1.0/bin/bash.exe --login -i -c "cd /c/emacs/trunk/ ; CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' ./configure --prefix=/c/emacs/trunk --enable-checking=yes --enable-gcc-warnings=yes --enable-check-lisp-object-type=yes" HTH ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-07 17:00 ` Dani Moncayo @ 2013-12-07 17:36 ` martin rudalics 0 siblings, 0 replies; 48+ messages in thread From: martin rudalics @ 2013-12-07 17:36 UTC (permalink / raw) To: Dani Moncayo; +Cc: 16051 > Your command should invoke the configure script. What you probably > want to to is: > > c:/Programme/MinGW/msys/1.0/bin/bash.exe --login -i -c "cd > /c/emacs/trunk/ ; CPPFLAGS='-DGLYPH_DEBUG=1' CFLAGS='-O0 -g3' > ./configure --prefix=/c/emacs/trunk --enable-checking=yes > --enable-gcc-warnings=yes --enable-check-lisp-object-type=yes" Thanks Dani. Seems to work now. Apparently people on Windows never use the last two options ;-) martin ^ permalink raw reply [flat|nested] 48+ messages in thread
[parent not found: <<52A342F7.1070707@gmx.at>]
[parent not found: <<83siu4zkuh.fsf@gnu.org>]
* bug#16051: 24.3.50; Emacs hang - resize frame manually [not found] ` <<83siu4zkuh.fsf@gnu.org> @ 2013-12-07 20:37 ` Drew Adams 0 siblings, 0 replies; 48+ messages in thread From: Drew Adams @ 2013-12-07 20:37 UTC (permalink / raw) To: Eli Zaretskii, martin rudalics; +Cc: 16051 > > > In GNU Emacs 24.3.50.2 (i686-pc-mingw32) > > > of 2013-11-28 on LEG570 > > > Bzr revision: 115271 rgm@gnu.org-20131128203155-qjc1xsp19z2k64b2 > > > Windowing system distributor `Microsoft Corp.', version 6.1.7601 > > > Configured using: > > > `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=- > DGLYPH_DEBUG=1' > > > > How do you get this information? > > Drew reported it with his original bug report. It is inserted by `report-emacs-bug'. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-04 17:56 ` Eli Zaretskii 2013-12-05 14:03 ` martin rudalics @ 2014-12-25 10:55 ` martin rudalics 1 sibling, 0 replies; 48+ messages in thread From: martin rudalics @ 2014-12-25 10:55 UTC (permalink / raw) To: Drew Adams; +Cc: 16051-done >> emacs -Q >> >> Grab the right edge of the frame with your mouse and move it left. >> >> Move it far enough and the frame turns white and Emacs hangs. You will >> need to kill it using the task manager. This should work now. Closing. Thanks, martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-04 14:40 bug#16051: 24.3.50; Emacs hang - resize frame manually Drew Adams 2013-12-04 17:56 ` Eli Zaretskii @ 2013-12-21 13:44 ` Jarek Czekalski 2013-12-21 15:12 ` Eli Zaretskii 1 sibling, 1 reply; 48+ messages in thread From: Jarek Czekalski @ 2013-12-21 13:44 UTC (permalink / raw) To: 16051 The bug report seems to have been hijacked. Let's now get back to the subject: I reproduce the issue in r115660, with default building configuration (no checks). 1. emacs -Q 2. drag the bottom right corner of the window up and left 3. before you reach the up left corner of the window Emacs stops displaying its contents, only scroll-bars are visible - it hangs Not reproducable in 100%. The most easily when dragging slowly (only right edge of the window may suffice) to the left. Then it's noticeable, that it happens after reaching toolbar size, so it should wrap. Sometimes it's possible to avoid the freeze by doing quick movements. In my case this is the part (from xdisp.c:~13620) that replays infinitely (redisplay_internal does not end): if (f->fonts_changed) { adjust_frame_glyphs (f); f->fonts_changed = 0; printf("A"); fflush(stdout); //BS goto retry_frame; } Jarek ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-21 13:44 ` Jarek Czekalski @ 2013-12-21 15:12 ` Eli Zaretskii 2013-12-21 15:16 ` Eli Zaretskii 2013-12-21 15:46 ` Jarek Czekalski 0 siblings, 2 replies; 48+ messages in thread From: Eli Zaretskii @ 2013-12-21 15:12 UTC (permalink / raw) To: Jarek Czekalski; +Cc: 16051 > Date: Sat, 21 Dec 2013 14:44:36 +0100 > From: Jarek Czekalski <jarekczek@poczta.onet.pl> > > The bug report seems to have been hijacked. Let's now get back to the > subject: > > I reproduce the issue in r115660, with default building configuration > (no checks). > > 1. emacs -Q > 2. drag the bottom right corner of the window up and left > 3. before you reach the up left corner of the window Emacs stops > displaying its contents, only scroll-bars are visible - it hangs Why would you want to drag the bottom right corner so far left as to leave no space for displaying the windows? ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-21 15:12 ` Eli Zaretskii @ 2013-12-21 15:16 ` Eli Zaretskii 2013-12-21 15:46 ` Jarek Czekalski 1 sibling, 0 replies; 48+ messages in thread From: Eli Zaretskii @ 2013-12-21 15:16 UTC (permalink / raw) To: jarekczek; +Cc: 16051 > Date: Sat, 21 Dec 2013 17:12:24 +0200 > From: Eli Zaretskii <eliz@gnu.org> > Cc: 16051@debbugs.gnu.org > > > Date: Sat, 21 Dec 2013 14:44:36 +0100 > > From: Jarek Czekalski <jarekczek@poczta.onet.pl> > > > > The bug report seems to have been hijacked. Let's now get back to the > > subject: > > > > I reproduce the issue in r115660, with default building configuration > > (no checks). > > > > 1. emacs -Q > > 2. drag the bottom right corner of the window up and left > > 3. before you reach the up left corner of the window Emacs stops > > displaying its contents, only scroll-bars are visible - it hangs > > Why would you want to drag the bottom right corner so far left as to > leave no space for displaying the windows? Btw, it doesn't hang here: C-g gets control back. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-21 15:12 ` Eli Zaretskii 2013-12-21 15:16 ` Eli Zaretskii @ 2013-12-21 15:46 ` Jarek Czekalski 2013-12-21 16:19 ` Eli Zaretskii 1 sibling, 1 reply; 48+ messages in thread From: Jarek Czekalski @ 2013-12-21 15:46 UTC (permalink / raw) To: 16051 W dniu 2013-12-21 16:12, Eli Zaretskii pisze: > Why would you want to drag the bottom right corner so far left as to > leave no space for displaying the windows? To reproduce the issue and help Emacs development. I don't understand this question, by the way. If this is not extremely important let's don't investigate it further. I promise to stop unreasonable resizing of the windows, Emacs windows. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-21 15:46 ` Jarek Czekalski @ 2013-12-21 16:19 ` Eli Zaretskii 2013-12-21 17:13 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-21 16:19 UTC (permalink / raw) To: Jarek Czekalski; +Cc: 16051 > Date: Sat, 21 Dec 2013 16:46:50 +0100 > From: Jarek Czekalski <jarekczek@poczta.onet.pl> > > W dniu 2013-12-21 16:12, Eli Zaretskii pisze: > > Why would you want to drag the bottom right corner so far left as to > > leave no space for displaying the windows? > > To reproduce the issue and help Emacs development. I don't understand > this question, by the way. If this is not extremely important let's > don't investigate it further. I promise to stop unreasonable resizing of > the windows, Emacs windows. I don't think it's important, certainly not extremely important. You can hang Emacs with as little as '(while t)'. Users who do unreasonable things should expect trouble, because Emacs gives them a lot of rope to hang themselves. Of course, if someone comes up with a patch to prevent infinite redisplay cycles in this case, such a patch will be welcome. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-21 16:19 ` Eli Zaretskii @ 2013-12-21 17:13 ` martin rudalics 2013-12-21 18:48 ` Eli Zaretskii 2013-12-23 16:57 ` Eli Zaretskii 0 siblings, 2 replies; 48+ messages in thread From: martin rudalics @ 2013-12-21 17:13 UTC (permalink / raw) To: Eli Zaretskii; +Cc: Jarek Czekalski, 16051 > I don't think it's important, certainly not extremely important. You > can hang Emacs with as little as '(while t)'. Users who do > unreasonable things should expect trouble, because Emacs gives them a > lot of rope to hang themselves. If I do drag _very_ fast as described by the OP, Emacs reliably crashes here as: #0 terminate_due_to_signal (sig=22, backtrace_limit=2147483647) at emacs.c:351 #1 0x0116400a in die (msg=0x14763e0 "row >= 0 && row < matrix->nrows", file=0x147618c "dispnew.c", line=1369) at alloc.c:6742 #2 0x01004ed3 in matrix_row (matrix=0x36e2800, row=7) at dispnew.c:1369 #3 0x01040eaa in hscroll_window_tree (window=...) at xdisp.c:12610 #4 0x01041398 in hscroll_windows (window=...) at xdisp.c:12737 #5 0x010437bd in redisplay_internal () at xdisp.c:13631 #6 0x01044126 in redisplay_preserve_echo_area (from_where=11) at xdisp.c:13856 #7 0x011cd0f5 in wait_reading_process_output (time_limit=30, nsecs=0, read_kbd=-1, do_display=true, wait_for_cell=..., wait_proc=0x0, just_wait_proc=0) at process.c:4528 #8 0x0100eef8 in sit_for (timeout=..., reading=true, display_option=1) at dispnew.c:5801 #9 0x010f7e19 in read_char (commandflag=1, map=..., prev_event=..., used_mouse_menu=0x82f7ef, end_time=0x0) at keyboard.c:2802 #10 0x01104dcd in read_key_sequence (keybuf=0x82f8e4, bufsize=30, prompt=..., dont_downcase_last=false, can_return_switch_frame=true, fix_current_buffer=true, prevent_redisplay=false) at keyboard.c:9071 #11 0x010f5109 in command_loop_1 () at keyboard.c:1445 #12 0x0117ef24 in internal_condition_case (bfun=0x10f4d84 <command_loop_1>, handlers=..., hfun=0x10f45ef <cmd_error>) at eval.c:1344 #13 0x010f4a37 in command_loop_2 (ignore=...) at keyboard.c:1170 #14 0x0117e4d8 in internal_catch (tag=..., func=0x10f4a13 <command_loop_2>, arg=...) at eval.c:1108 #15 0x010f49f1 in command_loop () at keyboard.c:1149 #16 0x010f418b in recursive_edit_1 () at keyboard.c:777 #17 0x010f4348 in Frecursive_edit () at keyboard.c:841 #18 0x010f2522 in main (argc=2, argv=0xa32840) at emacs.c:1634 Lisp Backtrace: "redisplay_internal (C function)" (0x152db1c) I can't reproduce the crash with the toolbar turned off. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-21 17:13 ` martin rudalics @ 2013-12-21 18:48 ` Eli Zaretskii 2013-12-21 19:40 ` martin rudalics 2013-12-23 16:57 ` Eli Zaretskii 1 sibling, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-21 18:48 UTC (permalink / raw) To: martin rudalics; +Cc: jarekczek, 16051 > Date: Sat, 21 Dec 2013 18:13:25 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: Jarek Czekalski <jarekczek@poczta.onet.pl>, 16051@debbugs.gnu.org > > > I don't think it's important, certainly not extremely important. You > > can hang Emacs with as little as '(while t)'. Users who do > > unreasonable things should expect trouble, because Emacs gives them a > > lot of rope to hang themselves. > > If I do drag _very_ fast as described by the OP, Emacs reliably crashes > here as: > > > #0 terminate_due_to_signal (sig=22, backtrace_limit=2147483647) at emacs.c:351 > #1 0x0116400a in die (msg=0x14763e0 "row >= 0 && row < matrix->nrows", file=0x147618c "dispnew.c", line=1369) at alloc.c:6742 > #2 0x01004ed3 in matrix_row (matrix=0x36e2800, row=7) at dispnew.c:1369 Isn't that what I said in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16051#8 ? > I can't reproduce the crash with the toolbar turned off. Because the crash happens while we redraw the toolbar. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-21 18:48 ` Eli Zaretskii @ 2013-12-21 19:40 ` martin rudalics 0 siblings, 0 replies; 48+ messages in thread From: martin rudalics @ 2013-12-21 19:40 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jarekczek, 16051 > Isn't that what I said in > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16051#8 > > ? > >> I can't reproduce the crash with the toolbar turned off. > > Because the crash happens while we redraw the toolbar. Correct. My repentance finished up in the wrong thread. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-21 17:13 ` martin rudalics 2013-12-21 18:48 ` Eli Zaretskii @ 2013-12-23 16:57 ` Eli Zaretskii 2013-12-23 18:44 ` martin rudalics 1 sibling, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-23 16:57 UTC (permalink / raw) To: martin rudalics; +Cc: jarekczek, 16051 > Date: Sat, 21 Dec 2013 18:13:25 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: Jarek Czekalski <jarekczek@poczta.onet.pl>, 16051@debbugs.gnu.org > > > I don't think it's important, certainly not extremely important. You > > can hang Emacs with as little as '(while t)'. Users who do > > unreasonable things should expect trouble, because Emacs gives them a > > lot of rope to hang themselves. > > If I do drag _very_ fast as described by the OP, Emacs reliably crashes > here as: > > > #0 terminate_due_to_signal (sig=22, backtrace_limit=2147483647) at emacs.c:351 > #1 0x0116400a in die (msg=0x14763e0 "row >= 0 && row < matrix->nrows", file=0x147618c "dispnew.c", line=1369) at alloc.c:6742 > #2 0x01004ed3 in matrix_row (matrix=0x36e2800, row=7) at dispnew.c:1369 > #3 0x01040eaa in hscroll_window_tree (window=...) at xdisp.c:12610 > #4 0x01041398 in hscroll_windows (window=...) at xdisp.c:12737 > #5 0x010437bd in redisplay_internal () at xdisp.c:13631 > #6 0x01044126 in redisplay_preserve_echo_area (from_where=11) at xdisp.c:13856 It turns out this bug has 3 separate parts. 2 of them are very clear and uncontroversial, so I simply fixed them; see revision 115718 on the trunk. After that, there are no more assertion violations like above, and no hangs, and it is much harder to cause a redisplay loop. Also, the only redisplay loops I can trigger are immediately interrupted by C-g. But since such loops can still be triggered, there's another part to this riddle. Here, the problem and the solution seem clear to me, but since the code is quite deliberately doing what it does, I'd like to ask Martin about the underlying logic. I'm talking about this part of redisplay_tool_bar: if (change_height_p) { int new_lines = ((new_height + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f)); XSETFRAME (frame, f); Fmodify_frame_parameters (frame, list1 (Fcons (Qtool_bar_lines, make_number (new_lines)))); /* Always do that now. */ clear_glyph_matrix (w->desired_matrix); f->n_tool_bar_rows = nrows; f->fonts_changed = 1; return 1; } Why does it make sense to "always do that"? Suppose new_lines is exactly equal to the current number of canonical lines used by the tool-bar window (it can happen even if pixel sizes are different, due to integer truncation). Or suppose you are asking for N lines, but don't get it because the frame is too small. Why set the fonts_changed flag in those cases? That flag causes redisplay to give up, abandon the current glyph matrices, and retry anew. What happens with those endless cycles is precisely that: redisplay_tool_bar sets the fonts_changed flag, which causes redisplay_internal to retry, which again calls redisplay_tool_bar, which again sets the flag, etc., ad nauseam. If there is some reasoning behind this "always do that" logic, please describe it. Otherwise, I propose the patch below, which cures the problem altogether for me; if you agree, I will install it. As an aside, I stared for a long time at this part of w32fns.c:x_set_tool_bar_lines (which is part of the issue, because it is called by modify-frame-parameters, when the tool-bar-lines parameter is changed), and I still don't get why it does what it does: root_height = WINDOW_PIXEL_HEIGHT (XWINDOW (FRAME_ROOT_WINDOW (f))); if (root_height - delta < unit) { delta = root_height - unit; nlines = (root_height / unit) + min (1, (root_height % unit)); } First, delta is recomputed, but the result is never used. More importantly, you assign to nlines a value that is the size of the root window _plus_ one line? Did you mean minus instead? Finally, the corresponding xfns.c implementation still works in lines, not in pixels, as w32fns.c did before your pixelwise changes. Is this disparity on purpose or an oversight? Here's the patch I propose to solve the last part of this bug. It abandons the "do it always" method, and only changes the tool-bar-lines parameter and sets the fonts_changed flag if the required height of the tool bar differs from the current height by at least 1 canonical line, and if it is smaller than the maximum number of lines any window can get on this frame. --- src/xdisp.c~1 2013-12-23 18:20:09.678832900 +0200 +++ src/xdisp.c 2013-12-23 18:50:56.993834000 +0200 @@ -12289,18 +12289,24 @@ redisplay_tool_bar (struct frame *f) if (change_height_p) { + int old_lines = WINDOW_TOTAL_LINES (w); int new_lines = ((new_height + FRAME_LINE_HEIGHT (f) - 1) / FRAME_LINE_HEIGHT (f)); + int max_lines = + WINDOW_TOTAL_LINES (XWINDOW (FRAME_ROOT_WINDOW (f))) - 1; - XSETFRAME (frame, f); - Fmodify_frame_parameters (frame, - list1 (Fcons (Qtool_bar_lines, - make_number (new_lines)))); - /* Always do that now. */ - clear_glyph_matrix (w->desired_matrix); - f->n_tool_bar_rows = nrows; - f->fonts_changed = 1; - return 1; + if (new_lines <= max_lines + && eabs (new_lines - old_lines) >= 1) + { + XSETFRAME (frame, f); + Fmodify_frame_parameters (frame, + list1 (Fcons (Qtool_bar_lines, + make_number (new_lines)))); + clear_glyph_matrix (w->desired_matrix); + f->n_tool_bar_rows = nrows; + f->fonts_changed = 1; + return 1; + } } } } ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-23 16:57 ` Eli Zaretskii @ 2013-12-23 18:44 ` martin rudalics 2013-12-23 19:31 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-23 18:44 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jarekczek, 16051 > It turns out this bug has 3 separate parts. 2 of them are very clear > and uncontroversial, so I simply fixed them; see revision 115718 on > the trunk. After that, there are no more assertion violations like > above, and no hangs, and it is much harder to cause a redisplay loop. Thanks. - it.last_visible_x = FRAME_TOTAL_COLS (f) * FRAME_COLUMN_WIDTH (f); + it.last_visible_x = WINDOW_PIXEL_WIDTH (w); Wonderful. The effect of this was visible in the Lucid/Motif builds but since I hadn't seen it in the Windows build I didn't expect to find the cause in the toolkit independent part of the code. But is this related to the current bug? The second issue belongs in the category of things I expected to happen hoping that sooner or later you would detect and fix them. I would certainly be able to spend some time studying your fix and still not grasp it. > if (change_height_p) > { > int new_lines = ((new_height + FRAME_LINE_HEIGHT (f) - 1) > / FRAME_LINE_HEIGHT (f)); > > XSETFRAME (frame, f); > Fmodify_frame_parameters (frame, > list1 (Fcons (Qtool_bar_lines, > make_number (new_lines)))); > /* Always do that now. */ > clear_glyph_matrix (w->desired_matrix); > f->n_tool_bar_rows = nrows; > f->fonts_changed = 1; > return 1; > } > > Why does it make sense to "always do that"? Suppose new_lines is > exactly equal to the current number of canonical lines used by the > tool-bar window (it can happen even if pixel sizes are different, due > to integer truncation). Or suppose you are asking for N lines, but > don't get it because the frame is too small. Why set the > fonts_changed flag in those cases? That flag causes redisplay to give > up, abandon the current glyph matrices, and retry anew. What happens > with those endless cycles is precisely that: redisplay_tool_bar sets > the fonts_changed flag, which causes redisplay_internal to retry, > which again calls redisplay_tool_bar, which again sets the flag, > etc., ad nauseam. "Always" referred to the glyph matrix clearing part. I was completely ignorant of the fact that setting the fonts_changed flag would cause this to loop. Admittedly, I normally don't use the toolbar and so have not given it enough testing with more extreme behavior. As an aside, I have never been able to understand the purpose of the tool-bar-lines parameter. IIUC we are only supposed to read its value from Lisp but never to set it to anything but zero or one. Am I right? > If there is some reasoning behind this "always do that" logic, please > describe it. Otherwise, I propose the patch below, which cures the > problem altogether for me; if you agree, I will install it. I certainly agree :-) > As an aside, I stared for a long time at this part of > w32fns.c:x_set_tool_bar_lines (which is part of the issue, because it > is called by modify-frame-parameters, when the tool-bar-lines > parameter is changed), and I still don't get why it does what it does: > root_height = WINDOW_PIXEL_HEIGHT (XWINDOW (FRAME_ROOT_WINDOW (f))); > if (root_height - delta < unit) How would you know - it probably doesn't do anything reasonable. When we enter this part we see only the upper part of the first row of the toolbar, the rest of the toolbar, root and minibuffer window being clipped by the window manager. > { > delta = root_height - unit; > nlines = (root_height / unit) + min (1, (root_height % unit)); > } > > First, delta is recomputed, but the result is never used. More > importantly, you assign to nlines a value that is the size of the root > window _plus_ one line? Did you mean minus instead? Probably. If you have any good idea what to do here, please do it. IIUC we want to pretend that the frame has the full toolbar (probably as many rows as it has items), a one line root window and, if it's present, a one line minibuffer window. This should be robust enough to avoid a crash. But the underlying problem, namely that shrinking the width of the frame may mean that we'd have to enlarge its height, remains. Currently, our internal toolbar gets nominally larger than the containing frame. > Finally, the corresponding xfns.c implementation still works in lines, > not in pixels, as w32fns.c did before your pixelwise changes. Is this > disparity on purpose or an oversight? When I installed my changes I tested this only with the Windows and the Gtk builds. It's only now that I encountered problems with the Lucid and Motif builds. I'm working on this currently. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-23 18:44 ` martin rudalics @ 2013-12-23 19:31 ` Eli Zaretskii 2013-12-23 20:02 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-23 19:31 UTC (permalink / raw) To: martin rudalics; +Cc: jarekczek, 16051 > Date: Mon, 23 Dec 2013 19:44:33 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: jarekczek@poczta.onet.pl, 16051@debbugs.gnu.org > > - it.last_visible_x = FRAME_TOTAL_COLS (f) * FRAME_COLUMN_WIDTH (f); > + it.last_visible_x = WINDOW_PIXEL_WIDTH (w); > > Wonderful. The effect of this was visible in the Lucid/Motif builds but > since I hadn't seen it in the Windows build I didn't expect to find the > cause in the toolkit independent part of the code. But is this related > to the current bug? Yes, definitely. redisplay_tool_bar was using WINDOW_PIXEL_WIDTH, while tool_bar_height was using FRAME_TOTAL_COLS (f) * FRAME_COLUMN_WIDTH (f) so these two were inconsistent with each other, and when the former claimed (correctly) that there's not enough space to draw the tool bar in one row, tool_bar_height was (incorrectly) returning 1 as the required number of rows. And then you set the fonts_changed flag, which starts the infloop... > As an aside, I have never been able to understand the purpose of the > tool-bar-lines parameter. IIUC we are only supposed to read its value > from Lisp but never to set it to anything but zero or one. Am I right? If you are right, then I'm confused: the call to Fmodify_frame_parameters that changes the tool-bar-lines parameter leads to a call to x_set_tool_bar_lines, which in turn resizes the tool-bar window. And the value is certainly not always 1, I've seen it as large as 7. Maybe you meant the n_tool_bar_rows member of 'struct frame' instead? But that, too, is not always 1, it can be greater. Confused... > > If there is some reasoning behind this "always do that" logic, please > > describe it. Otherwise, I propose the patch below, which cures the > > problem altogether for me; if you agree, I will install it. > > I certainly agree :-) OK, installed as trunk revision 115720. > > As an aside, I stared for a long time at this part of > > w32fns.c:x_set_tool_bar_lines (which is part of the issue, because it > > is called by modify-frame-parameters, when the tool-bar-lines > > parameter is changed), and I still don't get why it does what it does: > > root_height = WINDOW_PIXEL_HEIGHT (XWINDOW (FRAME_ROOT_WINDOW (f))); > > if (root_height - delta < unit) > > How would you know - it probably doesn't do anything reasonable. When > we enter this part we see only the upper part of the first row of the > toolbar, the rest of the toolbar, root and minibuffer window being > clipped by the window manager. Actually, we enter there any time a change is requested for the frame's tool-bar-lines parameter, and the change is so large it will leave no space for the rest of the root window. > > { > > delta = root_height - unit; > > nlines = (root_height / unit) + min (1, (root_height % unit)); > > } > > > > First, delta is recomputed, but the result is never used. More > > importantly, you assign to nlines a value that is the size of the root > > window _plus_ one line? Did you mean minus instead? > > Probably. If you have any good idea what to do here, please do it. Well, the old code simply left at least one screen line to the window, and if the tool bar asked for more than that, its request was not honored: delta = nlines - FRAME_TOOL_BAR_LINES (f); /* Don't resize the tool-bar to more than we have room for. */ root_window = FRAME_ROOT_WINDOW (f); root_height = WINDOW_TOTAL_LINES (XWINDOW (root_window)); if (root_height - delta < 1) { delta = root_height - 1; nlines = FRAME_TOOL_BAR_LINES (f) + delta; } FRAME_TOOL_BAR_LINES (f) = nlines; Translation of this to pixels is straightforward, but it looks like you wanted to do something different here? > IIUC we want to pretend that the frame has the full toolbar (probably as > many rows as it has items), a one line root window and, if it's present, > a one line minibuffer window. This should be robust enough to avoid a > crash. There's no crash anymore, at least not on Windows. But doing what you suggest above means we will need to resize the entire frame, something we never did. > But the underlying problem, namely that shrinking the width of the frame > may mean that we'd have to enlarge its height, remains. Currently, our > internal toolbar gets nominally larger than the containing frame. It gets larger and is displayed only partially. I think this is reasonable under these circumstances: if the user does dumb things, which shouldn't we let her suffer? > > Finally, the corresponding xfns.c implementation still works in lines, > > not in pixels, as w32fns.c did before your pixelwise changes. Is this > > disparity on purpose or an oversight? > > When I installed my changes I tested this only with the Windows and the > Gtk builds. It's only now that I encountered problems with the Lucid > and Motif builds. I'm working on this currently. OK, thanks. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-23 19:31 ` Eli Zaretskii @ 2013-12-23 20:02 ` martin rudalics 2013-12-23 20:18 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-23 20:02 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jarekczek, 16051 > If you are right, then I'm confused: the call to > Fmodify_frame_parameters that changes the tool-bar-lines parameter > leads to a call to x_set_tool_bar_lines, which in turn resizes the > tool-bar window. And the value is certainly not always 1, I've seen > it as large as 7. This must be the display code which takes the deviation via the frame parameter to communicate the new size to resize_frame_windows. Not very clean IMHO. > Well, the old code simply left at least one screen line to the window, > and if the tool bar asked for more than that, its request was not > honored: This is not what I see with 24.3: With emacs -Q make the frame very narrow and shrink its height. Here I see 3 tool-bar lines but no root or minibuffer window. > delta = nlines - FRAME_TOOL_BAR_LINES (f); > > /* Don't resize the tool-bar to more than we have room for. */ > root_window = FRAME_ROOT_WINDOW (f); > root_height = WINDOW_TOTAL_LINES (XWINDOW (root_window)); > if (root_height - delta < 1) > { > delta = root_height - 1; > nlines = FRAME_TOOL_BAR_LINES (f) + delta; > } > > FRAME_TOOL_BAR_LINES (f) = nlines; I understand its meaning and also that the subsequent call to resize_frame_windows is OK. But, as stated above, the toolbar is not shrunk to one line. The change does not get propagated back to the display engine to display less lines. Or am I missing something? > Translation of this to pixels is straightforward, but it looks like > you wanted to do something different here? I can do that translation but would rather like to understand first what really goes on here. >> IIUC we want to pretend that the frame has the full toolbar (probably as >> many rows as it has items), a one line root window and, if it's present, >> a one line minibuffer window. This should be robust enough to avoid a >> crash. > > There's no crash anymore, at least not on Windows. But doing what you > suggest above means we will need to resize the entire frame, something > we never did. No. I meant to keep the frame size fixed at some minimum value and let the window manager do the clipping - just as it does now. >> But the underlying problem, namely that shrinking the width of the frame >> may mean that we'd have to enlarge its height, remains. Currently, our >> internal toolbar gets nominally larger than the containing frame. > > It gets larger and is displayed only partially. I think this is > reasonable under these circumstances: if the user does dumb things, > which shouldn't we let her suffer? The problem is not that it gets larger. The problem is that it gets larger than the containing frame. OTOH if Emacs thinks that it has only one line that might be good enough for us. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-23 20:02 ` martin rudalics @ 2013-12-23 20:18 ` Eli Zaretskii 2013-12-24 10:14 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-23 20:18 UTC (permalink / raw) To: martin rudalics; +Cc: jarekczek, 16051 > Date: Mon, 23 Dec 2013 21:02:24 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: jarekczek@poczta.onet.pl, 16051@debbugs.gnu.org > > > If you are right, then I'm confused: the call to > > Fmodify_frame_parameters that changes the tool-bar-lines parameter > > leads to a call to x_set_tool_bar_lines, which in turn resizes the > > tool-bar window. And the value is certainly not always 1, I've seen > > it as large as 7. > > This must be the display code which takes the deviation via the frame > parameter to communicate the new size to resize_frame_windows. Not very > clean IMHO. No, that's not what happens. What happens is this call sequence: Fmodify_frame_parameters | +------> x_set_frame_parameters | +-------> x_set_tool_bar_lines (The last call is via the FRAME_RIF (f)->frame_parm_handlers[] array.) > > Well, the old code simply left at least one screen line to the window, > > and if the tool bar asked for more than that, its request was not > > honored: > > This is not what I see with 24.3: With emacs -Q make the frame very > narrow and shrink its height. Here I see 3 tool-bar lines but no root > or minibuffer window. I'm talking about what the code did, not about the effect. FWIW, Emacs 24.3 just hits an assertion when I try that: xdisp.c:1053: Emacs fatal error: assertion failed: height >= 0 I guess your Emacs 24.3 is built without --enable-checking. > > delta = nlines - FRAME_TOOL_BAR_LINES (f); > > > > /* Don't resize the tool-bar to more than we have room for. */ > > root_window = FRAME_ROOT_WINDOW (f); > > root_height = WINDOW_TOTAL_LINES (XWINDOW (root_window)); > > if (root_height - delta < 1) > > { > > delta = root_height - 1; > > nlines = FRAME_TOOL_BAR_LINES (f) + delta; > > } > > > > FRAME_TOOL_BAR_LINES (f) = nlines; > > I understand its meaning and also that the subsequent call to > resize_frame_windows is OK. But, as stated above, the toolbar is not > shrunk to one line. The code above does not attempt to shrink the toolbar to one line, it limits the DELTA, i.e. the additional lines the toolbar will get, to the height of the frame's root window minus one line. IOW, it shrinks the rest of the root window to one line. > >> IIUC we want to pretend that the frame has the full toolbar (probably as > >> many rows as it has items), a one line root window and, if it's present, > >> a one line minibuffer window. This should be robust enough to avoid a > >> crash. > > > > There's no crash anymore, at least not on Windows. But doing what you > > suggest above means we will need to resize the entire frame, something > > we never did. > > No. I meant to keep the frame size fixed at some minimum value and let > the window manager do the clipping - just as it does now. The frame size should remain as it was -- as the user determined by dragging. We should not change it. The question is what value should we limit the tool bar to, given those constraints, and how much space should we leave to the rest of the root window of the frame. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-23 20:18 ` Eli Zaretskii @ 2013-12-24 10:14 ` martin rudalics 2013-12-24 17:34 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-24 10:14 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jarekczek, 16051 >> > If you are right, then I'm confused: the call to >> > Fmodify_frame_parameters that changes the tool-bar-lines parameter >> > leads to a call to x_set_tool_bar_lines, which in turn resizes the >> > tool-bar window. And the value is certainly not always 1, I've seen >> > it as large as 7. >> >> This must be the display code which takes the deviation via the frame >> parameter to communicate the new size to resize_frame_windows. Not very >> clean IMHO. > > No, that's not what happens. What happens is this call sequence: > > Fmodify_frame_parameters Who calls Fmodify_frame_parameters here? It's redisplay_tool_bar in if (new_height != WINDOW_PIXEL_HEIGHT (w)) ... Fmodify_frame_parameters (frame, list1 (Fcons (Qtool_bar_lines, make_number (new_lines)))); discovering that the present line doesn't suffice. > | > +------> x_set_frame_parameters > | > +-------> x_set_tool_bar_lines > > (The last call is via the FRAME_RIF (f)->frame_parm_handlers[] array.) > >> > Well, the old code simply left at least one screen line to the window, >> > and if the tool bar asked for more than that, its request was not >> > honored: >> >> This is not what I see with 24.3: With emacs -Q make the frame very >> narrow and shrink its height. Here I see 3 tool-bar lines but no root >> or minibuffer window. > > I'm talking about what the code did, not about the effect. FWIW, > Emacs 24.3 just hits an assertion when I try that: > > xdisp.c:1053: Emacs fatal error: assertion failed: height >= 0 > > I guess your Emacs 24.3 is built without --enable-checking. Probably. Not entirely relieving to see that the problem is not new. > The code above does not attempt to shrink the toolbar to one line, it > limits the DELTA, i.e. the additional lines the toolbar will get, to > the height of the frame's root window minus one line. IOW, it shrinks > the rest of the root window to one line. And this is completely wrong at this place. I already marked the problem when I applied my changes but forgot about it. It's here: /* Max tool-bar height. Basically, this is what makes all other windows disappear when the frame gets too small. Rethink this! */ #define MAX_FRAME_TOOL_BAR_HEIGHT(f) \ ((FRAME_LINE_HEIGHT (f) * FRAME_LINES (f))) This means that the toolbar is allowed to grasp the whole frame, killing everything else. >> No. I meant to keep the frame size fixed at some minimum value and let >> the window manager do the clipping - just as it does now. > > The frame size should remain as it was -- as the user determined by > dragging. But this means that we currently do change the frame size. > We should not change it. The question is what value should > we limit the tool bar to, given those constraints, and how much space > should we leave to the rest of the root window of the frame. What we do when there's no toolbar, I presume. That is, if there's not enough space, then kill the toolbar. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-24 10:14 ` martin rudalics @ 2013-12-24 17:34 ` Eli Zaretskii 2013-12-24 18:45 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-24 17:34 UTC (permalink / raw) To: martin rudalics; +Cc: jarekczek, 16051 > Date: Tue, 24 Dec 2013 11:14:25 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: jarekczek@poczta.onet.pl, 16051@debbugs.gnu.org > > >> > If you are right, then I'm confused: the call to > >> > Fmodify_frame_parameters that changes the tool-bar-lines parameter > >> > leads to a call to x_set_tool_bar_lines, which in turn resizes the > >> > tool-bar window. And the value is certainly not always 1, I've seen > >> > it as large as 7. > >> > >> This must be the display code which takes the deviation via the frame > >> parameter to communicate the new size to resize_frame_windows. Not very > >> clean IMHO. > > > > No, that's not what happens. What happens is this call sequence: > > > > Fmodify_frame_parameters > > Who calls Fmodify_frame_parameters here? It's redisplay_tool_bar in > > if (new_height != WINDOW_PIXEL_HEIGHT (w)) > ... > Fmodify_frame_parameters (frame, > list1 (Fcons (Qtool_bar_lines, > make_number (new_lines)))); > > discovering that the present line doesn't suffice. Right. > /* Max tool-bar height. Basically, this is what makes all other windows > disappear when the frame gets too small. Rethink this! */ > > #define MAX_FRAME_TOOL_BAR_HEIGHT(f) \ > ((FRAME_LINE_HEIGHT (f) * FRAME_LINES (f))) > > This means that the toolbar is allowed to grasp the whole frame, killing > everything else. Yes, it is. Not very nice, but if the user wants that, she will get what she asks for. > >> No. I meant to keep the frame size fixed at some minimum value and let > >> the window manager do the clipping - just as it does now. > > > > The frame size should remain as it was -- as the user determined by > > dragging. > > But this means that we currently do change the frame size. I think we are miscommunicating, because we certainly don't change the frame size; the user does. > > We should not change it. The question is what value should > > we limit the tool bar to, given those constraints, and how much space > > should we leave to the rest of the root window of the frame. > > What we do when there's no toolbar, I presume. That is, if there's not > enough space, then kill the toolbar. That's too drastic I think. We are perfectly capable of displaying the tool bar truncated to the part that can be rendered. If the user doesn't like that, she can always turn off the tool bar manually. After all, it's the user who caused this. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-24 17:34 ` Eli Zaretskii @ 2013-12-24 18:45 ` martin rudalics 2013-12-24 18:55 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-24 18:45 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jarekczek, 16051 >> > The frame size should remain as it was -- as the user determined by >> > dragging. >> >> But this means that we currently do change the frame size. > > I think we are miscommunicating, because we certainly don't change the > frame size; the user does. Tha user only asks us to change it. And the point I wanted to make here is that instead of changing it we could refuse to change it, either by (1) setting the according wm hints, or by (2) issuing a re-resize request to the wm, or by (3) simply not processing the new frame size and let the wm do the clipping. Now (1) seems difficult because people can change height and width at the same time and with a wrapping toolbar we hardly can specify the proper hints here (essentially we would have to be able to pass the minimum size of the Emacs window to the wm). (2) is not nice although we do something similar already IIRC. So my preference for this is (3). Which would just imply that the size of an Emacs frame does not correspond to what the user sees. >> > We should not change it. The question is what value should >> > we limit the tool bar to, given those constraints, and how much space >> > should we leave to the rest of the root window of the frame. >> >> What we do when there's no toolbar, I presume. That is, if there's not >> enough space, then kill the toolbar. > > That's too drastic I think. We are perfectly capable of displaying > the tool bar truncated to the part that can be rendered. If the user > doesn't like that, she can always turn off the tool bar manually. > After all, it's the user who caused this. It's not a question of what we can display. The problem is that our internal understanding of the geometry of a frame is broken when the toolbar gets a greater height than the containing frame. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-24 18:45 ` martin rudalics @ 2013-12-24 18:55 ` Eli Zaretskii 2013-12-26 11:51 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-24 18:55 UTC (permalink / raw) To: martin rudalics; +Cc: jarekczek, 16051 > Date: Tue, 24 Dec 2013 19:45:26 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: jarekczek@poczta.onet.pl, 16051@debbugs.gnu.org > > >> > The frame size should remain as it was -- as the user determined by > >> > dragging. > >> > >> But this means that we currently do change the frame size. > > > > I think we are miscommunicating, because we certainly don't change the > > frame size; the user does. > > Tha user only asks us to change it. And the point I wanted to make here > is that instead of changing it we could refuse to change it That'd be fine, if you know how to do that on all supported platforms. > (1) setting the according wm hints, or by > > (2) issuing a re-resize request to the wm, or by > > (3) simply not processing the new frame size and let the wm do the > clipping. > > Now (1) seems difficult because people can change height and width at > the same time and with a wrapping toolbar we hardly can specify the > proper hints here (essentially we would have to be able to pass the > minimum size of the Emacs window to the wm). (2) is not nice although > we do something similar already IIRC. > > So my preference for this is (3). Which would just imply that the size > of an Emacs frame does not correspond to what the user sees. I agree. I just hope it won't be too hard to do this. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-24 18:55 ` Eli Zaretskii @ 2013-12-26 11:51 ` martin rudalics 2013-12-26 17:30 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-26 11:51 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jarekczek, 16051 I now do two things: I do not shrink the root window to less than one line/column (though apparently setting a window's pixel size to zero or a negative value didn't harm even earlier) and never delete a subwindow when shrinking a frame. Frame size and toolbar/root window sizes still do not correspond. We've been living long enough with this issue. So let's see whether I've broken anything. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-26 11:51 ` martin rudalics @ 2013-12-26 17:30 ` Eli Zaretskii 2013-12-26 18:04 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-26 17:30 UTC (permalink / raw) To: martin rudalics; +Cc: jarekczek, 16051 > Date: Thu, 26 Dec 2013 12:51:59 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: jarekczek@poczta.onet.pl, 16051@debbugs.gnu.org > > I now do two things: I do not shrink the root window to less than one > line/column (though apparently setting a window's pixel size to zero or > a negative value didn't harm even earlier) and never delete a subwindow > when shrinking a frame. Frame size and toolbar/root window sizes still > do not correspond. We've been living long enough with this issue. So > let's see whether I've broken anything. Thanks. I don't see any problems with the new version, but I still can make the frame as small as just the tool bar, or even smaller. It looks like the leave one line/column strategy is being defeated by something. Not that I think it's terribly important to fix this. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-26 17:30 ` Eli Zaretskii @ 2013-12-26 18:04 ` martin rudalics 2013-12-26 18:47 ` Eli Zaretskii 0 siblings, 1 reply; 48+ messages in thread From: martin rudalics @ 2013-12-26 18:04 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jarekczek, 16051 > Thanks. I don't see any problems with the new version, but I still > can make the frame as small as just the tool bar, or even smaller. It > looks like the leave one line/column strategy is being defeated by > something. Not that I think it's terribly important to fix this. You can make the frame as small as the window manager allows it. But the root window should now be always at least one line/column large (earlier you could easily give it a negative size). So there's a loose synchronization between frame and root window size: If the frame is large enough, the root window will be fit into it and you can see it together with the toolbar and the minibuffer window. If the frame is not large enough, toolbar, root and minibuffer window together are larger than the frame and the window manager clips parts or all of them. This means that in certain states you cannot, for example, derive the size of the root window from the size of the frame. But this wasn't possible before my change either. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-26 18:04 ` martin rudalics @ 2013-12-26 18:47 ` Eli Zaretskii 2013-12-26 19:56 ` martin rudalics 0 siblings, 1 reply; 48+ messages in thread From: Eli Zaretskii @ 2013-12-26 18:47 UTC (permalink / raw) To: martin rudalics; +Cc: jarekczek, 16051 > Date: Thu, 26 Dec 2013 19:04:11 +0100 > From: martin rudalics <rudalics@gmx.at> > CC: jarekczek@poczta.onet.pl, 16051@debbugs.gnu.org > > > Thanks. I don't see any problems with the new version, but I still > > can make the frame as small as just the tool bar, or even smaller. It > > looks like the leave one line/column strategy is being defeated by > > something. Not that I think it's terribly important to fix this. > > You can make the frame as small as the window manager allows it. But > the root window should now be always at least one line/column large I'm actually able to make the frame so small that it consists only of the caption bar. No tool bar, no text area, nothing. ^ permalink raw reply [flat|nested] 48+ messages in thread
* bug#16051: 24.3.50; Emacs hang - resize frame manually 2013-12-26 18:47 ` Eli Zaretskii @ 2013-12-26 19:56 ` martin rudalics 0 siblings, 0 replies; 48+ messages in thread From: martin rudalics @ 2013-12-26 19:56 UTC (permalink / raw) To: Eli Zaretskii; +Cc: jarekczek, 16051 > I'm actually able to make the frame so small that it consists only of > the caption bar. No tool bar, no text area, nothing. As I mentioned earlier they are clipped by the window manager. You should see their real size by evaluating something like (defvar foo nil) (defun foo () (setq foo (cons (list (frame-height) (window-height (frame-root-window)) (window-height (minibuffer-window))) foo))) (add-hook 'window-configuration-change-hook 'foo) with emacs -Q and making the frame as small as you can. From the value of foo you will see that the frame height can drop to zero while the window heights remain positive (better seen with split windows now). Unfortunately, I still get crashes here and elsewhere - mostly related to minibuffer resizing with a tiny frame. martin ^ permalink raw reply [flat|nested] 48+ messages in thread
[parent not found: <<3eea48d4-9267-45fa-84c8-3eb9c9290558@default>]
[parent not found: <<83siu833gc.fsf@gnu.org>]
* bug#16051: 24.3.50; Emacs hang - resize frame manually [not found] ` <<83siu833gc.fsf@gnu.org> @ 2013-12-04 18:45 ` Drew Adams 0 siblings, 0 replies; 48+ messages in thread From: Drew Adams @ 2013-12-04 18:45 UTC (permalink / raw) To: Eli Zaretskii, Drew Adams; +Cc: 16051 > Don't you get an abort dialog? I do, and the backtrace is below: No. I got nothing at all - just a blank Emacs. But note the build I am using. (See bug #16028.) Perhaps you are using a more recent build. When #16028 is fixed I will use a more recent build, so I will have access to your added bactrace info. ^ permalink raw reply [flat|nested] 48+ messages in thread
end of thread, other threads:[~2014-12-25 10:55 UTC | newest] Thread overview: 48+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-04 14:40 bug#16051: 24.3.50; Emacs hang - resize frame manually Drew Adams 2013-12-04 17:56 ` Eli Zaretskii 2013-12-05 14:03 ` martin rudalics 2013-12-05 17:52 ` Eli Zaretskii 2013-12-05 17:59 ` martin rudalics 2013-12-05 18:21 ` Eli Zaretskii 2013-12-05 18:27 ` martin rudalics 2013-12-05 18:30 ` Eli Zaretskii 2013-12-06 14:32 ` martin rudalics 2013-12-06 15:31 ` Eli Zaretskii 2013-12-06 16:21 ` martin rudalics 2013-12-06 18:16 ` Eli Zaretskii 2013-12-06 18:57 ` martin rudalics 2013-12-06 19:07 ` Eli Zaretskii 2013-12-07 12:25 ` martin rudalics 2013-12-07 12:31 ` martin rudalics 2013-12-07 13:12 ` Eli Zaretskii 2013-12-07 14:23 ` martin rudalics 2013-12-07 15:18 ` Eli Zaretskii 2013-12-07 15:47 ` martin rudalics 2013-12-07 16:28 ` Eli Zaretskii 2013-12-07 17:00 ` Dani Moncayo 2013-12-07 17:36 ` martin rudalics [not found] ` <<52A342F7.1070707@gmx.at> [not found] ` <<83siu4zkuh.fsf@gnu.org> 2013-12-07 20:37 ` Drew Adams 2014-12-25 10:55 ` martin rudalics 2013-12-21 13:44 ` Jarek Czekalski 2013-12-21 15:12 ` Eli Zaretskii 2013-12-21 15:16 ` Eli Zaretskii 2013-12-21 15:46 ` Jarek Czekalski 2013-12-21 16:19 ` Eli Zaretskii 2013-12-21 17:13 ` martin rudalics 2013-12-21 18:48 ` Eli Zaretskii 2013-12-21 19:40 ` martin rudalics 2013-12-23 16:57 ` Eli Zaretskii 2013-12-23 18:44 ` martin rudalics 2013-12-23 19:31 ` Eli Zaretskii 2013-12-23 20:02 ` martin rudalics 2013-12-23 20:18 ` Eli Zaretskii 2013-12-24 10:14 ` martin rudalics 2013-12-24 17:34 ` Eli Zaretskii 2013-12-24 18:45 ` martin rudalics 2013-12-24 18:55 ` Eli Zaretskii 2013-12-26 11:51 ` martin rudalics 2013-12-26 17:30 ` Eli Zaretskii 2013-12-26 18:04 ` martin rudalics 2013-12-26 18:47 ` Eli Zaretskii 2013-12-26 19:56 ` martin rudalics [not found] <<3eea48d4-9267-45fa-84c8-3eb9c9290558@default> [not found] ` <<83siu833gc.fsf@gnu.org> 2013-12-04 18:45 ` Drew Adams
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.