PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 728 - QFileDialog.getOpenFileNames never returns (hangs)
: QFileDialog.getOpenFileNames never returns (hangs)
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: 1.0.0
: PC Linux
: P2 normal
Assigned To: Hugo Parente Lima
:
:
:
  Show dependency treegraph
 
Reported: 2011-03-12 19:22 EET by János Illés
Modified: 2011-04-01 23:15 EEST (History)
8 users (show)

See Also:


Attachments
test case (193 bytes, application/octet-stream)
2011-03-15 19:07 EET, Hugo Parente Lima
Details

Note You need to log in before you can comment on or make changes to this bug.
Description János Illés 2011-03-12 19:22:19 EET
When calling QFileDialog.getOpenFileNames I get the file chooser dialog but
after the dialog is closed (by selecting a file or pressing cancel) the main
program just hangs, getOpenFileNames does not return any value. It happens
every time on linux and happens in windows when using the non-native dialog. In
win32 the native dialog works just fine.

I'm using Python 2.7 and Qt 4.7.2 with PySide 1.0.0

I thought maybe I did something wrong but it happens with this example too:
http://qt.gitorious.org/pyside/pyside-examples/blobs/master/examples/dialogs/standarddialogs.py
Comment 1 János Illés 2011-03-12 19:26:54 EET
When closing the freezed window in win32 the following message is written to
the command window, and only forced exit closes the application.

QObject::killTimers: timers cannot be stopped from another thread 

In linux no output is written to stdout and the application did not respond to
ctrl-c from the command line, but sigterm closes it.
Comment 2 János Illés 2011-03-14 13:52:27 EET
Attached strace to the process, apparently it waits on a futex.

$ strace -p 19386
Process 19386 attached - interrupt to quit
futex(0xa025854, FUTEX_WAIT_PRIVATE, 1, NULL) = ? ERESTARTSYS (To be restarted)
Comment 3 Hugo Parente Lima 2011-03-15 19:00:54 EET
I can't reproduce it here, but I'm using KDE and Qt 4.7.1, i.e., using KDE file
dialogs and using Qt without futexes.

Anyone else can test this bug with other configurations?
Comment 4 Hugo Parente Lima 2011-03-15 19:07:14 EET
Created attachment 284 [details]
test case

Now I can reproduce it! even with Qt version with pthreads instead of futexes.

It's only reproduceable if we don't use native dialogs.
Comment 5 Hugo Parente Lima 2011-03-15 22:32:06 EET
Raising priority to P2, as it freezes the entire process due to a deadlock.
Comment 6 Hugo Parente Lima 2011-03-21 20:58:07 EET
Fixed in commit:
pyside/189717cdb196e4f2f2d47f6fa93b78d2e2e47a42
Comment 7 Hugo Parente Lima 2011-04-01 23:15:55 EEST
Closing bug after release of PySide 1.0.1.