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 699013 - Select a file window opens up blank when opened again
Select a file window opens up blank when opened again
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: display
3.8.x
Other Linux
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-04-27 05:13 UTC by Gursimran singh
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (184.71 KB, image/png)
2013-04-27 05:13 UTC, Gursimran singh
  Details
Messages that appear in console after I open the window again (4.60 KB, application/octet-stream)
2013-04-27 05:14 UTC, Gursimran singh
  Details
Test case (2.26 KB, text/x-vala)
2013-04-27 21:23 UTC, Gursimran singh
  Details
Patch for the bug (821 bytes, patch)
2013-04-30 06:10 UTC, Gursimran singh
reviewed Details | Review
wizard-source: Fixes FileChooser which opens blank second time (872 bytes, patch)
2013-05-02 22:49 UTC, Gursimran singh
committed Details | Review

Description Gursimran singh 2013-04-27 05:13:27 UTC
Created attachment 242636 [details]
Screenshot

When creating a box (domain) in "source selection", the "Select a file" window opens blank when reopened after canceling the previous window, disabling the user to choose any iso image.

Steps to reproduce the bug
1. Click New
2. Click Continue
3. Click Select a file
4. Click Cancel
5. Click Select a file (again)

The windows opens blank
Comment 1 Gursimran singh 2013-04-27 05:14:29 UTC
Created attachment 242637 [details]
Messages that appear in console after I open the window again
Comment 2 Zeeshan Ali 2013-04-27 13:34:48 UTC
This is similar to bug#698828 but not the same. Most likely a gtk+ issue. If you could write a test case (a simple app that creates a gtk+ dialog in the same way as Boxes does and then launch it twice), that would be very helpful.
Comment 3 Gursimran singh 2013-04-27 17:25:08 UTC
(In reply to comment #2)
> This is similar to bug#698828 but not the same. Most likely a gtk+ issue. If
> you could write a test case (a simple app that creates a gtk+ dialog in the
> same way as Boxes does and then launch it twice), that would be very helpful.

I guess, a test case will be apt to prove whether its a gtk+ issue or gnome-boxes one. I will look into that. 
By the way can you reproduce it?
Comment 4 Zeeshan Ali 2013-04-27 18:39:48 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > This is similar to bug#698828 but not the same. Most likely a gtk+ issue. If
> > you could write a test case (a simple app that creates a gtk+ dialog in the
> > same way as Boxes does and then launch it twice), that would be very helpful.
> 
> I guess, a test case will be apt to prove whether its a gtk+ issue or
> gnome-boxes one. 

Not only that but it will also make it easy for gtk+ devs (or us) to figure the cause and therefore solution.

> I will look into that. 

Cool, thanks.

> By the way can you reproduce it?

Yes.
Comment 5 Gursimran singh 2013-04-27 21:23:39 UTC
Created attachment 242686 [details]
Test case

The bug can not be reproduced anywhere (inside and outside jhbuild) using the
test case but it can still be reproduced with boxes.

Using
$ jhbuild run ./test_case    generates following in console

$ gursimran@debian:~/gsoc/rough$ jhbuild run ./test_case
Gtk-Message: Failed to load module "canberra-gtk-module"
GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not
be saved or shared with other applications.

The filechooser does not blanks out when opened second time. However it opens
with distorted animation to confirm bug#699014

Using simply
$ ./test_case   generates no output on console and works fine
Comment 6 Zeeshan Ali 2013-04-29 19:13:26 UTC
(In reply to comment #5)
> Created an attachment (id=242686) [details]
> Test case
> 
> The bug can not be reproduced anywhere (inside and outside jhbuild) using the
> test case but it can still be reproduced with boxes.
> 
> Using
> $ jhbuild run ./test_case    generates following in console
> 
> $ gursimran@debian:~/gsoc/rough$ jhbuild run ./test_case
> Gtk-Message: Failed to load module "canberra-gtk-module"
> GLib-GIO-Message: Using the 'memory' GSettings backend.  Your settings will not
> be saved or shared with other applications.
> 
> The filechooser does not blanks out when opened second time. However it opens
> with distorted animation to confirm bug#699014

The difference between your test app and Boxes is that former is calling 'dialog.destroy' while latter is calling 'dialog.hide'. Now we need a one-liner patch for this. :)

Please do read and follow the instructions here for patch contribution: http://live.gnome.org/Git/Developers#Contributing_patches
Comment 7 Gursimran singh 2013-04-30 06:10:58 UTC
Created attachment 242885 [details] [review]
Patch for the bug

Happy for my first patch to gnome-boxes
Comment 8 Christophe Fergeau 2013-04-30 09:08:07 UTC
Hmm this seems to point at an issue in gtk+. I assume you checked that without the patch you get the bug, and with the patch, the bug is gone?
Comment 9 Gursimran singh 2013-04-30 17:52:38 UTC
(In reply to comment #8)
> Hmm this seems to point at an issue in gtk+. I assume you checked that without
> the patch you get the bug, and with the patch, the bug is gone?

The bug is not there after I changed the sourcecode. I was able to reproduce the bug before (as in the screenshot).
Comment 10 Christophe Fergeau 2013-05-01 08:31:51 UTC
Good :) I'm also hitting this on my system with gtk+ master, this should also be reported against gtk+, especially if you have a small testcase for it ;)
Comment 11 Gursimran singh 2013-05-01 12:38:48 UTC
Thanks :D
I have already attached a test case, I guess it will suffice the purpose .
I will report a bug there as well and point a link to this bug
Comment 12 Christophe Fergeau 2013-05-01 13:17:38 UTC
What you suggest sounds good, though make sure you attach the test case to the gtk+ bug report, and add a link to that bug report here, thanks!
Comment 13 Gursimran singh 2013-05-01 22:02:57 UTC
Did as you said,
Reported GTK+ bug is bug#699376
Comment 14 Zeeshan Ali 2013-05-02 13:30:34 UTC
Review of attachment 242885 [details] [review]:

Since I'm hoping this is first of many commits from you, I'll be ask you to make all the changes then doing so for you while merging. :)

* Short log of the commit should ideally tell about the change to the code rather than the result of it (that should be in the details).
* Each line on details section should not exceed 74 characters/columns. I recently updated our wikipage about that: https://live.gnome.org/Git/CommitMessages
* Once you have filed the bug on gtk+, you want to refer to that in commit log details here. You can use 'bug#NUMBER' instead of putting the complete URL to not confuse git-bz.
* Keep in mind that your change is the best thing to do regardless of the gtk+ issue since the dialog is always created on the fly, the gtk+ issue only makes it mandatory.

10 bonus points for using git-bz. :) When attaching new version of this patch, do remember to use '-e' option of `git-bz attach` that makes it easy to mark previous patches obsolete.
Comment 15 Gursimran singh 2013-05-02 22:49:11 UTC
Created attachment 243123 [details] [review]
wizard-source: Fixes FileChooser which opens blank second time

Changed .hide() to .destroy() which is more appropriate as dialog is
always created on the fly. This also fixes the issue which has actual
origin in gtk+ bug#699376. The patch fixes bgo#699013 in boxes.
Comment 16 Zeeshan Ali 2013-05-03 00:29:42 UTC
Review of attachment 243123 [details] [review]:

Good work. Only one nitpick: short log is still telling the result rather than what is changed.

I'll merge it with micro changes. Thanks!
Comment 17 Zeeshan Ali 2013-05-03 00:31:48 UTC
Review of attachment 243123 [details] [review]:

Oh and it seems you didn't use git-bz for the second time although I mentioned the exact command to use. Any reason you chose to ditched git-bz?
Comment 18 Gursimran singh 2013-05-03 05:58:11 UTC
(In reply to comment #17)
> Review of attachment 243123 [details] [review]:
> 
> Oh and it seems you didn't use git-bz for the second time although I mentioned
> the exact command to use. Any reason you chose to ditched git-bz?

No, I'm quite sure I used git-bz
git-bz attach -e bugzilla.gnome.org:699013 HEAD
Comment 19 Gursimran singh 2013-05-03 05:58:56 UTC
(In reply to comment #17)
> Review of attachment 243123 [details] [review]:
> 
> Oh and it seems you didn't use git-bz for the second time although I mentioned
> the exact command to use. Any reason you chose to ditched git-bz?

I will try to improve this next time for sure :D
Comment 20 Zeeshan Ali 2013-05-03 13:18:09 UTC
(In reply to comment #19)
> (In reply to comment #17)
> > Review of attachment 243123 [details] [review] [details]:
> > 
> > Oh and it seems you didn't use git-bz for the second time although I mentioned
> > the exact command to use. Any reason you chose to ditched git-bz?
> 
> I will try to improve this next time for sure :D

No worries, i guess you just missed the option of obsoleting existing patch by 'uncommenting' the approp. line.
Comment 21 Gursimran singh 2013-05-03 15:50:31 UTC
(In reply to comment #20)
> (In reply to comment #19)
> > (In reply to comment #17)
> > > Review of attachment 243123 [details] [review] [details] [details]:
> > > 
> > > Oh and it seems you didn't use git-bz for the second time although I mentioned
> > > the exact command to use. Any reason you chose to ditched git-bz?
> > 
> > I will try to improve this next time for sure :D
> 
> No worries, i guess you just missed the option of obsoleting existing patch by
> 'uncommenting' the approp. line.

ya thats what i missed out.. :/