Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Follow up on some bugs

Developers
dataangel
2004-10-14
2013-04-26
  • dataangel
    dataangel
    2004-10-14

    Well, you said you couldn't reproduce the hang bug so the first thing I did was test to see if by random chance it had been fixed in 3.5.9, but alas the problem is still there.

    I'm using Windows XP SP2 and Python 2.3.4 with DrPython 3.5.9.

    I open an interpreter from the program menu. I shrink its size down all the way so it isn't invisible. I end the interpreter from the program menu. I open another interpreter from the program menu, and it crashes.

    I say the program menu specifically because maybe you were opening/closing it a different way. I managed to write down the error I get:

    Assertion [line < pdoc->LinesTotal()] failed at ../../src/stc\scintilla\src\Editor.cxx 1825

    The second bug is that at least for me, the About DrPython help menu option is broken. I clicked it originally to see my version #, it gives me an error that it can't find the path specified. The problematic line is in DyPython.py:

    [code]
        def OnViewAbout(self, event):
            wx.Execute((self.prefs.documentationbrowser + ' "file:///' + self.programdirectory + '/documentation/about.html"'), wx.EXEC_ASYNC)   
    [/code]

    The bug is the 3 slashes after "file:". It tries to open file:///C:/ which on a windows box doesn't exist. self.programdirectory at least on a windows box already includes the drive letter, while that maybe necessary on *nix to start from the root folder. But in any case...

    Maybe wxPython requires you to do it that way, but it's probably a lot easier to simply use the webbrowser module:

    [code]
    import webbrowser
    webbrowser.open_new(self.programdirectory + '/documentation/about.html"')
    [/code]

    Hope that helps =)

    Also, I agree that the best option would be to have a plugin that lets you use the default wxPython open file dialog. This would help me greatly -- although an alternative might be (I haven't fiddled with wxPython) extending the wxPython class and adding bookmark support that way.

     
    • dataangel
      dataangel
      2004-10-14

      P.S. Great work on the fast response to bugs =)

       
    • :) Thanks (sorry for the delay on this one.  I've been  working on 3.6.0)

      The webbrowser bit is fixed in 3.6.0 (out soon or something like that).  I couldn't use the module, as it produced... let's say, erratic behaviour on linux.

      So I made the prepend 'file:///' an option.

      The assert error is an annoying little bug that I previously encountered only on linux, and miraculously dissapeared for a few versions (more likely, I did not trigger it again).

      I am posting a bug report about it to wxPython.  It is a particularly odd bug.

      The file dialog bit I am going to look at after I get 3.6.0 done.  I will either add support for the default dialog, or win32api.  I have not yet decided on that one.

      Cheers,
      Dan

       
    • I found a work around for the bug, that absolutely gets rid of it.

      It's ugly though.

      The solution?

      Add an extra line of text before using output.

      That's right.  Changing .ClearAll() to .SetText('\n') fixes the bug on both windows and linux.  I will try and find another work around, but will include that in 3.6.0 if nothing else pops up, since this is a very nasty bug indeed (I just produced it on windows.  It makes the program hang.  Thanks for the heads up.)

       
    • dataangel
      dataangel
      2004-10-18

      What do you mean when you say you made file:/// an option?  I have to choose an option to make the about dialog work? :P

       
    • :-P.

      This will actually not be checked on by default (meaning for most browsers, it should just work).  This seems to be an issue for firefox users on windows (it is fine on linux).

      Actually, As I was writing this, I found the real source of the bug.

      I just need to normalize the path when sending the argument.  That's it!

      :)  I've been having a night of these.

      Cheers,
      Dan.