I recently posted this to wx-users, but am not getting any help there. I thought I might ask since the problem is actually occuring in a system library.
I am running Sid, and have all the necessary librarys and -dev pacakges installed.
The segfault occurs at some point during the wxFileDialog constructor. It looks as thought happens when returning from a call to lib/ld-linux.so.2. I am not really sure how handle this.
Everything else in the tutorial was working correctly up until I added the dialog box.
I would really appreciate some help on this.
-Roberto Sanchez
**********
Here is the offending function:
void TextFrame::OnMenuFileOpen(wxCommandEvent &WXUNUSED(event))
{
wxFileDialog *dlg = new wxFileDialog(this, "Open a text file", "", "", "All files (*.*)|*.*|TextFiles (*.txt)|*.txt", wxOPEN, wxPoint (100,100));
if (dlg->ShowModal() == wxID_OK) { m_pTextCtrl->LoadFile(dlg->GetFilename()); SetStatusText(dlg->GetFilename(), 0); } dlg->Destroy(); }
Here is the very last part of the stepping that resulted in the segfault:
0x40007ad3 in _dl_lookup_versioned_symbol_internal () from /lib/ld-linux.so.2
(gdb) stepi
0x40007ad5 in _dl_lookup_versioned_symbol_internal () from /lib/ld-linux.so.2
(gdb) stepi
0x40007ad7 in _dl_lookup_versioned_symbol_internal () from /lib/ld-linux.so.2
(gdb) stepi
0x40007aea in _dl_lookup_versioned_symbol_internal () from /lib/ld-linux.so.2
(gdb) stepi
0x40007aed in _dl_lookup_versioned_symbol_internal () from /lib/ld-linux.so.2
(gdb) finish
0x4000abff in fixup () from /lib/ld-linux.so.2
(gdb) stepi
0x4000ac02 in fixup () from /lib/ld-linux.so.2
(gdb) stepi
0x4000aba4 in fixup () from /lib/ld-linux.so.2
(gdb) stepi
0x4000aba7 in fixup () from /lib/ld-linux.so.2
(gdb) stepi
0x4000aba9 in fixup () from /lib/ld-linux.so.2
(gdb) finish
Program received signal SIGSEGV, Segmentation fault.
0x2e2e2074 in ?? ()
(gdb) up
#1 0x4028f8ab in wxTopLevelWindowGTK::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) () from /usr/lib/libwx_gtk2-2.4.so.0
(gdb) up
#2 0x4025da34 in wxDialog::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&) () from /usr/lib/libwx_gtk2-2.4.so.0
(gdb) frame 0
#0 0x2e2e2074 in ?? ()
(gdb)
pgp00000.pgp
Description: PGP signature