Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress bar Tkinter error #46

Closed
jsnowacki opened this issue Jun 10, 2013 · 8 comments
Closed

Progress bar Tkinter error #46

jsnowacki opened this issue Jun 10, 2013 · 8 comments
Labels
Milestone

Comments

@jsnowacki
Copy link

Starting a run in PyMol 1.5.0.5 on custom Python 2.7 and Gromacs 4.5.5 on CentOS 6.3 results in the below exception:

Calculating topology using Force fields
Warning. Trying to ignore unnecessary hydrogen atoms.
Unhandled exception in thread started by
Traceback (most recent call last):
  File "/apps/pymol/1.5.0.5-x86_64/modules/pmg_tk/startup/dynamics_pymol_plugin.py", line 926, in bar_update
    steps_status_bar("only_bar", self.bar_widget)
  File "/apps/pymol/1.5.0.5-x86_64/modules/pmg_tk/startup/dynamics_pymol_plugin.py", line 1452, in steps_status_bar
    bar.configure(value=percent)
  File "/apps/pymol/1.5.0.5-x86_64/ext/lib/python2.7/lib-tk/Tkinter.py", line 1202, in configure
    return self._configure('configure', cnf, kw)
  File "/apps/pymol/1.5.0.5-x86_64/ext/lib/python2.7/lib-tk/Tkinter.py", line 1193, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
_tkinter.TclError: out of stack space (infinite loop?)
saving options

The result is that the run continues fine but progress bar is not updated correctly. Also, the buttons next to the progress bar do not change its state (label) at the end.

@ghost
Copy link

ghost commented Jun 11, 2013

The master branch of the plugin feature brand new progress bar rewritten from Tix to ttk. It probably require few more touches to eliminate last bugs. Your error seems to be the result of Tkinter not being thread safe, but updating status bar is done with separate thread. I should use Queue object instead.

@ghost ghost closed this as completed in 57de41d Aug 12, 2013
@ghost ghost reopened this Aug 12, 2013
@ghost
Copy link

ghost commented Aug 12, 2013

Updating progress bar should now be handled in thread safe way. Please test it before I close the issue.

@jsnowacki
Copy link
Author

Sorry for the delay, I was busy and missed the notification about the issue. I still seem to have the same problem on PyMOL 1.6.0 with the latest Dynamics from GitHub. Namely, the exception is thrown and the GUI does not seem to get updated correctly when simulations stop.

@ghost
Copy link

ghost commented Nov 7, 2013

Could you please paste here current error message, as I need to know, which line of code is still not thread safe. Thanks for testing!

@jsnowacki
Copy link
Author

Here you go:

Unhandled exception in thread started by
Traceback (most recent call last):
  File "/apps/pymol/1.6.0.0-x86_64/modules/pmg_tk/startup/dynamics_pymol_plugin.py", line 1063, in bar_update
    root = Tk()
  File "/apps/pymol/1.6.0.0-x86_64/ext/lib/python2.7/lib-tk/Tkinter.py", line 1685, in __init__
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: out of stack space (infinite loop?)

Please let me know if you want me to repeat the test. Cheers!

ghost pushed a commit that referenced this issue Nov 25, 2013
@ghost
Copy link

ghost commented Nov 25, 2013

Hi,
Please check if everything works fine now.

@jsnowacki
Copy link
Author

Error is gone now. Seems to work fine now. Thanks.

I noticed a smell glitch though: if I start calculations and have a fatal error of the calculation setup, which effectively stops the calculations, the start button is still pressed as if they were still running. Also, hitting stop and start again in the same calculation window does not produce the error again as if it does not do anything. I just wanted to highlight that as I do not know if this is an expected behaviour or not.

Cheers,

Jakub

@ghost
Copy link

ghost commented Nov 26, 2013

I am glad, that we got rid of this pesky bug. I have moved your new observation to #49 .
Please continue testing software and provide your feedback. I am closing this Issue now.

@ghost ghost closed this as completed Nov 26, 2013
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant