Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Build C::B against wx3.02 with gcc 5.2 under Windows

<< < (2/25) > >>

ollydbg:
I see crash when I exits C::B, or I enable or disable several plugins, but I can't catch them, all seems come from the wx core.


--- Code: ---[debug]Program received signal SIGSEGV, Segmentation fault.
[debug]0x6474c5e5 in wxWindow::FindItemByHWND(HWND__*, bool) const () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]>>>>>>cb_gdb:

Program received signal SIGSEGV, Segmentation fault.
In wxWindow::FindItemByHWND(HWND__*, bool) const () (D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll)

[debug]> bt 30
[debug]#0  0x6474c5e5 in wxWindow::FindItemByHWND(HWND__*, bool) const () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#1  0x6474dc28 in wxWindow::HandleCtlColor(HBRUSH__**, HDC__*, HWND__*) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#2  0x6475911b in wxWindow::MSWHandleMessage(long*, unsigned int, unsigned int, long) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#3  0x647497a0 in wxWindow::MSWWindowProc(unsigned int, unsigned int, long) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#4  0x64741f96 in wxTopLevelWindowMSW::MSWWindowProc(unsigned int, unsigned int, long) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#5  0x647a8046 in wxFrame::MSWWindowProc(unsigned int, unsigned int, long) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#6  0x64751223 in wxWndProc(HWND__*, unsigned int, unsigned int, long)@16 () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#7  0x7e418734 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
[debug]#8  0x001d0a82 in ?? ()
[debug]#9  0x00000133 in ?? ()
[debug]#10 0x86011c8a in ?? ()
[debug]#11 0x00140eb6 in ?? ()
[debug]#12 0x647511b0 in wxWindow::SubclassWin(HWND__*) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#13 0x7e418816 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
[debug]#14 0x647511b0 in wxWindow::SubclassWin(HWND__*) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#15 0x7e42927b in USER32!GetParent () from C:\WINDOWS\system32\user32.dll
[debug]#16 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:


--- End code ---

ollydbg:
Interesting, I got a crash call stack, which comes from debugger sdk, see:

--- Code: ---[debug]> bt 30
[debug]#0  0x6474c5e5 in wxWindow::FindItemByHWND(HWND__*, bool) const () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#1  0x6474dc28 in wxWindow::HandleCtlColor(HBRUSH__**, HDC__*, HWND__*) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#2  0x6475911b in wxWindow::MSWHandleMessage(long*, unsigned int, unsigned int, long) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#3  0x647497a0 in wxWindow::MSWWindowProc(unsigned int, unsigned int, long) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#4  0x64741f96 in wxTopLevelWindowMSW::MSWWindowProc(unsigned int, unsigned int, long) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#5  0x647a8046 in wxFrame::MSWWindowProc(unsigned int, unsigned int, long) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#6  0x64751223 in wxWndProc(HWND__*, unsigned int, unsigned int, long)@16 () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#7  0x7e418734 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
[debug]#8  0x001401da in ?? ()
[debug]#9  0x00000133 in ?? ()
[debug]#10 0xf3011d42 in ?? ()
[debug]#11 0x00410eea in BreakpointsDlg::OnOpen (this=0xffffffff, event=...) at F:\cb_sf_git\trunk\src\src\breakpointsdlg.cpp:338
[debug]#12 0x7e418816 in USER32!GetDC () from C:\WINDOWS\system32\user32.dll
[debug]#13 0x647511b0 in wxWindow::SubclassWin(HWND__*) () from D:\wx3\lib\gcc_dll\wxmsw30u_gcc_cb.dll
[debug]#14 0x7e42927b in USER32!GetParent () from C:\WINDOWS\system32\user32.dll
[debug]#15 0x00000000 in ?? ()
[debug]>>>>>>cb_gdb:


--- End code ---

This happens I try to enable the "open files list" plugin.


EDIT:
Debugged for a while, I found that the crash happens in this line: "m_pTree = new wxTreeCtrl..." in the source file plugins\openfileslist\openfileslistplugin.cpp around line 73.

--- Code: ---void OpenFilesListPlugin::OnAttach()
{
    m_ViewMenu = 0;

    m_EditorArray.Clear();

    // create tree
    m_pTree = new wxTreeCtrl(Manager::Get()->GetAppWindow(), idOpenFilesTree,wxDefaultPosition,wxSize(150, 100),
                            wxTR_HAS_BUTTONS | wxNO_BORDER | wxTR_HIDE_ROOT);

    // load bitmaps
    wxBitmap bmp;
    m_pImages = new wxImageList(16, 16);
    wxString prefix = ConfigManager::GetDataFolder() + _T("/images/");

    bmp = cbLoadBitmap(prefix + _T("folder_open.png"), wxBITMAP_TYPE_PNG); // folder
    m_pImages->Add(bmp);

    bmp = cbLoadBitmap(prefix + _T("ascii.png"), wxBITMAP_TYPE_PNG); // file
    m_pImages->Add(bmp);
    ...

--- End code ---
Any one has the hint that why create a wxTreeCtrl get crashed?

stahta01:
I will start testing this using GCC 5.2 from MSys2 and see if the results matches yours; I have no idea if the PCH bug is fixed in it. So, it will be one of the first things to test.

Edit: Are you doing 32 bit or 64 bit windows builds? I can test either one.

Tim S.

ollydbg:

--- Quote from: stahta01 on September 27, 2015, 02:44:01 pm ---Edit: Are you doing 32 bit or 64 bit windows builds? I can test either one.

--- End quote ---
I'm on an old 32 bit windows XP system. :)

stahta01:

--- Quote from: ollydbg on September 27, 2015, 02:52:33 pm ---
--- Quote from: stahta01 on September 27, 2015, 02:44:01 pm ---Edit: Are you doing 32 bit or 64 bit windows builds? I can test either one.

--- End quote ---
I'm on an old 32 bit windows XP system. :)

--- End quote ---

I will be testing on Windows 7 (32 bit ?Ultra? or 64 bit Home Pro), likely start on 64 bit Home Pro first (Linux is Building something on the dual boot of the other one).

I will be doing it differently from you in the patch on Code::Blocks will NOT set WX_PRECOMP and no patch on wxWidgets if I can help doing that.

Edit:
gcc version 5.2.0 (Rev3, Built by MSYS2 project)
My GCC Compiler has this defined HAVE_TR1_TYPE_TRAITS
My GCC Compiler has this extra option -Wno-deprecated-declarations
My GCC Compiler has this additional path C:\Program Files\Git\cmd 
(I am building from a Git repo; I had a weird Git error till I added this path)


wxWidgets 3.0.2 was built with
CPPFLAGS="-DHAVE_TR1_TYPE_TRAITS"
CXXFLAGS="-fno-keep-inline-dllexport"


Tim S.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version