#113 DrPython 162 Freezes on Fedora 5

closed
nobody
None
5
2006-12-12
2006-11-25
daeveryman
No

Hello,

The DrPython 162 interface freezes on Fedora 5 when either of the following buttons is clicked:

'Python' button

'Import All' button

wxPython Version: 2.6.3.2
wxPython Platform: wxGTK, unicode, gtk2, wx-assertions-off, SWIG-1.3.27
Python Version: 2.4.2.final
Python Platform: linux2 - Fedora 5

Discussion

  • Logged In: YES
    user_id=772872
    Originator: NO

    Strange, on Windows XP this is working.
    Is it possible to track it down?

     
  • daeveryman
    daeveryman
    2006-11-27

    Logged In: YES
    user_id=1652854
    Originator: YES

    Works on my xp system also, but not on fc5.

    Will try to look into it.

     
  • daeveryman
    daeveryman
    2006-11-27

    Logged In: YES
    user_id=1652854
    Originator: YES

    A preliminary investigation has revealed that DrPython 162 freezes when either the 'Python' and 'Import All' button is clicked on fedora 5 due to the function call ExecutePython(self) (drpython.py; line 753), which is executed when either button is clicked.

    def ExecutePython(self):
    self.txtPrompt.pythonintepreter = 1
    self.ExecuteWithPython('', 'Running Python Interpreter', '-i', 'Python')
    i = self.promptPosition
    try:
    wx.Yield()
    except:
    pass
    self.txtPromptArray[i]._waitforoutput('>>>')
    self.txtPromptArray[i].ExecuteCommands(self.prefs.promptstartupscript)

    If the line ' self.txtPromptArray[i]._waitforoutput('>>>') ' is commented-out, clicking either the 'Python' or 'Import All' button no longer freezes the screen, and the user is free to execute python commands in the available python terminal.

    The ' _waitforoutput ' function (drPrompt.py; line 91) contains an ominous warning:

    def _waitforoutput(self, targetoutput):
    '''
    Dangerous! Only use this if you know what you are doing.
    Waits for output that has not yet appeared to show up
    in either the stdout or stderr of the current process.
    '''

    text = ''
    while True:
    if text.find(targetoutput) > -1:
    return
    text = self._addoutput()

    Altering the code in the above functions may prevent DrPython from freezing on fedora 5 (and other linux distrubutions).

    As a temporary solution, I have made the following modification to my version of the ExecutePython(self) function (drpython.py; line 753):

    if not ((wx.Platform == '__WXGTK__') or (wx.Platform == '__WXMOTIF__')):
    self.txtPromptArray[i]._waitforoutput('>>>')

    I hope the above helps.

    Dunderhead.

    _

     
  • Logged In: YES
    user_id=772872
    Originator: NO

    Thank you very much for tracking it down.
    I want to add it to the next version. I cannot promise, maybe this weekend or next weekend.
    Currently I installed Ubuntu Linux and tailor it to my needs.
    What I saw on Linux quick testing DrPyhton: O o o, there are still a lot of things to do.
    For example, if I close the source browser, the whole thing crashes with Gtk critical errors-

     
  • daeveryman
    daeveryman
    2006-11-29

    Logged In: YES
    user_id=1652854
    Originator: YES

    Hello Franz,

    Thanks for taking note of this bug.

    I haven't experienced any GTK crashes associated with the Source Browser on fc5 - very strange. I may add an extra partition to my hard drive at a later stage and install Ubuntu for testing purposes.

    Dunderhead.

     
    • status: open --> closed