File chooser resets folder to home

Bug #1063724 reported by Consumology
48
This bug affects 9 people
Affects Status Importance Assigned to Milestone
SoundConverter
Fix Released
Critical
GautierPortet

Bug Description

When I select wav files via "Add folder" SoundConverter 2.0.3 freezes in latest Quantal 64bit. However when I select the files via "Add files" everything works just fine.

Revision history for this message
GautierPortet (kassoulet) wrote :

Could you please try with the latest version please (2.0.4) to see if this is fixed?

Changed in soundconverter:
assignee: nobody → GautierPortet (kassoulet)
Revision history for this message
Consumology (hans-georg-schmid) wrote :

I installed 2.0.4 from source. Exactly the same behaviour as with 2.0.3!

Revision history for this message
GautierPortet (kassoulet) wrote :

I do not reproduce the problem. Could you start "soundconverter --debug" in a terminal, re-do the action, and paste here the resulting output?

Changed in soundconverter:
status: New → Incomplete
importance: Undecided → Critical
Revision history for this message
Consumology (hans-georg-schmid) wrote :

Here is the output till it hangs:

soundconverter --debug
SoundConverter 2.0.4
  using Gstreamer version: 0.10.36
  using 4 thread(s)
  using deprecated gnomevfssrc

(soundconverter:28432): Gnome-WARNING **: Accessibility: failed to find module 'libgail-gnome' which is needed to make this application accessible
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
walking: 'file:///home/user'

Revision history for this message
GautierPortet (kassoulet) wrote :

SoundConverter displays the folder selector at the last opened location. And here, it tries to read your whole user folder. And it's slow.

Here is a simple fix:
- launch gconf-editor
- move to apps/SoundConverter folder
- unset the last-used-folder key
- enjoy!

Revision history for this message
Consumology (hans-georg-schmid) wrote :

Unfortunately that does not change anything. There was a last used location set, I unset it, but no changes. I even deleted the whole ~/.gconf/apps/SoundConverter and it still hangs with the above output.
On a sidenote: When I select a folder in Nautilus via right click and open it with SoundConverter it works without problems.

Revision history for this message
SteveHardyHastings (steve-hardy-hastings) wrote :

I'm not sure if this is related but when I go to “add folder” it takes a very long time and appears to end up adding every audio file in my home directory wherever it is.

Fresh install of Ubuntu 12.10 and then adding Sound converter from the softwhere center.

Steve

Changed in soundconverter:
status: Incomplete → Confirmed
Revision history for this message
Johannes Hell (johanneshell) wrote :

I've got the same problem. And i tried to set the output folder in the options window. Whatever folder I choose, soundconverter always sets it to my home folder. This bug makes soundconverter unusable for me.

Revision history for this message
Michael Schwendt (mschwendt) wrote :

The poor problem description given, I'm still unable to reproduce any such problem. I use Fedora, though, not Ubuntu. What exactly are the steps to reproduce this? The output folder in the preferences is completely separate from the last used input folder. And when does it hang? Upon browing in the file dialog already or only when "Open"ing a folder in the file dialog?

Revision history for this message
Michael Schwendt (mschwendt) wrote :

Ah, the problem setting the output folder should be a different one. It's reset when closing the dialog without selecting a folder. I'll examine this later...

Revision history for this message
Michael Schwendt (mschwendt) wrote :

So, GtkFileChooser requires the user to select an existing folder. That means highlighting it with a single-click, NOT double-clicking it to open it. The file chooser returns the name of the selected folder, NOT the currently open/viewed folder. That could be a bug in the GtkFileChooser, since it returns the last-used-folder when no folder is highlighted/selected.

Here's patch as a work-around that touches both the target folder in the preferences as well as the "Add Folder" button.

Revision history for this message
Consumology (hans-georg-schmid) wrote :

Michael, I'd like to try your patch, unfortunately I have no idea how I can apply it (Ubuntu 12.10).

Revision history for this message
Michael Schwendt (mschwendt) wrote :

The preference target folder case is not correct yet anyway... I'll revise it.

Revision history for this message
Michael Schwendt (mschwendt) wrote :

Hmm, I'm not so sure it can be worked around. There are too many ways one can navigate in the GtkFileChooser, then return to a different directory and exit the dialog without having selected any directory. And then it returns the start folder ($HOME) instead of the opened/viewed one.

Hmmm....

Revision history for this message
Michael Schwendt (mschwendt) wrote :
Revision history for this message
Michael Schwendt (mschwendt) wrote :

The consequences of the file chooser bug are that basically one can navigate deep into a directory tree via double-clicks, then exit the file chooser by clicking the "Open" bug, and instead of the opened folder it returns the home folder.

The idea for my work-around isn't bad and reduces the problem to a corner-case, but one still can find ways to navigate in the file chooser and end up with the home folder name instead of the opened/viewed folder. For example, if one returns to a folder in the "Recently used" list.

The user work-around is to never click "Open" without selecting/highlighting a folder.

Revision history for this message
Consumology (hans-georg-schmid) wrote :

Indeed, this way Sound Converter works as expected. Nicely figured out, thank you!

Revision history for this message
Michael Schwendt (mschwendt) wrote :

The bug can be fixed by retrieving the chosen folder from the dialog _before_ hiding the dialog. Can anyone confirm?

To apply the patch, open a terminal, become superuser root, cd to the place where the soundconverter ui.py file is placed, then run: patch -p2 < /where/the/patch/file/is

Revision history for this message
Michael Schwendt (mschwendt) wrote :

revised fix: also corrects the "last-used-folder" for the "Add Folder" button

Revision history for this message
Michael Schwendt (mschwendt) wrote :

To sum up, the patch fixes the following issues with the GtkFileChooser:

* output folder in Preferences resets to $HOME folder
* "Add Folder" button seems to hang, because it traverses the complete $HOME tree
* "Add Folder" button restarts at $HOME instead of the last used folder

summary: - SoundConverter hangs when selecting files from "Add folder"
+ File chooser resets folder to home
Revision history for this message
episto (episto) wrote : Re: [Bug 1063724] Re: File chooser resets folder to home

I apologize for indication of a duplicated bug. Thanks for patch!

Il 02/12/2012 13:17, Michael Schwendt ha scritto:
> To sum up, the patch fixes the following issues with the GtkFileChooser:
>
> * output folder in Preferences resets to $HOME folder
> * "Add Folder" button seems to hang, because it traverses the complete $HOME tree
> * "Add Folder" button restarts at $HOME instead of the last used folder
>
>
> ** Summary changed:
>
> - SoundConverter hangs when selecting files from "Add folder"
> + File chooser resets folder to home
>

Revision history for this message
GautierPortet (kassoulet) wrote :

Wow. Thanks Michael !

Changed in soundconverter:
status: Confirmed → Fix Committed
Changed in soundconverter:
milestone: none → 2.1.0
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.