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

From: Elijah Gabe Pérez <[email-masked]>
Date: Mon, 19 May 2025 14:06:56 -0600

Eli Zaretskii <[email-masked]> writes:

>> 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.

I've followed all the steps, It doesn't seem that there are any
differences:

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

(gdb) p Vframe_list
$1 = {
  i = 0x7ffff185e2c3
}
(gdb) xcar
$2 = {
  i = 0xbd3a7d
}
(gdb) xframe
$3 = (struct frame *) 0xbd3a78
"gnus.svg - GNU Emacs at fedora"
(gdb) p $3->image_cache
$4 = (struct image_cache *) 0xc20740
(gdb) c
Continuing.

(After the svg was displayed incorrectly):
M-: (load-theme 'modus-operandi)
C-l

Thread 1 "emacs" hit Breakpoint 3, Frecenter (arg=..., redisplay=...) at window.c:6976
6976	  struct window *w = XWINDOW (selected_window);
(gdb) p $3->image_cache
$5 = (struct image_cache *) 0xc20740

-- 
                                          - E.G via GNU Emacs and Org.