aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: One assertion, two bugs...  (Read 1977 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
One assertion, two bugs...
« on: December 27, 2005, 03:09:14 AM »

... Or maybe just memory corruption.
Code: [Select]
WARNING! Client UDP-Socket discarded packet due to errors (2) while sending.
Shutting down aMule...
aMule dialog destroyed
Now, exiting main app...
aMule OnExit: Terminating core.

--------------------------------------------------------------------------------
A fatal error has occurred and aMule has crashed.
Please assist us in fixing this problem by posting the backtrace below in our
'aMule Crashes' forum and include as much information as possible regarding the
circumstances of this crash. The forum is located here:
    [URL]http://forum.amule.org/board.php?boardid=67[/URL]
If possible, please try to generate a real backtrace of this crash:
    [URL]http://www.amule.org/wiki/index.php/Backtraces[/URL]

----------------------------=| BACKTRACE FOLLOWS: |=----------------------------
Current version is: aMule CVS using wxGTK2 v2.7.0 (Unicoded, Debugging) (Snapshot: rev. 6185)
Running on: Linux 2.6.14-1.1637_FC4 i686

[2] CamuleApp::OnFatalException() in amule.cpp:1127
[3] wxFatalSignalHandler in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x24591b]
[4] ?? in [0x312420]
[5] ?? in /lib/libc.so.6 [0x54bbf2]
[6] ?? in /lib/libc.so.6 [0x54cd8d]
[7] malloc in /lib/libc.so.6[0x54e492]
[8] wxStringBase::AllocBuffer(unsigned int) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x201df2]
[9] wxStringBase::AllocBeforeWrite(unsigned int) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x203075]
[10] wxString::GetWriteBuf(unsigned int) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x203170]
[11] wxStringBuffer::wxStringBuffer(wxString&, unsigned int) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x1d1630]
[12] wxString::PrintfV(wchar_t const*, char*) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x205d1a]
[13] wxString::Format(wchar_t const*, ...) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x205ee3]
[14] CFormat::operator%(int) in Format.h:216
[15] CamuleApp::OnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*) in amule.cpp:1192
[16] wxOnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x1a2009]
[17] wxAssert(int, wchar_t const*, int, wchar_t const*, wchar_t const*) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x1a204e]
[18] CClientList::~CClientList() in ClientList.cpp:106
[19] CamuleApp::OnExit() in amule.cpp:267
[20] CamuleGuiApp::OnExit() in amule-gui.cpp:303
[21] ?? in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0 [0x1deb20]
[22] wxEntry(int&, wchar_t**) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x1debd9]
[23] wxEntry(int&, char**) in /usr/local/wxWidgets-cvsu/lib/libwx_baseud-2.7.so.0[0x1dec98]
[24] main in amule-gui.cpp:145
[25] __libc_start_main in /lib/libc.so.6[0x4fdd5f]
[26] wxTextCtrlBase::LoadFile(wxString const&) in :0


--------------------------------------------------------------------------------
(gdb) bt
#0  0x00312402 in __kernel_vsyscall ()
#1  0x00511118 in raise () from /lib/libc.so.6
#2  0x00512888 in abort () from /lib/libc.so.6
#3  0x00245920 in wxFatalSignalHandler () at ./src/unix/utilsunx.cpp:1026
#4  
#5  0x0054bbf2 in malloc_consolidate () from /lib/libc.so.6
#6  0x0054cd8d in _int_malloc () from /lib/libc.so.6
#7  0x0054e492 in malloc () from /lib/libc.so.6
#8  0x00201df2 in wxStringBase::AllocBuffer (this=0xbfecc43c, nLen=1025) at ./src/common/string.cpp:245
#9  0x00203075 in wxStringBase::AllocBeforeWrite (this=0xbfecc43c, nLen=1025) at ./src/common/string.cpp:290
#10 0x00203170 in wxString::GetWriteBuf (this=0xbfecc43c, nLen=1025) at ./src/common/string.cpp:1135
#11 0x001d1630 in wxStringBuffer (this=0xbfecc3ac, str=@0xbfecc43c, lenWanted=1025) at ./include/wx/string.h:1389
#12 0x00205d1a in wxString::PrintfV (this=0xbfecc43c, pszFormat=0xcec5e0c, argptr=0xbfecc418 "i")
    at ./src/common/string.cpp:1815
#13 0x00205ee3 in wxString::Format (pszFormat=0xcec5e0c) at ./src/common/string.cpp:1782
#14 0x08086ec9 in CFormat::operator% (this=0xbfecc480, value=105) at ./libs/common/Format.h:216
#15 0x0807cc2c in CamuleApp::OnAssert (this=0x8bd6c10, file=0x84274e4, line=105, cond=0x8427674, msg=0x0)
    at amule.cpp:1192
#16 0x001a2009 in wxOnAssert (szFile=0x84274e4, nLine=105, szCond=0x8427674, szMsg=0x0)
    at ./src/common/appbase.cpp:641
#17 0x001a204e in wxAssert (cond=0, szFile=0x84274e4, nLine=105, szCond=0x8427674, szMsg=0x0)
    at ./src/common/appbase.cpp:608
#18 0x08099095 in ~CClientList (this=dwarf2_read_address: Corrupted DWARF expression.
) at ClientList.cpp:105
#19 0x08084f54 in CamuleApp::OnExit (this=0x8bd6c10) at amule.cpp:267
#20 0x081e2205 in CamuleGuiApp::OnExit (this=0x8bd6c10) at amule-gui.cpp:302
#21 0x001deb20 in ~CallOnExit (this=0xbfecc61e) at ./src/common/init.cpp:436
#22 0x001debd9 in wxEntry (argc=@0xbfecc670, argv=0x8bc5cb0) at ./src/common/init.cpp:442
#23 0x001dec98 in wxEntry (argc=@0xbfecc670, argv=0xbfecc6f4) at ./src/common/init.cpp:454
#24 0x081e16a0 in main (argc=1, argv=0xbfecc6f4) at amule-gui.cpp:145
(gdb) frame 18
#18 0x08099095 in ~CClientList (this=dwarf2_read_address: Corrupted DWARF expression.
) at ClientList.cpp:105
105             wxASSERT(m_clientList.empty());
(gdb) l
100                     delete it->second;
101             }
102
103             m_trackedClientsList.clear();
104
105             wxASSERT(m_clientList.empty());
106             wxASSERT(m_delete_queue.empty());
107     }
108
109
(gdb) frame 15
#15 0x0807cc2c in CamuleApp::OnAssert (this=0x8bd6c10, file=0x84274e4, line=105, cond=0x8427674, msg=0x0)
    at amule.cpp:1192
1192                            % file % line % cond % ( msg ? msg : wxT("") );
(gdb) l
1187    void CamuleApp::OnAssert(const wxChar *file, int line,
1188                                                     const wxChar *cond, const wxChar *msg)
1189    {
1190            if (!wxUSE_STACKWALKER || !wxThread::IsMain() || !IsRunning()) {
1191                    wxString errmsg = CFormat( wxT("%s:%d: Assertion '%s' failed. %s") )
1192                            % file % line % cond % ( msg ? msg : wxT("") );
1193
1194                    fprintf(stderr, "Assertion failed: %s\n", (const char*)unicode2char(errmsg));
1195
1196                    // Skip the function-calls directly related to the assert call.
(gdb) p (char [80])*file
$12 = "C\000\000\000l\000\000\000i\000\000\000e\000\000\000n\000\000\000t\000\000\000L\000\000\000i\000\000\000s\000\000\000t\000\000\000.\000\000\000c\000\000\000p\000\000\000p\000\000\000\000\000\000\000/usr/lib/gcc/i386-re"
(gdb) p line
$13 = 105
(gdb) p (char [88])*cond
$14 = "m\000\000\000_\000\000\000c\000\000\000l\000\000\000i\000\000\000e\000\000\000n\000\000\000t\000\000\000L\000\000\000i\000\000\000s\000\000\000t\000\000\000.\000\000\000e\000\000\000m\000\000\000p\000\000\000t\000\000\000y\000\000\000(\000\000\000)\000\000\000\000\000\000\000m\000\000"
(gdb) p msg
$15 = (const wxChar *) 0x0
Logged

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: One assertion, two bugs...
« Reply #1 on: December 28, 2005, 03:37:40 AM »

Well, the assert is what it is, although still mysterious.

The crash is weird.  At first I thought it was another incarnation of the "%s" format bugs we've been squashing lately, but frame 14 shows "value=105".  It's the line number being formatted, not any string input.  Also, the buffer size being allocated (1025) seems reasonable.  You're right, phoenix, it does look like memory corruption.
Logged