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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 17 May 2025 10:38:19 +0300

> From: Elijah Gabe Pérez <[email-masked]>
> Cc: Alan Third <[email-masked]>,  [email-masked],
>   [email-masked]
> Date: Sat, 17 May 2025 00:17:17 -0600
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Are these backtraces before or after the problematic display happened?
> 
> Before (i guess).
> 
> The first one is just before exiting svg_load.
> And the others are when the svg image is going to be displayed.

We need to see what happens when the image is displayed correctly, and
then compare that with what happens when it is displayed incorrectly.

I suspect that something is wrong with the image cache.  So we need to
look at the image cache in both situations described above.

Can you show the data in the image cache in both situations?  The
function Frecenter is useful for getting control to GDB when you need.
So:

  $ gdb ./emacs
  ...
  (gdb) break Frecenter
  (gdb) r -Q

Then inside Emacs visit the gnus.svg file and make the frame
fullscreen:

  M-: (find-file "etc/images/gnus/gnus.svg") RET
  M-: (set-frame-parameter nil 'fullscreen 'fullboth) RET

Then trigger the breakpoint by typing C-l.  Then:

  (gdb) p Vframe_list
  (gdb) xcar

The last command with show something like

  $9 = (struct frame *) 0x90d31e8

(the numbers will be different in your case).  Then show the image
cache of that frame:

  (gdb) p $9->image_cache

(where $9 should be the same number as GDB shows you in the previous
line).  Post the results here.  Then let Emacs continue

  (gdb) c

Then do the last step of the recipe:

  M-: (load-theme 'modus-operandi) RET

And, assuming that the image becomes corrupted, type C-l to get
control back to GDB, and show the image cache again:

  (gdb) p $9->image_cache

and post the results.  It would be interesting to see the differences,
if any.