aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: seg fault during initialization .. includes some debug tracing  (Read 1876 times)

jal

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
    • http://www.lockett.ca
seg fault during initialization .. includes some debug tracing
« on: November 24, 2004, 01:44:13 AM »

I just downloaded RC7 and compiled it.  I get a segmentation fault during initalization.
It is croaking in the CSearchDlg::UpdateCatChoice() function.  I added a few debug
statements and trace to problem to a call to the call to
c_cat->Append( theApp.glob_prefs->GetCategory( i )->title );

I have included the modifed debug code below and the backtrace.  amule seems
to be passing a proper wxString (value-"all"). So, is this a bug in wx code????



Here is the backtrace ... including some of my debug statements
./amule
Initialising aMule
Userhash loaded: E3131F49CB0E4FAEE2ABBA37BF706FF6
*** UDP socket at 4665
*** UDP socket at 4672
calling dialog init
about to search dialog functions
debug 3
debug 4
debug 5
debug 6 0 1
 debug 7 0 1
 debug 8 length 3
debug 8 all

OOPS! - Seems like aMule crashed.
        Version is: aMule 2.0.0rc7 using wxGTK1 v2.4.2
--== BACKTRACE FOLLOWS: ==--

  • ./amule(_ZN9CamuleApp16OnFatalExceptionEv+0x5b) [0x829b245]
  • [1] /usr/lib/libwx_gtk-2.4.so.0(wxFatalSignalHandler+0x2d)
[0x6cfc7d]
[2] /lib/tls/libpthread.so.0 [0xad4f18]
[3] ./amule(_ZN10CSearchDlg15UpdateCatChoiceEv+0x188) [0x824ab22]
[4] ./amule(_ZN9CamuleDlgC1EP8wxWindowRK8wxString7wxPoint6wxSize+0xb5d) [0x82a1bb1]
[5] ./amule(_ZN9CamuleApp6OnInitEv+0x2a0c) [0x8298ed8]
[6] /usr/lib/libwx_gtk-2.4.so.0(_Z7wxEntryiPPc+0x228) [0x54d468]
[7] ./amule(main+0x1e) [0x8295fc4]
[8] /lib/tls/libc.so.6(__libc_start_main+0xf0) [0x855750]
[9] ./amule(_ZN8wxDCBase13DrawRectangleERK6wxRect+0x31) [0x811def1]
Aborted

To track the bug I modified the code to SearchDlg.cpp to include the printf's with "debug" and I beleive they show the problem is in the wx code for
wxchoice.Append.  Here is the code:


void CSearchDlg::UpdateCatChoice()
{
printf("debug 3\n");
    wxChoice* c_cat = (wxChoice*)FindWindow(ID_AUTOCATASSIGN);
printf("debug 4\n");
    c_cat->Clear();

printf("debug 5\n");
    for ( unsigned i = 0; i < theApp.glob_prefs->GetCatCount(); i++ ) {
printf("debug 6 %i %i \n ", i, theApp.glob_prefs->GetCatCount() );
wxString foobar;
        foobar = theApp.glob_prefs->GetCategory( i )->title ;
printf("debug 7 %i %i \n ", i, theApp.glob_prefs->GetCatCount() );
printf("debug 8 length %i\n", foobar.Len());
printf("debug 8 %s\n", foobar.c_str());
        c_cat->Append( foobar );

//      c_cat->Append( theApp.glob_prefs->GetCategory( i )->title );
    }

    c_cat->SetSelection( 0 );
printf("debug 9 \n");
}
Logged
none