aMule Forum

English => Backtraces => Topic started by: mc on February 23, 2008, 09:45:37 PM

Title: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStringCo
Post by: mc on February 23, 2008, 09:45:37 PM
When I clicked Disconnect, I got the following(amule-svn-20080223).

ASSERT INFO:
SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStringCore().

BACKTRACE:
[1] wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)
[2] CFileDataIO::WriteStringCore(char const*, EUtf8Str, unsigned char) /home/user/src/amule-cvs-20080223-my/src/SafeFile.cpp:351
[3] CFileDataIO::WriteString(wxString const&, EUtf8Str, unsigned char) /home/user/src/amule-cvs-20080223-my/src/SafeFile.cpp:321
[4] CFileDataIO::WriteTag(CTag const&) /home/user/src/amule-cvs-20080223-my/src/SafeFile.cpp:496
[5] CFileDataIO::WriteTagPtrList(__gnu_debug_def::list<CTag*, std::allocator<CTag*> > const&) /home/user/src/amule-cvs-20080223-my/src/SafeFile.cpp:544
[6] Kademlia::CIndexed::~CIndexed() kademlia/kademlia/Indexed.cpp:356
[7] Kademlia::CKademlia::Stop() kademlia/kademlia/Kademlia.cpp:122
[8] CamuleApp::StopKad() /home/user/src/amule-cvs-20080223-my/src/amule.cpp:2155
[9] CamuleDlg::OnBnConnect(wxCommandEvent&) /home/user/src/amule-cvs-20080223-my/src/amuleDlg.cpp:539
[10] wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) cons)
[11] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[12] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[13] wxEvtHandler::ProcessEvent(wxEvent&)
[14] wxWindowBase::TryParent(wxEvent&)
[15] wxEvtHandler::ProcessEvent(wxEvent&)
[16] wxToolBarBase::OnLeftClick(int, bool)
[17] g_closure_invoke()
[18] g_signal_emit_valist()
[19] g_signal_emit()
[20] g_closure_invoke()
[21] g_signal_emit_valist()
[22] g_signal_emit()
[23] g_closure_invoke()
[24] g_signal_emit_valist()
[25] g_signal_emit()
[26] gtk_propagate_event()
[27] gtk_main_do_event()
[28] g_main_context_dispatch()
[29] g_main_loop_run()
[30] gtk_main()
[31] wxEventLoop::Run()
[32] wxAppBase::MainLoop()


Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStri
Post by: mc on February 23, 2008, 09:51:06 PM
When I started amule, I got these in console:

Adding file /home/user/.aMule/Temp/036.part.met to shares
Invalid Kad tag; type=0xc2 name=‚ƒÃ‚‚ƒÃ‚ÂÂÂÃ
..........................


And in Amule Log:

2008-02-24 04:51:22: Indexed.cpp(252): Kademlia Indexing: Exception in CIndexed::readFile: Invalid Kad tag type on packet

What does it mean?
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStringCo
Post by: Xaignar on February 24, 2008, 01:00:19 AM
I've added some checks to take care of this. If you're still getting the log message above, then just remove the files ~/.aMule/*_index.dat
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStri
Post by: mc on February 24, 2008, 01:49:17 AM
I've added some checks to take care of this. If you're still getting the log message above, then just remove the files ~/.aMule/*_index.dat
When I simply did a 'cat 036.part.met', unlike other met files, I could not see its name. I'll try later. Thanks.
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStringCo
Post by: Xaignar on February 24, 2008, 01:51:52 AM
The error message does not refer to anything related to 036.part.met, it just happened to be the case that the error occured after the message mentioning 036.part.met was printed.
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStri
Post by: mc on February 24, 2008, 02:09:30 AM
The error message does not refer to anything related to 036.part.met, it just happened to be the case that the error occured after the message mentioning 036.part.met was printed.
The message disappeared when I removed that file(036.*).
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStringCo
Post by: Xaignar on February 24, 2008, 01:04:25 PM
That would be because the _index.dat files are overwritten on showdown. And not being succesfully read, it would be cleared, thus leaving a valid file for the next run. The reason why I say that it has nothing to do with the part-file, is that this error can only happen when reading Kad-tags, which we don't do when loading part.met files.
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStri
Post by: mc on February 24, 2008, 08:46:46 PM
amule-svn-20080224 handles better.

When I exited aMule:

2008-02-25 03:18:00: Logger.cpp(269): Debug: SafeFile.cpp(354): assert "wxAssertFailure" failed in WriteStringCore(): String is too long to be saved
2008-02-25 03:18:14: Logger.cpp(269): Debug: cannot read addr2line output for stack frame #0

After started aMule, when I clicked Show files details on a suspecious file, a  file filled with strange chars in File Names section disappeared.
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStri
Post by: mc on February 24, 2008, 08:53:09 PM
The following assertion also happed some time ago:

ASSERT INFO:
Format.cpp(133): assert "wxAssertFailure" failed in GetCurrentField(): ((m_indexEnd < m_format.Len()))

BACKTRACE:
[1] wxOnAssert(wchar_t const*, int, char const*, wchar_t const*, wchar_t const*)
[2] CFormat::GetCurrentField() /home/user/src/amule-cvs-20080224-my/src/libs/common/Format.cpp:133
[3] CFormat::GetIntegerField(wchar_t const*) /home/user/src/amule-cvs-20080224-my/src/libs/common/Format.cpp:183
[4] CFormat::operator%(int) ./libs/common/Format.h:241
[5] CPartFile::CheckFreeDiskSpace(unsigned int) /home/user/src/amule-cvs-20080224-my/src/PartFile.cpp:2581
[6] CPartFile::FlushBuffer(bool, bool, bool) /home/user/src/amule-cvs-20080224-my/src/PartFile.cpp:3060
[7] CPartFile::Process(unsigned int, unsigned char) /home/user/src/amule-cvs-20080224-my/src/PartFile.cpp:1454
[8] CDownloadQueue::Process() /home/user/src/amule-cvs-20080224-my/src/DownloadQueue.cpp:377
[9] CamuleApp::OnCoreTimer(CTimerEvent&) /home/user/src/amule-cvs-20080224-my/src/amule.cpp:1426
[10] wxAppConsole::HandleEvent(wxEvtHandler*, void (wxEvtHandler::*)(wxEvent&), wxEvent&) cons)
[11] wxEvtHandler::ProcessEventIfMatches(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[12] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[13] wxEvtHandler::ProcessEvent(wxEvent&)
[14] wxEvtHandler::ProcessPendingEvents()
[15] wxAppConsole::ProcessPendingEvents()
[16] wxAppBase::ProcessIdle()
[17] g_main_context_dispatch()
[18] g_main_loop_run()
[19] gtk_main()
[20] wxEventLoop::Run()
[21] wxAppBase::MainLoop()
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStri
Post by: mc on February 24, 2008, 10:14:05 PM
Anonther backtrace file.
(I had a hard time to capture this since gnome-terminal didn't allow me to paste it. So I used xterm. :))
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStringCo
Post by: Xaignar on February 25, 2008, 12:10:53 AM
Hmmm.
Did you try removing the *_index.dat files?

Also, you mentioned a file with a "file filled with strange chars". Try removing (or renaming) that file.
Title: Re: SafeFile.cpp(350): assert "real_length < (uint16)0xFFFF" failed in WriteStri
Post by: mc on February 25, 2008, 12:54:29 PM
Hmmm.
Did you try removing the *_index.dat files?

Also, you mentioned a file with a "file filled with strange chars". Try removing (or renaming) that file.
No longer does it happen(I also deleted *_index.dat.). And I don't see the strange file name  in File Names section any more.