DeltaEscher / editra

Automatically exported from code.google.com/p/editra
Other
0 stars 0 forks source link

Opening second file causes crash #503

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
#---- Notes ----#
Sometimes Editra crashes (yet continues) when opening files. It doesn't 
happen all the time, but I can reliably reproduce by:

1. Start Editra.
2. Expand a tree in the Projects plugin and double-click a file to open it.
3. Double-click a second file to open it.
4. A crash report pops up, details below.

When this happens, sometimes the notebook tab name becomes 'untitled 1' but 
the file contents are still visible/editable. Editing the file causes the 
'*' to show up in the tab but pressing Ctrl-S won't save it anymore. 
Closing the tab still triggers the 'Save changes?' dialog.

This started happening after I upgraded from Editra 0.5.32 to 0.5.51.

#---- System Information ----#
Editra Version: 0.5.51
Operating System: Linux 2.6.27-17-generic x86_64
Python Version: 2.5.2 (r252:60911, Jan 20 2010, 23:33:04) 
[GCC 4.3.2]
wxPython Version: 2.8.8.0 (gtk2-unicode)
wxPython Info: (__WXGTK__, wxGTK, unicode, gtk2, wx-assertions-off, SWIG-
1.3.29)
Python Encoding: Default=ascii  File=UTF-8
wxPython Encoding: UTF-8
System Architecture: 64bit x86_64
Byte order: little
Frozen: False
#---- End System Information ----#

#---- Traceback Info ----#
*** Tue Apr  6 11:11:05 2010 ***
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Editra/src/ed_pages.py", line 
1001, in OnIdle
    page.DoOnIdle()
  File "/usr/lib/python2.5/site-packages/Editra/src/ed_editv.py", line 153, 
in DoOnIdle
    readonly = self._nb.ImageIsReadOnly(self.GetTabIndex())
  File "/usr/lib/python2.5/site-packages/Editra/src/ed_pages.py", line 889, 
in ImageIsReadOnly
    return self.GetPageImage(index) == self._index[ed_glob.ID_READONLY]
  File "/usr/lib/python2.5/site-packages/Editra/src/extern/aui/auibook.py", 
line 3395, in GetPageImage
    bitmap = self.GetPageBitmap(page)
  File "/usr/lib/python2.5/site-packages/Editra/src/extern/aui/auibook.py", 
line 3324, in GetPageBitmap
    page_info = self._tabs.GetPage(page_idx)
  File "/usr/lib/python2.5/site-packages/Editra/src/extern/aui/auibook.py", 
line 1149, in GetPage
    raise Exception("Invalid Page index")
Exception: Invalid Page index

#---- End Traceback Info ----#

Original issue reported on code.google.com by craig.ds@gmail.com on 5 Apr 2010 at 11:17

GoogleCodeExporter commented 8 years ago
I just upgraded to head ( r63866 ) and confirmed this still happens.

Original comment by craig.ds@gmail.com on 5 Apr 2010 at 11:24

GoogleCodeExporter commented 8 years ago
There was a large change when moving to the new notebook control this issue 
probably 
came in as a result of that.

Will investigate and correct for next release.

Original comment by CodyPrec...@gmail.com on 10 Apr 2010 at 11:02

GoogleCodeExporter commented 8 years ago
I haven't been able to reproduce this on my machines (Windows XP / OSX) (my 
linux box
is down right now).

There have been a number of other fixes to the tab control recently though. 
Could you
update again and see if this still happens? Also check the log window when 
doing it
to make sure there are no other warning or error messages.

Thanks

Original comment by CodyPrec...@gmail.com on 25 Apr 2010 at 1:53

GoogleCodeExporter commented 8 years ago
I did some more testing. This still happens in r64155 but it seems it's 
probably a 
bug with the FileBrowser plugin (1.5).

FileBrowser DISABLED - bug doesn't occur
FileBrowser enabled but not visible - bug occurs
FileBrowser enabled and visible - bug occurs

Feel free to wontfix this if you can't reproduce it - I don't actually use the 
FileBrowser so I'm happy enough to just disable it.

Original comment by craig.ds@gmail.com on 26 Apr 2010 at 9:33

GoogleCodeExporter commented 8 years ago
Thank you very much for the additional analysis. I will try this the next 
chance I
get (hopefully soon).

The Filebrowser plugin has not been updated since the main tab control was 
changed in
the previous release so there may be a compatibility issue there.

Original comment by CodyPrec...@gmail.com on 27 Apr 2010 at 3:42

GoogleCodeExporter commented 8 years ago
I think it might be fixed, I still couldn't reproduce it but made a few changes 
that
should guard against the condition.

if not let me know otherwise.

Original comment by CodyPrec...@gmail.com on 1 May 2010 at 3:07