After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 484444 - Race condition in Save dialog
Race condition in Save dialog
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.10.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
filechooser-retest
Depends on:
Blocks:
 
 
Reported: 2007-10-07 16:26 UTC by Evert Verhellen
Modified: 2018-04-15 00:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18



Description Evert Verhellen 2007-10-07 16:26:45 UTC
There exists a race condition in the Save dialog that interferes with editing of the file name in the first few moments after the dialog is shown.

This is how to reproduce it:

1. I have an icon open in The GIMP, say e.g. "Application.ico".
2. I press [Shift]+[Control]+[S] so that the file dialog is displayed.
3. Once the Name field is drawn with a default value ("Application.ico" in this case), I can start typing in it. Note that the contents of the directory are not yet shown at this point (I assume that behind the scenes this is still being fetched).
4. I press [End] and hit [Backspace] 3 times to erase the "ico" part because I want to save it as PNG file "Application.png".
5. What happens next is that the directory listing is displayed but the Name field is unfortunately also re-updated and selected as a whole.
6. Apparently at least one (and maybe all) of the [Backspace] keys act upon the freshly updated Name field.
7. So what happens is that I'm left with a blank Name field instead of one that says "Application.". This is very annoying. I don't see why the Name field should be updated twice, so fixing that would probably also eliminate the race condition.

I have experienced this in The GIMP but also with Firefox (on Fedora 7). However, any GTK+ application is probably subject to it. Reproducing it is not easy as your PC may be too fast. Mine is a 1.6 GHz Intel Pentium 4 with 512M of RAM. My feeling is that the more files you have in the directory, the more chance you have to experience it as then the loading of the file list takes long enough. In Firefox, I encountered the problem when trying to save an image from a web page. It displays the default file name from the website. Then you start typing and ultimately the Name field information gets overwritten again by the same default file name, leaving only some of the remaining characters you typed.

Other information:
Comment 1 Timothy Arceri 2013-06-29 05:40:40 UTC
Hi Evert,

Can this still be reproduced with a current version of GTK?
Comment 2 Matthias Clasen 2018-02-10 05:26:11 UTC
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
Comment 3 Matthias Clasen 2018-04-15 00:36:38 UTC
As announced a while ago, we are migrating to gitlab, and bugs that haven't seen activity in the last year or so will be not be migrated, but closed out in bugzilla.

If this bug is still relevant to you, you can open a new issue describing the symptoms and how to reproduce it with gtk 3.22.x or master in gitlab:

https://gitlab.gnome.org/GNOME/gtk/issues/new