aMule Forum
English => en_Bugs => Topic started by: xplode_me on April 15, 2008, 07:42:10 PM
-
2008-04-15 17:41:44: Logger.cpp(269): Error: failed to flush the file '/Users/user/Library/Application Support/aMule/Temp/001.part.met.bak' (error 9: Bad file descriptor)
I'm getting this error every minute, filling up my log and making aMule use lots of cpu. If i keep cleaning the log everything is fine. I have a build from Feb. 20th working just fine. Builds from April 10th - 15th give me this problem.
-
I've done both.
An older build (january) doesn't show this error at all. I'm running mac os 10.5.x
-
Latest CVS, the problem persists.
-
Could you please give some details on how your build aMule and for what kind of files this happens?
-
It happens with every kind of file. I followed the amule wiki tutorial, here http://www.amule.org/wiki/index.php/HowTo_compile_on_Mac.
I just compiled a CVS export from April 1st, and the error is there. The version i'm running without that happening is from Feb 20th.
./configure --disable-systray --disable-gtk --with-wx-config=../wxMac-2.8.7/build/wx-config --enable-optimize --disable-debug --enable-webserver --enable-amulecmd --enable-alcc && make
Is there any frontend to a public SVN or CVS?
-
Is there any frontend to a public SVN or CVS?
No.
I just compiled a CVS export from April 1st, and the error is there. The version i'm running without that happening is from Feb 20th.
It would be a big help if you could find the exact day which has this problem first.
Please contact me if you need a tarball that is not anymore on hirnriss.
-
Ok, i'll try to find the specific day as soon as possible.
Thanks for the effort.
-
Ok, the last version that is working as it should is from March 24th. After that is all "descriptor" errors.
-
I think this is the offending commit. Could you please revert the changes of this patch and see if the problems are gone then? [This is to make sure, that the problem is indeed r8257 and not something else, not the actual solution of the problem.]
--- trunk/src/libs/common/Path.cpp 2008-03-24 19:07:15 UTC (rev 8256)
+++ trunk/src/libs/common/Path.cpp 2008-03-24 19:13:11 UTC (rev 8257)
@@ -26,7 +26,7 @@
#include "MuleDebug.h"
#include "StringFunctions.h"
-#include <wx/file.h>
+#include <wx/ffile.h>
#include <wx/utils.h>
#include <wx/filename.h>
@@ -436,7 +436,7 @@
sint64 CPath::GetFileSize() const
{
if (FileExists()) {
- wxFile f(m_filesystem);
+ wxFFile f(m_filesystem);
if (f.IsOpened()) {
return f.Length();
}
@@ -607,7 +607,7 @@
if (CPath::CloneFile(src, dst, true)) {
// Try to ensure that the backup gets physically written
- wxFile backupFile;
+ wxFFile backupFile;
if (backupFile.Open(dst.m_filesystem)) {
backupFile.Flush();
}
-
That was my change and seems to be the offending commit, but the code is perfectly right.
wxFile was causing problems on Windows and if now wxFFile is causing problems on Mac, we have a problem.
-
Well, if this is actually the problem, then it's caused by wx. All I can think of is using the lowlevel (wxFile) function on Mac and the abstraction (i.e.wxFFile) on all other platforms. Three ugly ifdefs in the code, but that's how dirty workarounds are.
BTW: I'm currently windowsless after my hdd dying on me, but the last time I tried to compile aMule with VS, I failed miserablely. Could you please write up some quick instructions in the wiki and add the solution/project files to SVN?
-
I'll try to clear some projects and add that.
About wxFile / wxFFile : wxFFile is not a wrapper or less lowlevel than wxFile, wxFile uses int handles and wxFFile uses FILE*
Both are wrappers for the C / C++ standard functions.
-
#ifdef __WXMAC__
#define FILE_WRAPPER wxFile
#include <wx/file.h>
#else
#define FILE_WRAPPER wxFFile
#include <wx/ffile.h>
#endif
One ugly ifdef.
-
Well, whatever you guys did, thanks!
I updated to the April 20th tarball and the problem seems to be gone!
:) Thanks alot!
-
Sadly, every aMule build that I've tried or has been posted has failed. The same thing happens each time, I double click the icon to open it, it shows up in the Dock as if it's opening, and then just goes away.
Unfortunately, I'm stuck with the "most recent" one that works which, for me, is the CVS from Tues, Oct 2nd, 2007 :-/
-
Sadly, you did not provide any helpful information. What "builds" have been "posted" ? What's your OS ? How did you configure aMule ? What's in the logfile or in the console ? I there a backtrace ?
And, sadly, this has nothing to do with the rest of this thread.