amule-project / amule

'All-platform' P2P client based on eMule
1.02k stars 220 forks source link

../../src/CFile.cpp(370): assert "Assert failure" failed in doSeek(): ((IsOpened())) #121

Closed jEsuSdA closed 3 years ago

jEsuSdA commented 6 years ago

Hi! From time to time, aMule fail and shut-down.

This is the error message.

ASSERT INFO:
../../src/CFile.cpp(370): assert "Assert failure" failed in doSeek(): ((IsOpened()))

BACKTRACE:
[1] wxOnAssert(char const*, int, char const*, char const*, wchar_t const*)
[2] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[3] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*)
[4] wxEvtHandler::TryHereOnly(wxEvent&)
[5] wxEvtHandler::ProcessEventLocally(wxEvent&)
[6] wxEvtHandler::ProcessEvent(wxEvent&)
[7] wxEvtHandler::ProcessPendingEvents()
[8] wxAppConsoleBase::ProcessPendingEvents()
[9] wxApp::DoIdle()
[10] g_main_context_dispatch
[11] g_main_loop_run
[12] gtk_main
[13] wxGUIEventLoop::DoRun()
[14] wxEventLoopBase::Run()
[15] wxAppConsoleBase::MainLoop()
[16] wxEntry(int&, wchar_t**)
[17] __libc_start_main

Thank you! ;)

sc0w commented 4 years ago

I noticed the same when some files (not all) finish the downloading

seems this line in CFile.cpp is related:

MULE_VALIDATE_STATE(IsOpened(), wxT("Cannot seek on closed file."));

in he function:

sint64 CFile::doSeek(sint64 offset) const
{
    MULE_VALIDATE_STATE(IsOpened(), wxT("Cannot seek on closed file."));
    MULE_VALIDATE_PARAMS(offset >= 0, wxT("Invalid position, must be positive."));

    sint64 result = SEEK_FD(m_fd, offset, SEEK_SET);

    if (result == offset) {
        return result;
    } else if (result == wxInvalidOffset) {
        throw CSeekFailureException(wxString(wxT("Seeking failed: ")) + wxSysErrorMsg());
    } else {
        throw CSeekFailureException(wxT("Seeking returned incorrect position"));
    }
}

...and probably this issue is a duplicate of https://github.com/amule-project/amule/issues/29

sc0w commented 4 years ago

running amule in terminal shows me:

Assertion failed: ../../src/CFile.cpp:doSeek:371: Assertion 'Assert failure' failed. ((IsOpened()))
Backtrace follows:
[3] wxOnAssert(char const*, int, char const*, char const*, wchar_t const*) in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bc2b3d5]
[4] ?? in amule[0x5581f3d11ba4]
[5] ?? in amule[0x5581f3d2c79a]
[6] ?? in amule[0x5581f3d6c436]
[7] ?? in amule[0x5581f3cd5c52]
[8] ?? in amule[0x5581f3c1fcb7]
[9] ?? in amule[0x5581f3c202f3]
[10] ?? in amule[0x5581f3c22d60]
[11] ?? in amule[0x5581f3b77503]
[12] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bda3241]
[13] wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bda3333]
[14] wxEvtHandler::TryHereOnly(wxEvent&) in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bda367c]
[15] wxEvtHandler::ProcessEventLocally(wxEvent&) in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bda3703]
[16] wxEvtHandler::ProcessEvent(wxEvent&) in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bda37a1]
[17] wxEvtHandler::ProcessPendingEvents() in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bda414e]
[18] wxAppConsoleBase::ProcessPendingEvents() in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bc29f7f]
[19] wxApp::DoIdle() in /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0[0x7fbc3c12fa69]
[20] ?? in /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0[0x7fbc3c12fb63]
[21] g_main_context_dispatch in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0[0x7fbc3aabfadf]
[22] ?? in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0[0x7fbc3aabfe88]
[23] g_main_loop_run in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0[0x7fbc3aac017b]
[24] gtk_main in /usr/lib/x86_64-linux-gnu/libgtk-3.so.0[0x7fbc3b0e07a5]
[25] wxGUIEventLoop::DoRun() in /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0[0x7fbc3c14c955]
[26] wxEventLoopBase::Run() in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bc6297d]
[27] wxAppConsoleBase::MainLoop() in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bc2b9a6]
[28] wxEntry(int&, wchar_t**) in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bcb3a19]
[29] ?? in amule[0x5581f3b51902]
[30] __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6[0x7fbc3b66dcca]
[31] ?? in amule[0x5581f3b649ba]

../../src/CFile.cpp(371): assert "Assert failure" failed in doSeek(): ((IsOpened()))

(amule:128959): Gtk-WARNING **: 14:03:55.451: gtk_window_set_titlebar() called on a realized window
 2020-11-29 14:05:22: Ahora, saliendo de la aplicación principal...
 2020-11-29 14:05:22: aMule OnExit: terminando el núcleo.
Assertion failed: ../../src/ClientList.cpp:~CClientList:100: Assertion 'm_clientList.empty()' failed. 
Backtrace follows:
[3] wxOnAssert(char const*, int, char const*, char const*, char const*) in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bc272d5]
[4] ?? in amule[0x5581f3b90742]
[5] ?? in amule[0x5581f3b79259]
[6] ?? in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bc0ccd7]
[7] ?? in amule[0x5581f3b51902]
[8] __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6[0x7fbc3b66dcca]
[9] ?? in amule[0x5581f3b649ba]

../../src/ClientList.cpp(100): assert "m_clientList.empty()" failed in ~CClientList().

(amule:128959): Gtk-WARNING **: 14:05:22.820: gtk_window_set_titlebar() called on a realized window

--------------------------------------------------------------------------------
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:
    http://forum.amule.org/index.php?board=67.0
If possible, please try to generate a real backtrace of this crash:
    http://wiki.amule.org/wiki/Backtraces

----------------------------=| BACKTRACE FOLLOWS: |=----------------------------
Current version is: aMule SVN compiled with wxGTK2 v3.0.5 and Boost 1.71 (Snapshot: rev. g5623890+)
Running on: Linux 5.8.0-3-amd64 x86_64

[2] ?? in /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0[0x7fbc3bd774e0]
[3] ?? in /lib/x86_64-linux-gnu/libpthread.so.0[0x7fbc3b820140]

--------------------------------------------------------------------------------
Aborted
sc0w commented 3 years ago

duplicate of https://github.com/amule-project/amule/issues/29

I am testing a fix, it seems to work, I will open new PR soon