gtk3: Save file choosers crash if you press Alt+R
Steps to reproduce
- Open a save file picker. (Tested in Firefox and Inkscape (GTK 3) and rnote (GTK 4).)
- Press Alt+D which jumps to the Desktop directory for some reason.
- In the location breadcrumb thing (now with two buttons, Home → Desktop), click on a different directory.
- Press Alt+R. Crash.
If step three is omitted, Alt+R transitions the breadcrumb thingy closed instead, seemingly opening the MRU list even though there is no “Recent” item in the left hand sidebar. If an open file picker is used instead (tested in Inkscape and gtk4-demo-application), there is a Recent item in the left hand sidebar, and the crash doesn’t happen (that item is instead visibly highlighted by the action).
I found this by discovering Alt+D by mistake (it’s… kinda mysterious, there’s no Desktop button anywhere, and why does that one directory get invisible special treatment?), and then trying all the keys (other than the obvious accesskeys &Cancel and &Save) to see if they did anything. One did!
Version information
Arch Linux, gtk3 3.24.34-1, gtk4 4.8.1-1.
Logs
I found and then exercised this in Firefox, so here are some crash logs from there:
- https://crash-stats.mozilla.org/report/index/5d8c7382-13c0-444b-9ea9-a4a320221003
- https://crash-stats.mozilla.org/report/index/8baa6e98-8428-46a3-8bd6-eaf570221003
- https://crash-stats.mozilla.org/report/index/fac2d826-f661-4e32-b455-7752e0221003
Two of them are in _gtk_path_bar_set_file
, the other in gtk_tree_model_get_valist
, with location_bar_update
being the the most recent shared ancestor.