Subject: bug#77988: 31.0.50; No more images after fullscreen and load-theme

From: Eli Zaretskii <[email-masked]>
Date: Fri, 23 May 2025 09:42:02 +0300

> From: Elijah Gabe Pérez <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Thu, 22 May 2025 13:59:32 -0600
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: Elijah Gabe Pérez <[email-masked]>
> >> Cc: [email-masked],  [email-masked],  [email-masked]
> >> Date: Wed, 21 May 2025 22:58:38 -0600
> >> 
> >> * (After the svg was displayed incorrectly):
> >> 
> >> (gdb) n
> >> 18364	  struct glyph *end = glyph + row->used[TEXT_AREA];
> >> (gdb) pgrow
> >> TEXT: 2 glyphs
> >>   0    0: IMAGE[26] slice=0,0,260,264 pos=1 w=260 a+d=132+132 MB
> >             ^^^^^^^^^
> >
> > Note that the display now uses image-cache slot 26, not 25.  So this:
> >
> >> (gdb) p *$17->image_cache->images[25]
> >
> > shows the wrong cache slot, slot 25 and not 26.
> 
> Oops, then I'm sending the new results again:

Thanks.  This part looks suspicious:

>   spec = {
>     i = 0x14fbfc3
>   },
>   dependencies = {
>     i = 0x14fc273
>   },

These are Lisp objects, and in the "good" case they were 64-bit
values:

>   spec = {
>     i = 0x7ffff4627b53
>   },
>   dependencies = {
>     i = 0x7ffff4627673
>   },

So it seems somehow the offending commit causes their truncation?  Or
maybe these Lisp objects were GC'ed (but how could that happen, when
all the images in the image cache are marked?).

Po Lu, would you please look into this soon?