aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: crashed after part files loaded  (Read 2808 times)

mrnobody2k

  • Guest
crashed after part files loaded
« on: May 26, 2004, 08:50:33 PM »

I installed aMule from the provided rpm under SuSE 9.1 (i used the SuSE 9.0 rpm). After all part fils have been loaded aMule crashed always with the same error.

Code: [Select]
#0  0x411964b1 in strlen () from /lib/libc.so.6
#1  0x4028bce5 in wxTextCtrl::WriteText () from /usr/lib/libwx_gtk2-2.4.so.0
#2  0x402898e7 in wxTextCtrl::AppendText () from /usr/lib/libwx_gtk2-2.4.so.0
#3  0x081db3c4 in CamuleDlg::AddServerMessageLine ()
#4  0x081afd28 in CServerSocket::ProcessPacket ()
#5  0x081b07d0 in CServerSocket::PacketReceived ()
#6  0x080d729d in CEMSocket::OnReceive ()
#7  0x081b08d3 in CServerSocket::OnReceive ()
#8  0x402f0213 in wxEvtHandler::SearchEventTable () from /usr/lib/libwx_gtk2-2.4.so.0
#9  0x402f03a3 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_gtk2-2.4.so.0
#10 0x402f4136 in wxEvtHandler::ProcessPendingEvents () from /usr/lib/libwx_gtk2-2.4.so.0
#11 0x4029c4b1 in wxAppBase::ProcessPendingEvents () from /usr/lib/libwx_gtk2-2.4.so.0
#12 0x4023c7b2 in wxApp::OnIdle () from /usr/lib/libwx_gtk2-2.4.so.0
#13 0x402f0213 in wxEvtHandler::SearchEventTable () from /usr/lib/libwx_gtk2-2.4.so.0
#14 0x402f03a3 in wxEvtHandler::ProcessEvent () from /usr/lib/libwx_gtk2-2.4.so.0
#15 0x4023c86d in wxApp::ProcessIdle () from /usr/lib/libwx_gtk2-2.4.so.0
#16 0x4023c59a in wxapp_idle_callback () from /usr/lib/libwx_gtk2-2.4.so.0
#17 0x408bab81 in g_idle_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
#18 0x408bc9ca in g_main_context_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
#19 0x408beadb in g_main_context_iterate () from /opt/gnome/lib/libglib-2.0.so.0
#20 0x408bed07 in g_main_loop_run () from /opt/gnome/lib/libglib-2.0.so.0
#21 0x405e811f in gtk_main () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#22 0x088150a8 in ?? ()
#23 0xbffff490 in ?? ()
#24 0x4000b11c in fixup () from /lib/ld-linux.so.2
Previous frame inner to this frame (corrupt stack?)

I hope someone could fix this issue soon.
Regards,

Mr Nobody
« Last Edit: May 26, 2004, 08:51:09 PM by mrnobody2k »
Logged

deltaHF

  • Evil Admin
  • Former Developer
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 3920
  • .. Legends may sleep, but they never die ..
    • http://www.amule.org
Re: crashed after part files loaded
« Reply #1 on: May 26, 2004, 09:07:14 PM »

u use wxgtk linked against gtk2 .. look at my sig, installation howto and get the right wxgtk and wxbase rpms (uninstall the wxgtk2 before).. then reinstall amule

greets

Avi

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: crashed after part files loaded
« Reply #2 on: May 27, 2004, 05:15:36 PM »

Question, how having wxWidgets compiled against GTK2 should affect the following function (which, as the backtrace says, causes the crash):
Code: [Select]
void CamuleDlg::AddServerMessageLine(char* line,...)
{
wxString content;
va_list argptr;
char bufferline[500];
va_start(argptr, line);
vsnprintf(bufferline, 500, line, argptr);
va_end(argptr);

wxTextCtrl* cv=(wxTextCtrl*)serverwnd->FindWindowById(ID_SERVERINFO);

if(cv) {
cv->AppendText(wxString(bufferline)+wxString("\n"));
cv->ShowPosition(cv->GetValue().Length()-1);
}
//serverwnd.servermsgbox.AppendText(CString(bufferline)+CString("\n"));
}

The exact line which seems to cause the crash is:
Code: [Select]
cv->AppendText(wxString(bufferline)+wxString("\n"));
Maybe the following will fix it?
Code: [Select]
if(cv) {
                wxString toAdd=wxString(bufferline)+wxString(wxT('\n'));
cv->AppendText(toAdd);
cv->ShowPosition(cv->GetValue().Length()-1);
}

I think it will fix it... but am not sure... Any feedback from devs? :)
Also, mrnobody2k, could you try to make these changes (lines 676-692 in amuleDlg.cpp), and try to run it again?
Logged

deltaHF

  • Evil Admin
  • Former Developer
  • Hero Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 3920
  • .. Legends may sleep, but they never die ..
    • http://www.amule.org
Re: crashed after part files loaded
« Reply #3 on: May 27, 2004, 06:01:24 PM »

easy, gtk2 isn't supported

Xaignar

  • Admin and Code Junky
  • Hero Member
  • *****
  • Karma: 19
  • Offline Offline
  • Posts: 1103
Re: crashed after part files loaded
« Reply #4 on: May 27, 2004, 06:16:23 PM »

We generally don't support wxGTK 2.4 linked against GTK2 simply because there are so many strange bugs. ;)

However, because of the simple backtrace I'm not sure that your fix will work. If the pointer was null, then I'd expect a crash in wxTextCtrl::SetInsertionPointEnd(), which is called before wxTextCtrl::WriteText() in wxTextCtrl::AppendText() and which accesses member variables.

Therefore it is indeed possible that the crash is due to a bug caused by wxGTK being linked against GTK2. Still, it'd be interesting to see if your fix cures it.

Cheers,
 Xaignar
Logged