[No it is not week-end here but I have 21.2 on our new linux box]
ALTMARK(a)de.ibm.com writes:
5. Moved the mouse pointer out of the Ediff control buffer. Crash
...
#4 0x807cf7e in assert_failed ()
#5 0x8112604 in start_end_of_last_line ()
#6 0x8114f69 in pixel_to_glyph_translation ()
Ok, here is what happens.
The ediff window is very small. Thus if you run with the buffer tabs,
the buffer tabs take all the place of the window, so the buffers window
isn't actually displayed. Only the modeline is.
(Side issue: This window really shouldn't have tabs)
(Side issue: Why is the size of the gutters not taken into account to
set the frame size?)
Then you move the mouse outside. The mouse code tries to find the
nearest point in the buffer (pixel_to_glyph_translation), because the
displayed parts of the buffer are not near, it thinks the last
displayed line is closest and thus calls end_of_last_line (which is
really start_end_of_last_line).
These kinds of computation are really done in redisplay and thus
start_end_of_last_line calls point_in_line_start_cache to update the
cache that says where the display lines begin.
As the window really isn't displayed the display structures are empty
and thus point_in_line_start_cache does a quick minimal redisplay
(without actually updating the screen), that is the call to
update_line_start_cache on line 7254. As the cache is empty it hits
this code.
while (startp < old_lb || low_bound == -1)
{
int ic_elt;
Bufpos new_startp;
regenerate_window (w, startp, point, CMOTION_DISP);
update_internal_cache_list (w, CMOTION_DISP);
regenerate_window does that redisplaying.. However only the modeline
is displayed. update_internal_cache_list then copies all info form
the redisplay structures to a temporary working copy of the line start
cache. However as there aren't any real buffer lines displayed there
is no info to copy and the cache stays empty. That turns to be a known
problem
/* If this assert is triggered then regenerate_window failed
to layout a single line. That is not supposed to be
possible because we impose a minimum height on the buffer
and override vertical clip when we are in here. */
/* #### Ah, but it is because the window may temporarily
exist but not have any lines at all if the minibuffer is
real big. Look into that situation better. */
if (!Dynarr_length (internal_cache))
{
if (old_lb == -1 && low_bound == -1)
{
updating_line_start_cache = 0;
w->line_cache_validation_override--;
return;
}
and thus update_line_start_cache returns without doing anything and
leaving the cache empty. Then point_in_line_start_cache returns "-1"
because the value of window-start couldn't be find in the buffer.
This then triggers the abort.
The question is now how to solve it. Should we enforce the conditions
that part of a window should always be displayed? Should we remove the
abort and return a sensible guess? Should generate_window be fixed to
always layout a line regardless of whether it fixed?
Additionally, I see no gutter code in pixel_to_glyph_translation, is
that correct? Andy?
Jan