GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
504 stars 55 forks source link

[Bug]: Crash after clicking on embedded media into Mastodon's toot #1025

Closed FYHenry closed 1 week ago

FYHenry commented 1 week ago

Describe the bug

From Tuba

In rare cases click on embedded media into Mastodon toot can force Tuba to crash. The crash is triggered just after zooming the media. The playing overlay appears too before Tuba crashes.

Tuba shows a similar log like the issue #1006 (offload on).

From Firefox

From the Web browser the media can be read without error. The media format is MP3 or PNG.

Steps To Reproduce

  1. Run flatpak run Tuba dev.geopjr.Tuba,
  2. Search URL https://ludosphere.fr/@PolGM/112660922165799640 from the Search tab,
  3. Open the toot,
  4. Click one of the four embedded medias.

Logs and/or Screenshots

Debug log (with G_MESSAGES_DEBUG)

Substitution words : USERNAME, HOSTNAME and CDNPATH.

(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.217: Application.vala:247: os: GNOME 46 (Flatpak runtime)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.217: Application.vala:247: prefix: /app
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.217: Application.vala:247: flatpak: true
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.217: Application.vala:247: version: 0.8.0 (production)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.217: Application.vala:247: gtk: 4.14.4 (4.14.4)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.217: Application.vala:247: libadwaita: 1.5.1 (1.5.1)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.217: Application.vala:247: libsoup: 3.4.4 (3.4.4)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.217: Application.vala:247: libgtksourceview: 5.12.0 (5.12.0)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.220: SecretAccountStore.vala:9: Using libsecret v0.21.4
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.246: Network.vala:65: GET: https://HOSTNAME/api/v1/accounts/18185
Tuba-INFO: 22:59:13.246: Streams.vala:88: TubaMastodonAccount > https://HOSTNAME/api/v1/streaming?stream=user:notification
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.246: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=user:notification
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.246: Network.vala:65: GET: https://HOSTNAME/api/v1/markers?timeline[]=notifications
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.246: SecretAccountStore.vala:92: Loaded 1 accounts
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.246: AccountStore.vala:85: Activating @USERNAME@HOSTNAME…
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.246: Network.vala:65: GET: https://HOSTNAME/api/v1/accounts/verify_credentials
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.246: Network.vala:65: GET: https://HOSTNAME/api/v1/instance
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.246: Network.vala:65: GET: https://HOSTNAME/api/v1/custom_emojis
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.246: Network.vala:65: GET: https://HOSTNAME/api/v1/announcements
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.247: Application.vala:413: Presenting MainWindow
Tuba-INFO: 22:59:13.383: Streams.vala:88: TubaViewsHome > https://HOSTNAME/api/v1/streaming?stream=user
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.383: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=user
Tuba-INFO: 22:59:13.383: Streams.vala:94: TubaViewsHome X https://HOSTNAME/api/v1/streaming?stream=user
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.383: Streams.vala:99: Closing: https://HOSTNAME/api/v1/streaming?stream=user
Tuba-INFO: 22:59:13.383: Streams.vala:88: TubaViewsHome > https://HOSTNAME/api/v1/streaming?stream=user
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.383: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=user
Tuba-INFO: 22:59:13.386: Streams.vala:88: TubaViewsNotifications > https://HOSTNAME/api/v1/streaming?stream=user:notification
Tuba-INFO: 22:59:13.386: Streams.vala:94: TubaViewsNotifications X https://HOSTNAME/api/v1/streaming?stream=user:notification
Tuba-INFO: 22:59:13.386: Streams.vala:88: TubaViewsNotifications > https://HOSTNAME/api/v1/streaming?stream=user:notification
Tuba-INFO: 22:59:13.389: Streams.vala:88: TubaViewsConversations > https://HOSTNAME/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.389: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=direct
Tuba-INFO: 22:59:13.389: Streams.vala:94: TubaViewsConversations X https://HOSTNAME/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.389: Streams.vala:99: Closing: https://HOSTNAME/api/v1/streaming?stream=direct
Tuba-INFO: 22:59:13.389: Streams.vala:88: TubaViewsConversations > https://HOSTNAME/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.389: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.590: Network.vala:65: GET: https://HOSTNAME/api/v1/timelines/home?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.590: Network.vala:65: GET: https://HOSTNAME/api/v1/notifications?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:13.590: Network.vala:65: GET: https://HOSTNAME/api/v1/conversations?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:15.982: Network.vala:65: GET: https://HOSTNAME/api/v2/instance
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:15.983: Network.vala:65: GET: https://HOSTNAME/api/v1/notifications?min_id=4034
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:16.393: InstanceAccount.vala:200: @USERNAME@HOSTNAME: profile updated
(dev.geopjr.Tuba:2): Tuba-DEBUG: 22:59:17.579: Network.vala:65: GET: https://HOSTNAME/api/v1/accounts/relationships?id=6331
(dev.geopjr.Tuba:2): Tuba-DEBUG: 23:02:09.638: Network.vala:65: GET: https://HOSTNAME/api/v2/search?resolve=true&q=https%3A%2F%2Fludosphere.fr%2F%40PolGM%2F112660922165799640
(dev.geopjr.Tuba:2): Tuba-DEBUG: 23:03:49.893: Network.vala:65: GET: https://HOSTNAME/api/v1/statuses/112660923180001374/context
(dev.geopjr.Tuba:2): Tuba-DEBUG: 23:03:57.175: Host.vala:58: Downloading file: https://CDNPATH/cache/media_attachments/files/112/660/922/287/968/330/original/eec88ffccefca6d2.mp4…
(dev.geopjr.Tuba:2): Tuba-DEBUG: 23:03:57.175: Network.vala:65: GET: https://CDNPATH/cache/media_attachments/files/112/660/922/287/968/330/original/eec88ffccefca6d2.mp4

Critical log (Without G_MESSAGES_DEBUG)

**
Gsk:ERROR:../gsk/gskoffload.c:218:transform_rounded_rect: assertion failed: (gsk_transform_get_category (t) >= GSK_TRANSFORM_CATEGORY_2D_AFFINE)
Bail out! Gsk:ERROR:../gsk/gskoffload.c:218:transform_rounded_rect: assertion failed: (gsk_transform_get_category (t) >= GSK_TRANSFORM_CATEGORY_2D_AFFINE)

Instance Backend

Mastodon

Operating System

Debian 12.5 GNU/Linux (bookworm)

Package

Flatpak

Troubleshooting information

os: GNOME 46 (Flatpak runtime)
prefix: /app
flatpak: true
version: 0.8.0 (production)
gtk: 4.14.4 (4.14.4)
libadwaita: 1.5.1 (1.5.1)
libsoup: 3.4.4 (3.4.4)
libgtksourceview: 5.12.0 (5.12.0)

Additional Context

Mastodon instance versions : 4.2.9 for the toot writer and reader (me).

GeopJr commented 1 week ago

Thanks for raising this issue!

Could you try #1026 when the ci finishes?

I couldn't reproduce your issue but I found a different one that could be related. #1026 fixes a bug where the images had no clickable zoom buttons, if you were able to zoom, it's probably related!

GeopJr commented 1 week ago

I really need to push this ASAP, so if you or anyone is experiencing graphics_offload crashes, set use-graphics-offload to false: for flatpak that would be flatpak run --command=gsettings dev.geopjr.Tuba set dev.geopjr.Tuba use-graphics-offload false

This will be possible in the patch I'll publish in a second / 0.8.1

FYHenry commented 1 week ago

New final user test

After the last update to 0.8.1 I try again by the same process. I note the first opening of the media is a success, not the second.

Any interest to use the GTK Inspector[^1] to debug more ?

Logs and/or Screenshots

I run via G_MESSAGES_DEBUG=Tuba. Same substitution words.

Steps 1 and 2

(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.280: Application.vala:247: os: GNOME 46 (Flatpak runtime)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.280: Application.vala:247: prefix: /app
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.280: Application.vala:247: flatpak: true
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.280: Application.vala:247: version: 0.8.1 (production)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.280: Application.vala:247: gtk: 4.14.4 (4.14.4)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.280: Application.vala:247: libadwaita: 1.5.1 (1.5.1)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.280: Application.vala:247: libsoup: 3.4.4 (3.4.4)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.280: Application.vala:247: libgtksourceview: 5.12.0 (5.12.0)
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.282: SecretAccountStore.vala:9: Using libsecret v0.21.4
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: Network.vala:65: GET: https://HOSTNAME/api/v1/accounts/18185
Tuba-INFO: 21:49:30.307: Streams.vala:88: TubaMastodonAccount > https://HOSTNAME/api/v1/streaming?stream=user:notification
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=user:notification
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: Network.vala:65: GET: https://HOSTNAME/api/v1/markers?timeline[]=notifications
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: SecretAccountStore.vala:92: Loaded 1 accounts
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: AccountStore.vala:85: Activating @USERNAME@HOSTNAME…
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: Network.vala:65: GET: https://HOSTNAME/api/v1/accounts/verify_credentials
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: Network.vala:65: GET: https://HOSTNAME/api/v1/instance
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: Network.vala:65: GET: https://HOSTNAME/api/v1/custom_emojis
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: Network.vala:65: GET: https://HOSTNAME/api/v1/announcements
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.307: Application.vala:413: Presenting MainWindow
Tuba-INFO: 21:49:30.479: Streams.vala:88: TubaViewsHome > https://HOSTNAME/api/v1/streaming?stream=user
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.479: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=user
Tuba-INFO: 21:49:30.479: Streams.vala:94: TubaViewsHome X https://HOSTNAME/api/v1/streaming?stream=user
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.479: Streams.vala:99: Closing: https://HOSTNAME/api/v1/streaming?stream=user
Tuba-INFO: 21:49:30.479: Streams.vala:88: TubaViewsHome > https://HOSTNAME/api/v1/streaming?stream=user
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.479: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=user
Tuba-INFO: 21:49:30.482: Streams.vala:88: TubaViewsNotifications > https://HOSTNAME/api/v1/streaming?stream=user:notification
Tuba-INFO: 21:49:30.482: Streams.vala:94: TubaViewsNotifications X https://HOSTNAME/api/v1/streaming?stream=user:notification
Tuba-INFO: 21:49:30.482: Streams.vala:88: TubaViewsNotifications > https://HOSTNAME/api/v1/streaming?stream=user:notification
Tuba-INFO: 21:49:30.485: Streams.vala:88: TubaViewsConversations > https://HOSTNAME/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.485: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=direct
Tuba-INFO: 21:49:30.485: Streams.vala:94: TubaViewsConversations X https://HOSTNAME/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.485: Streams.vala:99: Closing: https://HOSTNAME/api/v1/streaming?stream=direct
Tuba-INFO: 21:49:30.485: Streams.vala:88: TubaViewsConversations > https://HOSTNAME/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.485: Streams.vala:68: Opening stream: https://HOSTNAME/api/v1/streaming?stream=direct
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.679: Network.vala:65: GET: https://HOSTNAME/api/v1/timelines/home?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.679: Network.vala:65: GET: https://HOSTNAME/api/v1/notifications?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:30.679: Network.vala:65: GET: https://HOSTNAME/api/v1/conversations?limit=20
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:33.579: Network.vala:65: GET: https://HOSTNAME/api/v2/instance
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:33.590: InstanceAccount.vala:200: @USERNAME@HOSTNAME: profile updated
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:33.658: Network.vala:65: GET: https://HOSTNAME/api/v1/notifications?min_id=4034
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:35.468: Network.vala:65: GET: https://HOSTNAME/api/v1/accounts/relationships?id=6331
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:49:46.192: Network.vala:65: GET: https://HOSTNAME/api/v2/search?resolve=true&q=https%3A%2F%2Fludosphere.fr%2F%40PolGM%2F112660922165799640

Step 3

(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:50:35.204: Network.vala:65: GET: https://HOSTNAME/api/v1/statuses/112660923180001374/context

(dev.geopjr.Tuba:2): Gtk-WARNING **: 21:50:35.926: GtkImage 0x55f1e05035a0 (image) reported min height -17, but sizes must be >= 0

(dev.geopjr.Tuba:2): Gtk-WARNING **: 21:50:35.926: GtkImage 0x55f1e0509fd0 (image) reported min height -16, but sizes must be >= 0

(dev.geopjr.Tuba:2): Gtk-WARNING **: 21:50:35.932: GtkImage 0x55f1e0563140 (image) reported min height -17, but sizes must be >= 0

(dev.geopjr.Tuba:2): Gtk-WARNING **: 21:50:35.932: GtkImage 0x55f1e0569700 (image) reported min height -16, but sizes must be >= 0

(dev.geopjr.Tuba:2): Gtk-WARNING **: 21:50:35.937: GtkImage 0x55f1e05c2310 (image) reported min height -17, but sizes must be >= 0

Step 4 (success!)

(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:51:36.787: Host.vala:58: Downloading file: https://CDNPATH/cache/media_attachments/files/112/660/922/287/968/330/original/eec88ffccefca6d2.mp4…
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:51:36.787: Host.vala:88:    OK: File already exists

New step : Click to exit the media[^2]

(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:52:13.581: MediaViewer.vala:238: Destroying MediaViewer.Item
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:52:13.581: MediaViewer.vala:238: Destroying MediaViewer.Item
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:52:13.581: MediaViewer.vala:238: Destroying MediaViewer.Item
(dev.geopjr.Tuba:2): Tuba-DEBUG: 21:52:13.582: MediaViewer.vala:238: Destroying MediaViewer.Item

Step 4 (failure!)

Same log.

Rare output

(dev.geopjr.Tuba:2): GStreamer-GL-CRITICAL **: 21:42:00.700: Failed to flush Wayland connection

Gdk-Message: 21:42:00.700: Error 22 (Argument invalide) dispatching to Wayland display.

Good new

I don't see the GSK error about gsk_transform_get_category.

Very good new !

I really need to push this ASAP, so if you or anyone is experiencing graphics_offload crashes, set use-graphics-offload to false: for flatpak that would be flatpak run --command=gsettings dev.geopjr.Tuba set dev.geopjr.Tuba use-graphics-offload false

This will be possible in the patch I'll publish in a second / 0.8.1

After setting use-graphics-offload to false I re-retried each step. It is a real success ! It doesn't crashes more.

[^1]: [ctrl]+[shift]+[I] to open the GTK Inspector in the GTK app. [^2]: Return button (left up).

GeopJr commented 1 week ago

Thanks for all the debugging! But unfortunately, this is 100% of GTK's Graphics Offload side. I haven't reported it upstream because I can't reproduce it reliably yet, but when I get some free time I'll work on a small reproducer.

All the fixes here so far have been mostly hacks around it :/

atirut-w commented 2 days ago

I haven't reported it upstream because I can't reproduce it reliably yet, but when I get some free time I'll work on a small reproducer.

Is there a newsletter channel for updates on that?

GeopJr commented 2 days ago

This issue probably