Reputation: 385
I'm trying to build the very first basic wxWidget
s app in OS X 10.8 with XCode 4.6. I get an EXC_BAD_ACCESS
error in window SetName()
.
Here is the code I used:
#include "main.h"
#include <wx/wx.h>
class MyApp : public wxApp
{
virtual bool OnInit();
};
IMPLEMENT_APP(MyApp)
bool MyApp::OnInit()
{
wxFrame *frame = new wxFrame(NULL, -1, wxT("Hello World"), wxPoint(50, 50),
wxSize(450, 350));
frame->Show(true);
return true;
}
EDIT after comment: sorry bout that
here is the chain of error:
1) Create(parent, id, title, pos, size, style, name);
2) if (!wxTopLevelWindow::Create(parent, id, title, pos, size, style, name);
3) if (!wxNonOwnedWindow::Create(parent, id, title, pos, size, style, name))
4) setName(name);
5) m_impl = stringSrc.m_impl;
after that it's machine code
Jeff
EDIT2 : just tried with wxWidgets 3.0 and it's the same.
Upvotes: 0
Views: 565
Reputation: 22688
You seem to have a bad, or at least incompatible with your program, build of wxWidgets as you absolutely shouldn't be getting the crash in wxString
assignment as you seem to do. Plesse rebuild wxWidgets and your own application using exactly the same compiler and compilation options and the problem should just magically disappear.
Upvotes: 1