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

CodeBlocks build on RHEL 5.5

<< < (4/5) > >>

screamingindigital:
Okay, I added a bunch of debug statements around the "File-Open" dialog box, and it is crashing at "if (dlg.ShowModal() == wxID_OK)".

Here is the generated output from my debug statements.

/file_dialogs/file_new_open/filter    -->   
Filters    -->   Ada files|*.ads;*.adb|AngelScript files|*.as|<A very long list of file types and associated extensions>|All files (*)|*
GetFilterIndexFromName
Prior to wxFileDiaglog dlg(...)
Path --> 
After wxFileDiaglog dlg(...)
Prior to dlg.SetFilterIndex(StoredIndex)
After dlg.SetFilterIndex(StoredIndex)
Prior to PlaceWindow(&dlg)
After PlaceWindow(&dlg)
Prior to dlg.ShowModal() ==wxID_OK
Segmentation fault

Any ideas on what would cause this to crash?  I tried removing the "compatibility::wxHideReadonly" from the style parameter, but that did not help.

oBFusCATed:
Have you tried to run C::B with valgrind, it could be, because of some writing of uninitialized memory?
If valgrind doesn't help, build wxGTK in debug mode and use gdb to trace the crash...

screamingindigital:
Okay, I'll try that, but it does not make sense that many other programs including wxWidgets sample code work okay.  One of those had open & save capabilities.

I'm getting close to going back to Fedora x64.

screamingindigital:
I recompiled wxGTK and CodeBlocks with debug enabled.  Using valgrind, here is the output generated when I click "File - Open".  I enabled the option "track-origins" for valgrind.

After "File - Open", the start of the error dump is with "Invalid read of size 1".

==1585== Syscall param write(buf) points to uninitialised byte(s)
==1585==    at 0x3517A0D89B: ??? (in /lib64/libpthread-2.5.so)
==1585==    by 0x3518A4667E: ??? (in /usr/lib64/libX11.so.6.2.0)
==1585==    by 0x3518A4B6AE: ??? (in /usr/lib64/libX11.so.6.2.0)
==1585==    by 0x3518A25447: XCreatePixmap (in /usr/lib64/libX11.so.6.2.0)
==1585==    by 0x351C236A30: ??? (in /usr/lib64/libcairo.so.2.9.2)
==1585==    by 0x351C21C10E: ??? (in /usr/lib64/libcairo.so.2.9.2)
==1585==    by 0x351C21C1AA: ??? (in /usr/lib64/libcairo.so.2.9.2)
==1585==    by 0x351C21F423: ??? (in /usr/lib64/libcairo.so.2.9.2)
==1585==    by 0x351C21F766: ??? (in /usr/lib64/libcairo.so.2.9.2)
==1585==    by 0x351C235041: ??? (in /usr/lib64/libcairo.so.2.9.2)
==1585==    by 0x351C21AAE0: ??? (in /usr/lib64/libcairo.so.2.9.2)
==1585==    by 0x351C21DA4F: ??? (in /usr/lib64/libcairo.so.2.9.2)
==1585==  Address 0x6b0a3da is 90 bytes inside a block of size 16,384 alloc'd
==1585==    at 0x4A05513: calloc (vg_replace_malloc.c:467)
==1585==    by 0x3518A372B6: XOpenDisplay (in /usr/lib64/libX11.so.6.2.0)
==1585==    by 0x351CC3A338: gdk_display_open (in /usr/lib64/libgdk-x11-2.0.so.0.1000.4)
==1585==    by 0x351CC19ABC: gdk_display_open_default_libgtk_only (in /usr/lib64/libgdk-x11-2.0.so.0.1000.4)
==1585==    by 0x351C72AF23: gtk_init_check (in /usr/lib64/libgtk-x11-2.0.so.0.1000.4)
==1585==    by 0x57E5783: wxApp::Initialize(int&, wchar_t**) (app.cpp:484)
==1585==    by 0x5743157: wxEntryStart(int&, wchar_t**) (init.cpp:288)
==1585==    by 0x57432AF: wxInitialize(int, wchar_t**) (init.cpp:479)
==1585==    by 0x574398E: wxInitializer::wxInitializer(int, wchar_t**) (init.h:81)
==1585==    by 0x574330D: wxEntry(int&, wchar_t**) (init.cpp:417)
==1585==    by 0x5743465: wxEntry(int&, char**) (init.cpp:460)
==1585==    by 0x42F1B1: main (app.cpp:256)
==1585==  Uninitialised value was created by a stack allocation
==1585==    at 0x351C657CA0: ??? (in /usr/lib64/libgtk-x11-2.0.so.0.1000.4)
==1585==
==1585== Invalid read of size 1
==1585==    at 0x4A0736E: strncmp (mc_replace_strmem.c:398)
==1585==    by 0x3522C58418: __xmlParserInputBufferCreateFilename (in /usr/lib64/libxml2.so.2.6.26)
==1585==    by 0x3522CD7114: xmlNewTextReaderFilename (in /usr/lib64/libxml2.so.2.6.26)
==1585==    by 0x352602FACD: ??? (in /usr/lib64/libgnomevfs-2.so.0.1600.2)
==1585==    by 0x352602FDA9: ??? (in /usr/lib64/libgnomevfs-2.so.0.1600.2)
==1585==    by 0x352602FE48: gnome_vfs_mime_get_value (in /usr/lib64/libgnomevfs-2.so.0.1600.2)
==1585==    by 0x352602D4CE: gnome_vfs_mime_get_icon (in /usr/lib64/libgnomevfs-2.so.0.1600.2)
==1585==    by 0x3528C62393: gnome_icon_lookup (in /usr/lib64/libgnomeui-2.so.0.1600.0)
==1585==    by 0x157910BF: ??? (in /usr/lib64/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so)
==1585==    by 0x15791392: ??? (in /usr/lib64/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so)
==1585==    by 0x352602A091: ??? (in /usr/lib64/libgnomevfs-2.so.0.1600.2)
==1585==    by 0x352602A787: ??? (in /usr/lib64/libgnomevfs-2.so.0.1600.2)
==1585==  Address 0xa00001c4f is not stack'd, malloc'd or (recently) free'd
==1585==
==1585==
==1585== Process terminating with default action of signal 11 (SIGSEGV)
==1585==  General Protection Fault
==1585==    at 0x351961032A: g_object_new (in /lib64/libgobject-2.0.so.0.1200.3)
==1585==    by 0x351C6672FE: gtk_adjustment_new (in /usr/lib64/libgtk-x11-2.0.so.0.1000.4)
==1585==    by 0x351C813F20: ??? (in /usr/lib64/libgtk-x11-2.0.so.0.1000.4)
==1585==    by 0x351C81DE2B: ??? (in /usr/lib64/libgtk-x11-2.0.so.0.1000.4)
==1585==    by 0x3519629C8F: g_type_create_instance (in /lib64/libgobject-2.0.so.0.1200.3)
==1585==    by 0x35196118BC: ??? (in /lib64/libgobject-2.0.so.0.1200.3)
==1585==    by 0x351960F723: g_object_newv (in /lib64/libgobject-2.0.so.0.1200.3)
==1585==    by 0x351961014B: g_object_new_valist (in /lib64/libgobject-2.0.so.0.1200.3)
==1585==    by 0x3519610380: g_object_new (in /lib64/libgobject-2.0.so.0.1200.3)
==1585==    by 0x587F69F: wxListBox::Create(wxWindow*, int, wxPoint const&, wxSize const&, int, wxString const*, long, wxValidator const&, wxString const&) (listbox.cpp:361)
==1585==    by 0x585B91C: wxCheckListBox::wxCheckListBox(wxWindow*, int, wxPoint const&, wxSize const&, int, wxString const*, long, wxValidator const&, wxString const&) (checklst.cpp:65)
==1585==    by 0x5A57F7F: wxDebugReportDialog::wxDebugReportDialog(wxDebugReport&) (dbgrptg.cpp:342)
==1585==
==1585== HEAP SUMMARY:
==1585==     in use at exit: 15,418,412 bytes in 136,874 blocks
==1585==   total heap usage: 4,654,070 allocs, 4,517,196 frees, 613,446,441 bytes allocated
==1585==
==1585== LEAK SUMMARY:
==1585==    definitely lost: 69,264 bytes in 174 blocks
==1585==    indirectly lost: 119,072 bytes in 3,721 blocks
==1585==      possibly lost: 8,116,809 bytes in 63,428 blocks
==1585==    still reachable: 7,113,267 bytes in 69,551 blocks
==1585==         suppressed: 0 bytes in 0 blocks
==1585== Rerun with --leak-check=full to see details of leaked memory
==1585==
==1585== For counts of detected and suppressed errors, rerun with: -v
==1585== ERROR SUMMARY: 37 errors from 13 contexts (suppressed: 51 from 8)
Killed



screamingindigital:
I found two tickets on the bug tracker for wxWidgets.  The first shows that the bug occured in 2.6.  The other shows that the problem still occurs in 2.8 and mentions CodeBlocks.

http://trac.wxwidgets.org/ticket/2670

http://trac.wxwidgets.org/ticket/9825

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version