Opened 6 years ago

Closed 14 months ago

#14737 closed defect (outdated)

wxNotebook when accessing not initialized page

Reported by: wujek.brulion Owned by:
Priority: low Milestone:
Component: wxPython Version: 2.9.3
Keywords: Cc:
Blocked By: Blocking:
Patch: no


I'm using wxPython on winXP. This code crashes:

import wx

class MainFrame(wx.Frame):

  def __init__(self):
    wx.Frame.__init__(self, None, title="Simple Notebook Example")
    p = wx.Panel(self) 
    nb = wx.Notebook(p) 
    page = nb.GetPage(0) 
    print "end"

if __name__ == "__main__":

  app = wx.App() 

This line seems crucial:
page = nb.GetPage(0)

Change History (3)

comment:1 Changed 6 years ago by vadz

  • Priority changed from normal to low
  • Status changed from new to infoneeded_new

Are you sure it really crashes and not just asserts?

Accessing the non-existent page is, of course, an error, but it shouldn't result in a crash, just assert failure, as usual.

comment:2 Changed 6 years ago by wujek.brulion

  • Status changed from infoneeded_new to new

If there's any page added to Notebook and I'm accessing not existing page, I get wx._core.PyAssertionError.

If there's no page added, python process crashes.

comment:3 Changed 14 months ago by robind

  • Resolution set to outdated
  • Status changed from new to closed

Closing old Phoenix tickets...

If this is still an issue in wxPython 4.0.0a1 then please open a new issue (or PR) at the wxPython-Phoenix project page on Github:

Note: See TracTickets for help on using tickets.