aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2

Author Topic: Latest amule CVS builds, bad descriptor  (Read 21011 times)

xplode_me

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 18
    • http://linuxpt.dyndns.org
Latest amule CVS builds, bad descriptor
« on: April 15, 2008, 07:42:10 PM »

Code: [Select]
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.
Logged
xplode_me

xplode_me

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 18
    • http://linuxpt.dyndns.org
Re: Latest amule CVS builds, bad descriptor
« Reply #1 on: April 15, 2008, 08:51:31 PM »

I've done both.

An older build (january) doesn't show this error at all. I'm running mac os 10.5.x
Logged
xplode_me

xplode_me

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 18
    • http://linuxpt.dyndns.org
Re: Latest amule CVS builds, bad descriptor
« Reply #2 on: April 16, 2008, 09:34:20 PM »

Latest CVS, the problem persists.
Logged
xplode_me

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Latest amule CVS builds, bad descriptor
« Reply #3 on: April 16, 2008, 09:40:31 PM »

Could you please give some details on how your build aMule and for what kind of files this happens?
Logged

xplode_me

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 18
    • http://linuxpt.dyndns.org
Re: Latest amule CVS builds, bad descriptor
« Reply #4 on: April 16, 2008, 11:43:19 PM »

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.

Code: [Select]
./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?
Logged
xplode_me

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Latest amule CVS builds, bad descriptor
« Reply #5 on: April 18, 2008, 12:37:11 AM »

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.
Logged
concordia cum veritate

xplode_me

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 18
    • http://linuxpt.dyndns.org
Re: Latest amule CVS builds, bad descriptor
« Reply #6 on: April 18, 2008, 11:26:49 AM »

Ok, i'll try to find the specific day as soon as possible.
Thanks for the effort.
Logged
xplode_me

xplode_me

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 18
    • http://linuxpt.dyndns.org
Re: Latest amule CVS builds, bad descriptor
« Reply #7 on: April 18, 2008, 01:53:32 PM »

Ok, the last version that is working as it should is from March 24th. After that is all "descriptor" errors.
Logged
xplode_me

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Latest amule CVS builds, bad descriptor
« Reply #8 on: April 18, 2008, 02:37:19 PM »

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.]

Code: [Select]
--- 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();
               }
Logged

MalaPraxis

  • Developer
  • Approved Newbie
  • *****
  • Karma: 5
  • Offline Offline
  • Posts: 34
Re: Latest amule CVS builds, bad descriptor
« Reply #9 on: April 18, 2008, 03:00:51 PM »

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.
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Latest amule CVS builds, bad descriptor
« Reply #10 on: April 18, 2008, 03:53:45 PM »

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?
Logged

MalaPraxis

  • Developer
  • Approved Newbie
  • *****
  • Karma: 5
  • Offline Offline
  • Posts: 34
Re: Latest amule CVS builds, bad descriptor
« Reply #11 on: April 18, 2008, 04:13:28 PM »

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.
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Latest amule CVS builds, bad descriptor
« Reply #12 on: April 18, 2008, 04:44:54 PM »

Code: [Select]
#ifdef __WXMAC__
#define FILE_WRAPPER wxFile
#include <wx/file.h>
#else
#define FILE_WRAPPER wxFFile
#include <wx/ffile.h>
#endif

One ugly ifdef.
Logged
concordia cum veritate

xplode_me

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 18
    • http://linuxpt.dyndns.org
Re: Latest amule CVS builds, bad descriptor
« Reply #13 on: April 20, 2008, 09:23:33 PM »

Well, whatever you guys did, thanks!
I updated to the April 20th tarball and the problem seems to be gone!

:) Thanks alot!
Logged
xplode_me

GodzFire

  • Approved Newbie
  • *
  • Karma: -4
  • Offline Offline
  • Posts: 30
Re: Latest amule CVS builds, bad descriptor
« Reply #14 on: April 26, 2008, 08:20:26 PM »

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 :-/
Logged
Pages: [1] 2