Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jEsuSdA opened this issue Feb 27, 2018 · 3 comments

Comments

@jEsuSdA
Copy link

jEsuSdA commented Feb 27, 2018

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
Copy link
Member

sc0w commented Nov 28, 2020

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 #29

@sc0w
Copy link
Member

sc0w commented Nov 29, 2020

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
Copy link
Member

sc0w commented Aug 30, 2021

duplicate of #29

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

@sc0w sc0w closed this as completed Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants