Subject: bug#19660: Acknowledgement (24.4.51; Crash in draw_row_fringe_bitmaps)

From: Kim Storm <[email-masked]>
Date: Mon, 26 Jan 2015 12:10:11 +0100

On 2015-01-25 16:46, Eli Zaretskii wrote:
>> From: "Jan D." <[email-masked]>
>> Date: Sun, 25 Jan 2015 10:17:20 +0100
>>
>> Fixed, but it would be nice to know why this function needs input blocked.
> This was there since day one, according to the history.  Unless Kim,
> who wrote it (CC'ed), can recollect why he put the assertion there,
> I'm afraid the reason is lost in time.  My wild guess would be that
> the reason is this function calls X APIs to actually draw stuff, and
> many of those block input.  Perhaps Kim wasn't sure whether input
> should be blocked here.
>
> If no other information emerges, my suggestion would be to remove the
> assertion on master, and see if we get any bug reports.
>
> Thanks.
>
Hi Eli

Well, the comment above the function says that it must be called
with input blocked, so the assert simply reflects that requirement.

Usually, draw_row_fringe_bitmaps is called from draw_window_fringes
which is guarded by block_input in all places.

However, the call to draw_row_fringe_bitmaps in xdisp.c:expose_line
is not explicitly guarded, but it is called from expose_window, which
has comment: Call this function with input blocked.

Looking at the code, this seems not to be true anymore, and so
it triggers the assert ...

I have no idea whether it is still needed to block input - but at the
time, I'm sure the assert was reasonable.

Kim