Bug #12165 2007-10-12 23:27
szczepan
wxSmith adds sizer to itself -> stack overflow
Version: SVN 4524
Steps:
1. Create new wxWidgets project with default settings
2. Add a wxBoxSizer to the frame
3. Add a wxPanel to the sizer
4. Resize the panel manually and set margin to 0 (I don't know if this is relevant but this is _exactly_ what I did).
The generated code contains this:
BoxSizer1 = new wxBoxSizer(wxHORIZONTAL);
Panel1 = new wxPanel(this, ID_PANEL1, wxDefaultPosition, wxSize(404,378), wxTAB_TRAVERSAL, _T("ID_PANEL1"));
BoxSizer1->Add(BoxSizer1, 1, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
The last line adds the sizer to itself instead of adding the panel to the sizer. Compiled program eventually enters infinite recursion and crashes.
- Category
- Plugin::wxSmith
- Group
- Status
- Closed
- Close date
- 2007-11-12 18:52
- Assigned to
- byo
History
This bug has been already fixed in HEAD.
Thank you.