aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: was stable, but... maybe wx bug?  (Read 2362 times)

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
was stable, but... maybe wx bug?
« on: December 03, 2004, 02:10:27 PM »

m_Username is not NULL, but is thrashed. Wont post bt full, because it is too long. Also notice that there was a crash inside the crash handler...

Code: [Select]
(gdb) bt
#0  0x0092d3e9 in wxStringBase::size (this=0xdb99fe4) at string.h:362
#1  0x0092cf78 in wxStringBase::empty (this=0xdb99fe4) at string.h:372
#2  0x0092e3ce in wxString::IsEmpty (this=0xdb99fe4) at string.h:682
#3  0x082b11dc in CUpDownClient::GetScore (this=0xdb99fa8, sysvalue=false, isdownloading=false, onlybasevalue=false)
    at UploadClient.cpp:55
#4  0x082bc805 in CUploadQueue::GetWaitingPosition (this=0x8dde900, client=0xc4a1c00) at UploadQueue.cpp:477
#5  0x082b414f in CUpDownClient::SendRankingInfo (this=0xc4a1c00) at UploadClient.cpp:652
#6  0x082bbaba in CUploadQueue::AddClientToQueue (this=0x8dde900, client=0xc4a1c00) at UploadQueue.cpp:324
#7  0x08137461 in CClientReqSocket::ProcessPacket (this=0xdcd17a8, packet=0x940be50 "´Âä\026:Ç}\023g<É7 Öï\030",
    size=16, opcode=84 'T') at ListenSocket.cpp:547
#8  0x08140ce2 in CClientReqSocket::PacketReceived (this=0xdcd17a8, packet=0xd9ab060) at ListenSocket.cpp:2051
#9  0x08146896 in CEMSocket::OnReceive (this=0xdcd17a8, nErrorCode=0) at EMSocket.cpp:261
#10 0x08140f38 in CClientReqSocket::OnReceive (this=0xdcd17a8, nErrorCode=0) at ListenSocket.cpp:2082
#11 0x08141302 in CClientReqSocketHandler::ClientReqSocketHandler (this=0x9745a68, event=@0xd968fb8)
    at ListenSocket.cpp:2203
#12 0x008bb6c0 in wxAppConsole::HandleEvent (this=0x86cf908, handler=0x9745a68, func=
      {__pfn = 0x814124e , __delta = 0},
    event=@0xd968fb8) at src/common/appbase.cpp:307
#13 0x0096b4a5 in wxEvtHandler::ProcessEventIfMatches (entry=@0x83d7ee0, handler=0x9745a68, event=@0xd968fb8)
    at src/common/event.cpp:1169
#14 0x0096a432 in wxEventHashTable::HandleEvent (this=0x83d7eb8, event=@0xd968fb8, self=0x9745a68)
    at src/common/event.cpp:837
#15 0x0096b6b8 in wxEvtHandler::ProcessEvent (this=0x9745a68, event=@0xd968fb8) at src/common/event.cpp:1231
#16 0x0096b379 in wxEvtHandler::ProcessPendingEvents (this=0x9745a68) at src/common/event.cpp:1122
#17 0x008bb626 in wxAppConsole::ProcessPendingEvents (this=0x86cf908) at src/common/appbase.cpp:280
#18 0x00375a57 in wxAppBase::OnIdle (this=0x86cf908) at src/common/appcmn.cpp:458
#19 0x008bb6c0 in wxAppConsole::HandleEvent (this=0x86cf908, handler=0x86cf908, func=
      {__pfn = 0x375a30 , __delta = 0}, event=@0xfeeb1544) at src/common/appbase.cpp:307
#20 0x0096b4a5 in wxEvtHandler::ProcessEventIfMatches (entry=@0x4f00a0, handler=0x86cf908, event=@0xfeeb1544)
    at src/common/event.cpp:1169
#21 0x0096a432 in wxEventHashTable::HandleEvent (this=0x85c3620, event=@0xfeeb1544, self=0x86cf908)
    at src/common/event.cpp:837
#22 0x0096b6b8 in wxEvtHandler::ProcessEvent (this=0x86cf908, event=@0xfeeb1544) at src/common/event.cpp:1231
#23 0x003758cf in wxAppBase::ProcessIdle (this=0x86cf908) at src/common/appcmn.cpp:412
#24 0x002d894a in wxapp_idle_callback () at src/gtk/app.cpp:276
#25 0x00bff5a3 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#26 0x00bfc1e2 in g_main_depth () from /usr/lib/libglib-2.0.so.0
#27 0x00bfd2d8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#28 0x00bfd610 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#29 0x00bfd87d in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#30 0x00f0c235 in gtk_main_iteration () from /usr/lib/libgtk-x11-2.0.so.0
#31 0x002d875a in wxApp::Yield (this=0x86cf908, onlyIfNeeded=false) at src/gtk/app.cpp:145
#32 0x0096f77a in wxYield () at src/common/utilscmn.cpp:531
#33 0x002d09e0 in wxGUIAppTraits::WaitForChild (this=0x87006d8, execData=@0xfeeb1864) at src/unix/utilsunx.cpp:1202
#34 0x00970a36 in wxExecute (argv=0xfeeb1904, flags=1, process=0xd7d75a8) at src/unix/utilsunx.cpp:647
#35 0x0096fcc7 in wxExecute (command=@0xfeeb1c44, flags=1, process=0xd7d75a8) at src/unix/utilsunx.cpp:313
#36 0x0096f683 in wxDoExecuteWithCapture (command=@0xfeeb1c44, output=@0xfeeb1c54, error=0x0)
    at src/common/utilscmn.cpp:488
#37 0x0096f718 in wxExecute (command=@0xfeeb1c44, output=@0xfeeb1c54) at src/common/utilscmn.cpp:515
#38 0x082c6fdf in CamuleApp::OnFatalException (this=0x86cf908) at amule.cpp:1039
#39 0x0097150a in wxFatalSignalHandler () at src/unix/utilsunx.cpp:988
#40
#41 0x0092d3e9 in wxStringBase::size (this=0xdb99fe4) at string.h:362
#42 0x0092cf78 in wxStringBase::empty (this=0xdb99fe4) at string.h:372
#43 0x0092e3ce in wxString::IsEmpty (this=0xdb99fe4) at string.h:682
#44 0x082b11dc in CUpDownClient::GetScore (this=0xdb99fa8, sysvalue=false, isdownloading=false, onlybasevalue=false)
    at UploadClient.cpp:55
#45 0x082bc805 in CUploadQueue::GetWaitingPosition (this=0x8dde900, client=0xdbfc7d8) at UploadQueue.cpp:477
#46 0x082b414f in CUpDownClient::SendRankingInfo (this=0xdbfc7d8) at UploadClient.cpp:652
#47 0x082bc1b1 in CUploadQueue::AddClientToQueue (this=0x8dde900, client=0xdbfc7d8) at UploadQueue.cpp:405
#48 0x08137461 in CClientReqSocket::ProcessPacket (this=0xd9c4dc8, packet=0xdc0b7c0 "´Âä\026:Ç}\023g<É7 Öï\030",
    size=16, opcode=84 'T') at ListenSocket.cpp:547
#49 0x08140ce2 in CClientReqSocket::PacketReceived (this=0xd9c4dc8, packet=0x9a0d2e8) at ListenSocket.cpp:2051
#50 0x08146896 in CEMSocket::OnReceive (this=0xd9c4dc8, nErrorCode=0) at EMSocket.cpp:261
#51 0x08140f38 in CClientReqSocket::OnReceive (this=0xd9c4dc8, nErrorCode=0) at ListenSocket.cpp:2082
#52 0x08141302 in CClientReqSocketHandler::ClientReqSocketHandler (this=0xb157690, event=@0xdd06530)
    at ListenSocket.cpp:2203
#53 0x008bb6c0 in wxAppConsole::HandleEvent (this=0x86cf908, handler=0xb157690, func=
      {__pfn = 0x814124e , __delta = 0},
    event=@0xdd06530) at src/common/appbase.cpp:307
#54 0x0096b4a5 in wxEvtHandler::ProcessEventIfMatches (entry=@0x83d7ee0, handler=0xb157690, event=@0xdd06530)
    at src/common/event.cpp:1169
#55 0x0096a432 in wxEventHashTable::HandleEvent (this=0x83d7eb8, event=@0xdd06530, self=0xb157690)
    at src/common/event.cpp:837
#56 0x0096b6b8 in wxEvtHandler::ProcessEvent (this=0xb157690, event=@0xdd06530) at src/common/event.cpp:1231
#57 0x0096b379 in wxEvtHandler::ProcessPendingEvents (this=0xb157690) at src/common/event.cpp:1122
#58 0x008bb626 in wxAppConsole::ProcessPendingEvents (this=0x86cf908) at src/common/appbase.cpp:280
#59 0x002d87f3 in wxapp_pending_callback () at src/gtk/app.cpp:211
#60 0x00bff5a3 in g_child_watch_add () from /usr/lib/libglib-2.0.so.0
#61 0x00bfc1e2 in g_main_depth () from /usr/lib/libglib-2.0.so.0
#62 0x00bfd2d8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#63 0x00bfd610 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#64 0x00bfdc53 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0
#65 0x00f0bff3 in gtk_main () from /usr/lib/libgtk-x11-2.0.so.0
#66 0x002f4c0a in wxEventLoop::Run (this=0x911d9b0) at src/gtk/evtloop.cpp:80
#67 0x003754d1 in wxAppBase::MainLoop (this=0x86cf908) at src/common/appcmn.cpp:272
#68 0x0037563d in wxAppBase::OnRun (this=0x86cf908) at src/common/appcmn.cpp:340
#69 0x008fefab in wxEntry (argc=@0xfeeb2ef0, argv=0xfeeb2f74) at src/common/init.cpp:410
#70 0x082cb345 in main (argc=1, argv=0xfeeb2f74) at amule-gui.cpp:161
(gdb) up 44
#44 0x082b11dc in CUpDownClient::GetScore (this=0xdb99fa8, sysvalue=false, isdownloading=false, onlybasevalue=false)
    at UploadClient.cpp:55
55              if (m_Username.IsEmpty()) {
(gdb) l
50
51      #ifndef CLIENT_GUI
52      uint32 CUpDownClient::GetScore(bool sysvalue, bool isdownloading, bool onlybasevalue) const
53      {
54              //TODO: complete this (friends, uploadspeed, amuleuser etc etc)
55              if (m_Username.IsEmpty()) {
56                      return 0;
57              }
58
59              if (credits == 0) {
Logged

Avi

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: was stable, but... maybe wx bug?
« Reply #1 on: December 03, 2004, 02:41:12 PM »

Go to BaseClient.cpp, line 362:
Change it from:
Code: [Select]
m_Username.Clear();to:
Code: [Select]
m_Username.Empty();Does it help?
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: was stable, but... maybe wx bug?
« Reply #2 on: December 03, 2004, 03:43:24 PM »

Avi,

There is no way to reproduce these conditions, aMule ran stable for 48 hours before crash. Using Empty() instead of Clear() to test memory release would only be meaningfull if I had a deterministic error that I could reproduce.

I have recompiled wx from CVS to see if that happens again.

Cheers!
Logged

Avi

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 35
Re: was stable, but... maybe wx bug?
« Reply #3 on: December 04, 2004, 04:32:12 PM »

Well, what I thought happened was that some broken client out there sent you a CT_NAME tag without a valid string value, which might happen and would lead to that line. In that case, I'm not sure if calling Clear() won't break wxString's size-checking functionality (which would be a wxWidgets bug of course). I hope all these wxWidgets problems would be gone when they finalise their move to STL-based classes (e.g. derive wxString out of std::string or std::wstring). Anyway, please post again if you get that crash, because it is interesting... :)
Logged