qt4 interface does not refresh until the script finishes

Bug #622669 reported by Anton Gladky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Invalid
Undecided
Unassigned

Bug Description

./examples/regular-sphere-pack.py is working normally, only when string 104 is commented.

http://bazaar.launchpad.net/%7Eyade-dev/yade/trunk/annotate/head%3A/examples/regular-sphere-pack/regular-sphere-pack.py#L104

When it is uncommented, the script should start automatically, but in this case Controller hangs and View window does not appear.

Revision history for this message
Chiara Modenese (chiara-modenese) wrote :

Hi Anton, this is a result of how qt4/ipython handle the "interaction loop" (technical term in the GUI programming, not InteractionLoop that we have in simulations) for processing user input. For now, there is no solution for that, one has to make sure the script finishes before the ui is usable. A way to do that is by using PyRunner with appropriate callback functions etc. I think that it will be solved with ipython 0.11, but I have to ask on their mailing list.

summary: - QT4 interface hangs, when O.run(Val) is in simulation script
+ qt4 interface does not refresh until the script finishes
Changed in yade:
status: New → Confirmed
Revision history for this message
Václav Šmilauer (eudoxos) wrote :

Workaround: make script finish early, which can be done by wrapping all functionality that is supposed to be executed after the initialization in functions and call them from PyRunner engines based on conditions you define.

This bug will not be resolved until we switch to ipython>0.10, because it is caused by the way it executes the gui loop.

Revision history for this message
Anton Gladky (gladky-anton) wrote :

The problem is resolved by changing:

O.run(10000,True) => O.run(10000)
http://bazaar.launchpad.net/~yade-dev/yade/trunk/view/head:/examples/packs/packs.py#L138

So, the wait() function causes a freeze.
http://bazaar.launchpad.net/~yade-dev/yade/trunk/view/head:/py/wrapper/yadeWrapper.cpp#L360

I am not sure is it correct solution or not.

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

It is a feature, not a bug, to me seems. Closing.

Changed in yade:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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