wxLogWindow Crash [SOLVED]

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

wxLogWindow Crash [SOLVED]

Post by heinermueller » Sun Aug 28, 2016 6:06 pm

Hi All,

i am using wx 3.1.0 compiled under OSX 10.9
When i try to create a log window, wx crashes.
Sample code

Code: Select all

 wxLogWindow* wl = new wxLogWindow(nullptr,wxString());
It crashes here (textctrl_osx.cpp)

Code: Select all

#if wxOSX_USE_COCOA
    // under carbon everything can already be set before the MacPostControlCreate embedding takes place
    // but under cocoa for single line textfields this only works after everything has been set up
    GetTextPeer()->SetStringValue(str);
#endif
Is this a known issue? Is there a workaround? I create the log window in mywxapp::OnInit(),
is this too early?

Best regards,
Heiner
Last edited by heinermueller on Wed Sep 07, 2016 11:37 am, edited 1 time in total.

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4525
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxLogWindow Crash

Post by ONEEYEMAN » Mon Aug 29, 2016 11:54 am

Hi,
Can you reproduce the problem in e.g. keyboard sample?

Thank you.

heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

Re: wxLogWindow Crash

Post by heinermueller » Mon Aug 29, 2016 3:44 pm

I used the minimal sample (hope that makes no difference) and there it works. I put it directly in the first line of OnInit()

This (minimal sample) works:

Code: Select all

bool MyApp::OnInit()
{
     wxLogWindow* wl = new wxLogWindow(nullptr,wxString());
    wl->Show();
    wxLogDebug("logging!");   
.....
}
This (my application) crashes:

Code: Select all

ool myApp::OnInit()
{
    wxLogWindow* wl = new wxLogWindow(nullptr,wxString());
.....
}
The difference is here:

Code: Select all

wxTextWidgetImpl * wxTextEntry::GetTextPeer() const
{
    wxWindow * const win = const_cast<wxTextEntry *>(this)->GetEditableWindow();
    return win ? dynamic_cast<wxTextWidgetImpl *>(win->GetPeer()) : NULL;
}
'win' exists but the dynamic cast fails. Any idea why?

heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

Re: wxLogWindow Crash

Post by heinermueller » Mon Aug 29, 2016 4:03 pm

I think i ran into a symbol visibility issue. Which settings do i have to change to solve that?

heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

Re: wxLogWindow Crash

Post by heinermueller » Mon Aug 29, 2016 5:37 pm

This is the system console output:
29/08/16 19:34:32,702 TestProgram: dynamic_cast error 2: One or more of the following type_info's has hidden visibility. They should all have public visibility. 12wxWidgetImpl, 19wxNSTextViewControl, 16wxTextWidgetImpl.
Why are the type infos in my application hidden but public in the minimal sample?

heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

Re: wxLogWindow Crash

Post by heinermueller » Mon Aug 29, 2016 8:55 pm

And i am linking statically to libwx_osx_cocoa_static.a -- i thought symbol visibility should be irrelevant when linking to static libraries?

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4525
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxLogWindow Crash

Post by ONEEYEMAN » Tue Aug 30, 2016 1:36 am

Hi
Check nm and ldd output.

Thank you.

heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

Re: wxLogWindow Crash

Post by heinermueller » Tue Aug 30, 2016 9:22 pm

I checked with nm (i am on osx) and this is the output. Nothing is marked hidden.

nm -om ./osx/build/Debug/libwx_osx_cocoa_static.a | grep 16wxTextWidgetImpl | c++filt
./osx/build/Debug/libwx_osx_cocoa_static.a:textentry_osx.o: (undefined) external typeinfo for wxTextWidgetImpl
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7ca0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::ForceUpper()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af3b4 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::ForceUpper() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00002fe0 (__TEXT,__text) private external wxTextWidgetImpl::SetEditable(bool)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000aefac (__TEXT,__eh_frame) private external wxTextWidgetImpl::SetEditable(bool) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7cd0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::SetupCursor(wxPoint const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af3ec (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::SetupCursor(wxPoint const&) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7c60 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::SetMaxLength(unsigned long)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af37c (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::SetMaxLength(unsigned long) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00003310 (__TEXT,__text) private external wxTextWidgetImpl::ShowPosition(long)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af0f4 (__TEXT,__eh_frame) private external wxTextWidgetImpl::ShowPosition(long) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7c80 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CanForceUpper()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af398 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CanForceUpper() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7cf0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CheckSpelling(bool)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af408 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CheckSpelling(bool) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00002fa0 (__TEXT,__text) private external wxTextWidgetImpl::Cut()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000aef58 (__TEXT,__eh_frame) private external wxTextWidgetImpl::Cut() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00002f90 (__TEXT,__text) private external wxTextWidgetImpl::Copy()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000aef3c (__TEXT,__eh_frame) private external wxTextWidgetImpl::Copy() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000032a0 (__TEXT,__text) private external wxTextWidgetImpl::Redo()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af09c (__TEXT,__eh_frame) private external wxTextWidgetImpl::Redo() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00003270 (__TEXT,__text) private external wxTextWidgetImpl::Undo()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af064 (__TEXT,__eh_frame) private external wxTextWidgetImpl::Undo() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000031b0 (__TEXT,__text) private external wxTextWidgetImpl::Clear()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af028 (__TEXT,__eh_frame) private external wxTextWidgetImpl::Clear() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00002fb0 (__TEXT,__text) private external wxTextWidgetImpl::Paste()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000aef74 (__TEXT,__eh_frame) private external wxTextWidgetImpl::Paste() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000030e0 (__TEXT,__text) private external wxTextWidgetImpl::Remove(long, long)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af004 (__TEXT,__eh_frame) private external wxTextWidgetImpl::Remove(long, long) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00003080 (__TEXT,__text) private external wxTextWidgetImpl::Replace(long, long, wxString const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000aefe8 (__TEXT,__eh_frame) private external wxTextWidgetImpl::Replace(long, long, wxString const&) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7d40 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::SetHint(wxString const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af440 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::SetHint(wxString const&) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00002f30 (__TEXT,__text) private external wxTextWidgetImpl::GetStyle(long, wxTextAttr&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000aef04 (__TEXT,__eh_frame) private external wxTextWidgetImpl::GetStyle(long, wxTextAttr&) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00002f60 (__TEXT,__text) private external wxTextWidgetImpl::SetStyle(long, long, wxTextAttr const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000aef20 (__TEXT,__eh_frame) private external wxTextWidgetImpl::SetStyle(long, long, wxTextAttr const&) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7bd0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::~wxTextWidgetImpl()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af324 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::~wxTextWidgetImpl() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7bb0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::~wxTextWidgetImpl()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af308 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::~wxTextWidgetImpl() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a9950 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::~wxTextWidgetImpl()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000afb34 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::~wxTextWidgetImpl() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7d10 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::GetBestSize() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af424 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::GetBestSize() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00003450 (__TEXT,__text) private external wxTextWidgetImpl::GetLineText(long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af168 (__TEXT,__eh_frame) private external wxTextWidgetImpl::GetLineText(long) const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000032e0 (__TEXT,__text) private external wxTextWidgetImpl::PositionToXY(long, long*, long*) const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af0d4 (__TEXT,__eh_frame) private external wxTextWidgetImpl::PositionToXY(long, long*, long*) const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000032b0 (__TEXT,__text) private external wxTextWidgetImpl::XYToPosition(long, long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af0b8 (__TEXT,__eh_frame) private external wxTextWidgetImpl::XYToPosition(long, long) const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00003710 (__TEXT,__text) private external wxTextWidgetImpl::GetLineLength(long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af1c4 (__TEXT,__eh_frame) private external wxTextWidgetImpl::GetLineLength(long) const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00003000 (__TEXT,__text) private external wxTextWidgetImpl::GetLastPosition() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000aefc8 (__TEXT,__eh_frame) private external wxTextWidgetImpl::GetLastPosition() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7c40 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CanClipMaxLength() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af360 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CanClipMaxLength() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00003330 (__TEXT,__text) private external wxTextWidgetImpl::GetNumberOfLines() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af110 (__TEXT,__eh_frame) private external wxTextWidgetImpl::GetNumberOfLines() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7cb0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::HasOwnContextMenu() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af3d0 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::HasOwnContextMenu() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00003280 (__TEXT,__text) private external wxTextWidgetImpl::CanRedo() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af080 (__TEXT,__eh_frame) private external wxTextWidgetImpl::CanRedo() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00003250 (__TEXT,__text) private external wxTextWidgetImpl::CanUndo() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af048 (__TEXT,__eh_frame) private external wxTextWidgetImpl::CanUndo() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000a7c20 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CanFocus() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000af344 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CanFocus() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 00002fc0 (__TEXT,__text) private external wxTextWidgetImpl::CanPaste() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000aef90 (__TEXT,__eh_frame) private external wxTextWidgetImpl::CanPaste() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000ad930 (__DATA,__const) private external typeinfo for wxTextWidgetImpl
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000ad950 (__TEXT,__const) private external typeinfo name for wxTextWidgetImpl
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl_osx.o: 000ad890 (__DATA,__const) private external vtable for wxTextWidgetImpl
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: 0009de30 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::SetupCursor(wxPoint const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: 000a0288 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::SetupCursor(wxPoint const&) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::ShowPosition(long)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: 0009de50 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CheckSpelling(bool)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: 000a02a4 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CheckSpelling(bool) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::Redo()
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::Undo()
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::Remove(long, long)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::Replace(long, long, wxString const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::GetStyle(long, wxTextAttr&)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::SetStyle(long, long, wxTextAttr const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: 0009de70 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::GetBestSize() const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: 000a02c0 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::GetBestSize() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::GetLineText(long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::PositionToXY(long, long*, long*) const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::XYToPosition(long, long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::GetLineLength(long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::GetLastPosition() const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::GetNumberOfLines() const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::CanRedo() const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: (undefined) external wxTextWidgetImpl::CanUndo() const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: 0009dd80 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CanFocus() const
./osx/build/Debug/libwx_osx_cocoa_static.a:combobox-24D646E39518AE6E.o: 000a0218 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CanFocus() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: 0009c210 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::SetupCursor(wxPoint const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: 0009db74 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::SetupCursor(wxPoint const&) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::ShowPosition(long)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: 0009c230 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CheckSpelling(bool)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: 0009db90 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CheckSpelling(bool) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::Redo()
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::Undo()
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::Clear()
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::Remove(long, long)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::Replace(long, long, wxString const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::GetStyle(long, wxTextAttr&)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::SetStyle(long, long, wxTextAttr const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: 0009c250 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::GetBestSize() const
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: 0009dbac (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::GetBestSize() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::GetLineText(long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::PositionToXY(long, long*, long*) const
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::XYToPosition(long, long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::GetLineLength(long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::GetLastPosition() const
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
warning: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm: no name list
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::GetNumberOfLines() const
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::CanRedo() const
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: (undefined) external wxTextWidgetImpl::CanUndo() const
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: 0009c160 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CanFocus() const
./osx/build/Debug/libwx_osx_cocoa_static.a:srchctrl.o: 0009db04 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CanFocus() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a9aa0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::ForceUpper()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000afcf8 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::ForceUpper() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a99b0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::SetupCursor(wxPoint const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000afc34 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::SetupCursor(wxPoint const&) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a9a60 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::SetMaxLength(unsigned long)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000afcc0 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::SetMaxLength(unsigned long) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::ShowPosition(long)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a9a80 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CanForceUpper()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000afcdc (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CanForceUpper() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a99d0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CheckSpelling(bool)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000afc50 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CheckSpelling(bool) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::Redo()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::Undo()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::Clear()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::Remove(long, long)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::Replace(long, long, wxString const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a9ae0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::SetHint(wxString const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000afd30 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::SetHint(wxString const&) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::GetStyle(long, wxTextAttr&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::SetStyle(long, long, wxTextAttr const&)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a8f50 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::wxTextWidgetImpl(wxTextEntry*)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000aed7c (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::wxTextWidgetImpl(wxTextEntry*) (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a8fd0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::~wxTextWidgetImpl()
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000aedb4 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::~wxTextWidgetImpl() (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a99f0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::GetBestSize() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000afc6c (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::GetBestSize() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::GetLineText(long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a8bd0 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::GetTextEntry() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000ae844 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::GetTextEntry() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::PositionToXY(long, long*, long*) const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::XYToPosition(long, long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::GetLineLength(long) const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::GetLastPosition() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a9a40 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CanClipMaxLength() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000afca4 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CanClipMaxLength() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::GetNumberOfLines() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::CanRedo() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external wxTextWidgetImpl::CanUndo() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000a9900 (__TEXT,__textcoal_nt) weak private external wxTextWidgetImpl::CanFocus() const
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: 000afbc4 (__TEXT,__eh_frame) weak private external wxTextWidgetImpl::CanFocus() const (.eh)
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external typeinfo for wxTextWidgetImpl
./osx/build/Debug/libwx_osx_cocoa_static.a:textctrl.o: (undefined) external vtable for wxTextWidgetImpl

heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

Re: wxLogWindow Crash

Post by heinermueller » Tue Aug 30, 2016 9:30 pm

This is what i found in a very interesting blog entry about the topic:
To detect this insidious problem, if you're compiling with the 10.7+ linker, I recommend turning fatal_warnings on. If you're using the 10.6 linker, the nm method from before will work because the symbol will be marked non-external in the binary. If you're super-paranoid, you can run nm -om * | c++filt on all your .o files - object files where the visibility was hidden will report weak private external typeinfo where object files with default visibility will report weak external typeinfo (note that if you forget the -m flag on nm these two cases are indistinguishable).
And nm gives me something similar ( "private external typeinfo" not "weak private external typeinfo" )

Code: Select all

libwx_osx_cocoa_static.a:textentry_osx.o:          (undefined) external typeinfo for wxTextWidgetImpl
libwx_osx_cocoa_static.a:textctrl_osx.o: 000ad930 (__DATA,__const) private external typeinfo for wxTextWidgetImpl
libwx_osx_cocoa_static.a:textctrl_osx.o: 000ad950 (__TEXT,__const) private external typeinfo name for wxTextWidgetImpl
libwx_osx_cocoa_static.a:textctrl.o:          (undefined) external typeinfo for wxTextWidgetImpl

heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

Re: wxLogWindow Crash

Post by heinermueller » Tue Aug 30, 2016 10:15 pm

When i build the library with the (wx default setting) -fvisibility=hidden and -fvisibility-inlines-hidden i get this:

Code: Select all

grep "wxTextWidgetImpl" symbols_hidden_by_default_yes.txt | grep typeinfo 
libwx_osx_cocoa_static.a:textentry_osx.o:          (undefined) external typeinfo for wxTextWidgetImpl
libwx_osx_cocoa_static.a:textctrl_osx.o: 000ad930 (__DATA,__const) private external typeinfo for wxTextWidgetImpl
libwx_osx_cocoa_static.a:textctrl_osx.o: 000ad950 (__TEXT,__const) private external typeinfo name for wxTextWidgetImpl
Without -fvisibility=hidden and -fvisibility-inlines-hidden i get this:

Code: Select all

grep "wxTextWidgetImpl" symbols_hidden_by_default_no.txt | grep typeinfo 
libwx_osx_cocoa_static.a:textentry_osx.o:          (undefined) external typeinfo for wxTextWidgetImpl
libwx_osx_cocoa_static.a:textctrl_osx.o: 000ad930 (__DATA,__const) external typeinfo for wxTextWidgetImpl
libwx_osx_cocoa_static.a:textctrl_osx.o: 000ad950 (__TEXT,__const) external typeinfo name for wxTextWidgetImpl
Which one is correct?

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 4525
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxLogWindow Crash

Post by ONEEYEMAN » Tue Aug 30, 2016 10:24 pm

Hi,
Which system you are building on and what is you configure line looks like?

Thank you.

heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

Re: wxLogWindow Crash

Post by heinermueller » Wed Aug 31, 2016 7:11 pm

I am building it with xcode, i changed to c++11 (i need this) and mmacosx-version-min=10.7. The commandline for eg. textctrl_osx is
CompileC build/wxcocoa.build/Debug/static.build/Objects-normal/i386/textctrl_osx.o /Users/myname/development/wx/wxWidgets-3.1.0/src/osx/textctrl_osx.cpp normal i386 c++ com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/myname/development/wx/wxWidgets-3.1.0/build/osx
export LANG=en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch i386 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DWXBUILDING -D__WXOSX_COCOA__ -D__WX__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMACOS_CLASSIC -D__WXMAC_XCODE__=1 -DSCI_LEXER -DWX_PRECOMP=1 -DwxUSE_UNICODE_UTF8=0 -DwxUSE_UNICODE_WCHAR=1 -DwxUSE_BASE=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.7 -g -Wno-sign-conversion -iquote /Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/wxcocoa.build/Debug/static.build/wx_osx_cocoa_static-generated-files.hmap -I/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/wxcocoa.build/Debug/static.build/wx_osx_cocoa_static-own-target-headers.hmap -I/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/wxcocoa.build/Debug/static.build/wx_osx_cocoa_static-all-target-headers.hmap -iquote /Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/wxcocoa.build/Debug/static.build/wx_osx_cocoa_static-project-headers.hmap -iquote/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../include -iquote/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../build/osx/setup/cocoa/include -iquote/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../src/zlib -iquote/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../src/jpeg -iquote/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../src/png -iquote/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../src/expat/lib -iquote/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../src/tiff/libtiff -iquote/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../src/stc/scintilla/src -iquote/Users/mynamemyname/development/wx/wxWidgets-3.1.0/build/osx/../../src/stc/scintilla/include -iquote/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../src/stc/scintilla/lexlib -I/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/Debug/include -I/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../src/tiff/libtiff -I/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/../../src/regex -I/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/wxcocoa.build/Debug/static.build/DerivedSources/i386 -I/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/wxcocoa.build/Debug/static.build/DerivedSources -F/Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/Debug -Wall -Wundef -fno-strict-aliasing -fno-common -fvisibility=hidden -fvisibility-inlines-hidden -include /var/folders/g9/x8jk4pzn4ln81jydp93lpp_w0000gn/C/com.apple.DeveloperTools/5.1.1-5B1008/Xcode/SharedPrecompiledHeaders/wxprec-acsovlxzmppthuezjabbmibdkhxn/wxprec.h -MMD -MT dependencies -MF /Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/wxcocoa.build/Debug/static.build/Objects-normal/i386/textctrl_osx.d --serialize-diagnostics /Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/wxcocoa.build/Debug/static.build/Objects-normal/i386/textctrl_osx.dia -c /Users/myname/development/wx/wxWidgets-3.1.0/src/osx/textctrl_osx.cpp -o /Users/myname/development/wx/wxWidgets-3.1.0/build/osx/build/wxcocoa.build/Debug/static.build/Objects-normal/i386/textctrl_osx.o

heinermueller
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 26, 2013 11:54 am

Re: wxLogWindow Crash [SOLVED]

Post by heinermueller » Wed Sep 07, 2016 11:47 am

It turned out that the problem came from a linked-in dylib which linked statically against a different libstdc++, which was unaware of the typeinfos used elsewhere. So all dynamic_cast failed.

Post Reply