Hi,
When I load my custom program file into the application, it first removes all pages from the notebook.
The first time I load in the file, everything's okay. If I have 54 tabs open, it'll close them all, and start the tab count from 0 again
If I already have a file of my own loaded, it will seg fault
temp = {}
f = open(self.filename, 'r')
try:
temp = cPickle.load(f)
except (cPickle.UnpicklingError, ValueError, ImportError):
wx.MessageBox("%s has corrupt Whyteboard data. No action taken."
% self.filename)
return
finally:
f.close()
self.gui.dialog = ProgressDialog(self.gui, "Loading...", 30)
self.gui.dialog.Show()
# Remove all tabs, thumbnails and tree note items
self.gui.board = None
self.gui.tabs.DeleteAllPages()
self.gui.thumbs.remove_all()
self.gui.notes.remove_all()
self.gui.tab_count = 0
I narrowed it down by using print statements to the deleteallpages statement (printing after that wouldn't show up after the seg fault)
I tried using:
for x in range(0, self.gui.tab_count):
self.gui.tabs.DeletePage(x)
This causes seg faults too
I tried using and
for x in range(0, self.gui.tab_count):
self.gui.tabs.RemovePage(x)
But this behaves in the STRANGEST way. It doesn't actually remove -every- page, it will skip every other page. The reason for this is beyond me, I can't figure it out.
I'm using 2.8.9.2, Ubuntu 8.10, Python 2.5.2 (can't find an update for python 2.5.4 for ubuntu 8.10 anywhere)
Any ideas? :s