#126 DrPython crashes if saved file is not available

closed
nobody
None
5
2008-07-08
2008-07-03
No

Step to reproduce the crash:
1) Open a new file and save it
2) Edit the file, but do not save it
3) Delete the file
4) Close drpython and answer Yes when asked
5) Program crashes

Discussion

  • Luca Falavigna

    Luca Falavigna - 2008-07-03

    savedfile.patch

     
  • Franz Steinhaeusler

    Logged In: YES
    user_id=772872
    Originator: NO

    thanks for reporting:
    I saw the traceback:
    Traceback (most recent call last):
    File "C:\eigene dateien\python\drpython\drpython.py", line 4054, in OnActivate

    self.frame.OnActivate()
    File "C:\eigene dateien\python\drpython\drpython.py", line 1398, in OnActivate

    current_mtime = int(os.stat(Document.filename).st_mtime)
    OSError: [Errno 2] No such file or directory: u'C:/drpython/testttttt'

    I added in OnActivate:
    if Document.filename:
    #Get Stat Info:
    if os.path.exists(Document.filename): #bug 2010127 reported by by Luca Falavigna - dktrkranz, thanks

    and comitted into svn. I hope, that fixed the bug.

     
  • Franz Steinhaeusler

    Logged In: YES
    user_id=772872
    Originator: NO

    I just now saw, that you delivered a patch. It looks also fine. Please tell me, if you agree with my change.

    if os.path.exists(Document.filename):
    . current_mtime = int(os.stat(Document.filename).st_mtime)
    . ...

     
  • Luca Falavigna

    Luca Falavigna - 2008-07-07

    Logged In: YES
    user_id=962412
    Originator: YES

    Both patches should be OK.

     
  • Franz Steinhaeusler

    • status: open --> closed
     
  • Franz Steinhaeusler

    Logged In: YES
    user_id=772872
    Originator: NO

    thanks. then I close that bug.

     
  • Luca Falavigna

    Luca Falavigna - 2008-07-17

    Logged In: YES
    user_id=962412
    Originator: YES

    Is this really fixed? I can't find changes in trunk.

     
  • Franz Steinhaeusler

    Logged In: YES
    user_id=772872
    Originator: NO

    I will check it on weekend.

     
  • Franz Steinhaeusler

    Logged In: YES
    user_id=772872
    Originator: NO

    I checked it again, sorry, you were right. I hope, it is in svn now.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks