aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: fix: aMule-CVS-20071115 doesn't update server.met on startup  (Read 7032 times)

ycjhi

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 13
fix: aMule-CVS-20071115 doesn't update server.met on startup
« on: November 16, 2007, 04:12:15 AM »

aMule-CVS-20071115 doesn't update server.met correctly from the servers listed in addresses.dat on start-up.
here's my fix:

Code: [Select]
diff -u amule-cvs/src/ServerList.cpp amule-cvs-fixed/src/ServerList.cpp
--- amule-cvs/src/ServerList.cpp 2007-08-20 12:07:59.000000000 -0400
+++ amule-cvs-fixed/src/ServerList.cpp 2007-11-15 11:05:09.000000000 -0500
@@ -816,8 +816,10 @@
  // We use wxURL to validate the URI
  if ( wxURL( URI ).GetError() == wxURL_NOERR ) {
  // Ok, got a valid URI
+ strURLToDownload = URI ;
  URLAutoUpdate = strURLToDownload;
  strTempFilename =  theApp->ConfigDir + wxT("server_auto.met");
+ AddLogLineM(true, CFormat( _("Start downloading server list from %s") ) % strURLToDownload);
 
  CHTTPDownloadThread *downloader = new CHTTPDownloadThread(strURLToDownload,strTempFilename, HTTP_ServerMetAuto);
  downloader->Create();
@@ -846,7 +848,7 @@
  // So, file is loaded and merged, and also saved
  wxRemoveFile(strTempFilename);
  } else {
- AddLogLineM(true, CFormat(_("Failed to download the server list from %s") ) % URLUpdate);
+ AddLogLineM(true, CFormat(_("Failed to download the server list from %s") ) % URLAutoUpdate);
  }
 
  ++current_url_index;
« Last Edit: November 16, 2007, 04:33:40 AM by ycjhi »
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: fix: aMule-CVS-20071115 doesn't update server.met on startup
« Reply #1 on: November 16, 2007, 12:24:37 PM »

Committed, thanks!

Cheers!
Logged

ycjhi

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 13
Re: fix: aMule-CVS-20071115 doesn't update server.met on startup
« Reply #2 on: November 18, 2007, 12:10:15 PM »

I'm glad I could contribute to this project. Actually, I didn't expect my fixes would be applied so soon. Thank you.
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: fix: aMule-CVS-20071115 doesn't update server.met on startup
« Reply #3 on: November 18, 2007, 12:30:06 PM »

Hi ycjhi,

There is already another version in the CVS tarball. Unfortunately, I cannot test it, so would you mind trying it? Your fixes are welcome.

Cheers!

EDIT: Try tomorrow CVS tarball, today's is broken for Mac.
« Last Edit: November 18, 2007, 12:36:02 PM by phoenix »
Logged

ycjhi

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 13
Re: fix: aMule-CVS-20071115 doesn't update server.met on startup
« Reply #4 on: November 20, 2007, 12:03:17 AM »

Hi,

I've tried aMule-CVS-20071119 version, and checked all the issues that I mentioned were solved.

However, I found the following two major problems:

(1) I find my MacBook hangs in the morning when I keep running aMule over night. I haven't experienced the same problem with aMule-CVS-20071115 version.

(2) It seems that aMule doesn't download sever.met from the site first listed in the addresses.dat file. From the second listed site, it works fine. This problem was in the aMule-CVS-20071115 too. I would suggest delaying processing addresses.dat file until all other initialization work have done completely.

(I don't think I can write a patch easily since above problems don't seem to be as simple as the problems that my previous patches handled.)

Also, there's one minor problem. Logger shows "Error: aMule could not unlock mutex" but I could not locate the real source of the message.

Thanks!
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: fix: aMule-CVS-20071115 doesn't update server.met on startup
« Reply #5 on: November 20, 2007, 04:08:06 AM »

I've tried aMule-CVS-20071119 version, and checked all the issues that I mentioned were solved.
Nice!

However, I found the following two major problems:

(1) I find my MacBook hangs in the morning when I keep running aMule over night. I haven't experienced the same problem with aMule-CVS-20071115 version.
Hum, I need more information here.

(2) It seems that aMule doesn't download sever.met from the site first listed in the addresses.dat file. From the second listed site, it works fine. This problem was in the aMule-CVS-20071115 too. I would suggest delaying processing addresses.dat file until all other initialization work have done completely.
I have added a debug message to the loading of address.dat. If you go to preferences and enable debug messages for general messages, it should show up in the log. I suggest you invert the order of the addresses in address.dat to see if it is really related to the order or if it is a problem of the URI.

Also, there's one minor problem. Logger shows "Error: aMule could not unlock mutex" but I could not locate the real source of the message.
Doesn't it show a line number and a file name?
Logged

ycjhi

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 13
Re: fix: aMule-CVS-20071115 doesn't update server.met on startup
« Reply #6 on: November 20, 2007, 05:23:46 AM »

However, I found the following two major problems:

(1) I find my MacBook hangs in the morning when I keep running aMule over night. I haven't experienced the same problem with aMule-CVS-20071115 version.
Hum, I need more information here.

Sorry. It seems to be the problem of my MacBook. I've just experienced the same thing running my MacBook for 6 hours without aMule. I think I need to reinstall Leopard.  :'(

(2) It seems that aMule doesn't download sever.met from the site first listed in the addresses.dat file. From the second listed site, it works fine. This problem was in the aMule-CVS-20071115 too. I would suggest delaying processing addresses.dat file until all other initialization work have done completely.
I have added a debug message to the loading of address.dat. If you go to preferences and enable debug messages for general messages, it should show up in the log. I suggest you invert the order of the addresses in address.dat to see if it is really related to the order or if it is a problem of the URI.

Inverting the order didn't help. I attached my log at the end of this message. It's a bit long.

Also, there's one minor problem. Logger shows "Error: aMule could not unlock mutex" but I could not locate the real source of the message.
Doesn't it show a line number and a file name?

Logger.cpp(268): Error: Could not unlock mutex (error 0: Unknown error: 0)

Thank you,


Code: [Select]
2007-11-19 23:18:06: ClientCreditsList.cpp(165): Creditfile loaded, 628 clients are known
2007-11-19 23:18:06: IPFilter.cpp(110): Loading IP-filters 'ipfilter.dat' and 'ipfilter_static.dat'.
2007-11-19 23:18:06: IPFilter.cpp(333): Loaded 229622 IP-ranges from '/Users/ycjhi/Library/Application Support/aMule/ipfilter.dat'. 0 malformed lines were discarded.
2007-11-19 23:18:06: IPFilter.cpp(333): Loaded 0 IP-ranges from '/Users/ycjhi/Library/Application Support/aMule/ipfilter_static.dat'. 0 malformed lines were discarded.
2007-11-19 23:18:06: amuleDlg.cpp(212):
2007-11-19 23:18:06: amuleDlg.cpp(214):  - This is aMule CVS using wxMac v2.8.6 (Snapshot: Mon Nov 19 07:01:57 CET 2007) based on eMule.
2007-11-19 23:18:06: amuleDlg.cpp(216):    Running on MacOS (Darwin 9.0.0 i386)
2007-11-19 23:18:06: amuleDlg.cpp(218):  - Visit http://www.amule.org to check if a new version is available.
2007-11-19 23:18:06: amuleDlg.cpp(219):
2007-11-19 23:18:06: ServerList.cpp(84): Loading server.met file: /Users/ycjhi/Library/Application Support/aMule/server.met
2007-11-19 23:18:06: ServerList.cpp(169): 15 servers in server.met found
2007-11-19 23:18:06: ServerList.cpp(830): Start downloading server list from http://www.peerates.net/servers.php
2007-11-19 23:18:06: DownloadQueue.cpp(169): Found 1 part files
2007-11-19 23:18:06: ExternalConn.cpp(146): External connections disabled in config file
2007-11-19 23:18:06: MuleUDPSocket.cpp(77): MuleUDPSocket: Created Server UDP-Socket at port 8754
2007-11-19 23:18:06: MuleUDPSocket.cpp(77): MuleUDPSocket: Created Client UDP-Socket at port 8752
2007-11-19 23:18:06: UPnP.cpp(93): Universal Plug and Play: Successfully opened /Applications/aMule.app/Contents/Frameworks/libixml.2.dylib.
2007-11-19 23:18:06: UPnP.cpp(89): Universal Plug and Play: error(CDynamicLibHandle): Unable to dlopen /Applications/aMule.app/Contents/Frameworks/libupnp.2.dylib. Check PATH and LD_LIBRARY_PATH.
2007-11-19 23:18:06: UPnP.cpp(93): Universal Plug and Play: Successfully opened /Applications/aMule.app/Contents/Frameworks/libupnp.3.dylib.
2007-11-19 23:18:06: UPnP.cpp(1061): Universal Plug and Play: bound to 192.168.1.50:50001.
2007-11-19 23:18:06: UPnP.cpp(1418): Universal Plug and Play: Internet Gateway Device Detected.
2007-11-19 23:18:06: UPnP.cpp(745): Universal Plug and Play: WAN Service Detected: 'urn:schemas-upnp-org:service:WANIPConnection:1'.
2007-11-19 23:18:06: UPnP.cpp(1716): Universal Plug and Play: Successfully subscribed to service urn:schemas-upnp-org:service:WANIPConnection:1, absEventSubURL: http://192.168.1.1:5431/uuid:000f-66c8-2f7a0200cddc/WANIPConnection:1.
2007-11-19 23:18:06: UPnP.cpp(745): Universal Plug and Play: WAN Service Detected: 'urn:schemas-upnp-org:service:WANPPPConnection:1'.
2007-11-19 23:18:06: UPnP.cpp(1716): Universal Plug and Play: Successfully subscribed to service urn:schemas-upnp-org:service:WANPPPConnection:1, absEventSubURL: http://192.168.1.1:5431/uuid:000f-66c8-2f7a0200cddc/WANPPPConnection:1.
2007-11-19 23:18:06: UPnP.cpp(1418): Universal Plug and Play: Internet Gateway Device Detected.
2007-11-19 23:18:06: UPnP.cpp(762): Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1'. Ignoring.
2007-11-19 23:18:06: UPnP.cpp(762): Universal Plug and Play: Uninteresting service detected: 'urn:schemas-upnp-org:service:Layer3Forwarding:1'. Ignoring.
2007-11-19 23:18:06: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("PortMappingNumberOfEntries"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(1651): Universal Plug and Play: UPNP_EVENT_RECEIVED:
2007-11-19 23:18:25:     SID: uuid:9826e1c0-1dd1-11b2-8525-91df928e94c5
2007-11-19 23:18:25:     Key: 0
2007-11-19 23:18:25:     Property list:
2007-11-19 23:18:25:         PortMappingNumberOfEntries='2'
2007-11-19 23:18:25: Logger.cpp(268): Error: Could not unlock mutex (error 0: Unknown error: 0)
2007-11-19 23:18:25: UPnP.cpp(1651): Universal Plug and Play: UPNP_EVENT_RECEIVED:
2007-11-19 23:18:25:     SID: uuid:9831ea66-1dd1-11b2-8525-91df928e94c5
2007-11-19 23:18:25:     Key: 0
2007-11-19 23:18:25:     Property list:
2007-11-19 23:18:25:         PossibleConnectionTypes='Unconfigured,IP_Routed,DHCP_Spoofed,PPPOE_Bridged,PPTP_Relay,L2TP_Relay,PPOE_Relay'
2007-11-19 23:18:25:         ConnectionStatus='Unconfigured'
2007-11-19 23:18:25:         ExternalIPAddress='XXX.XXX.XXX.XXX'
2007-11-19 23:18:25:         PortMappingNumberOfEntries=''
2007-11-19 23:18:25: HTTPDownload.cpp(233): Invalid response from http download server
2007-11-19 23:18:25: HTTPDownload.cpp(233): Invalid response from http download server
2007-11-19 23:18:25: UPnP.cpp(1651): Universal Plug and Play: UPNP_EVENT_RECEIVED:
2007-11-19 23:18:25:     SID: uuid:9826e1c0-1dd1-11b2-8525-91df928e94c5
2007-11-19 23:18:25:     Key: 1
2007-11-19 23:18:25:     Property list:
2007-11-19 23:18:25:         PortMappingNumberOfEntries='3'
2007-11-19 23:18:25: UPnP.cpp(1651): Universal Plug and Play: UPNP_EVENT_RECEIVED:
2007-11-19 23:18:25:     SID: uuid:9826e1c0-1dd1-11b2-8525-91df928e94c5
2007-11-19 23:18:25:     Key: 2
2007-11-19 23:18:25:     Property list:
2007-11-19 23:18:25:         PortMappingNumberOfEntries='4'
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("ConnectionType"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("PossibleConnectionTypes"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("ConnectionStatus"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("Uptime"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("LastConnectionError"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("RSIPAvailable"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("NATEnabled"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("ExternalIPAddress"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("PortMappingNumberOfEntries"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("PortMappingLeaseDuration"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: UPnP.cpp(349): Universal Plug and Play: Error: GetStateVariable("PortMappingNumberOfEntries"): in a call to m_UpnpGetServiceVarStatus: Error code :'401', Error description :'Invalid Action'.
2007-11-19 23:18:25: SharedFileList.cpp(377): Found 42 known shared files
2007-11-19 23:18:25: amule.cpp(803): Connecting
2007-11-19 23:18:25: ServerSocket.cpp(622): Servers: Trying to connect
2007-11-19 23:18:25: ServerSocket.cpp(755): Connecting to no1.eserver.emule.org.cn (222.73.207.86 - 222.73.207.86:8080) using protocol obfuscation.
2007-11-19 23:18:25: RoutingZone.cpp(150): Read 66 Kad contacts
2007-11-19 23:18:25: amule.cpp(1893): Failed to download the version check file
2007-11-19 23:18:25: ServerList.cpp(860): Failed to download the server list from http://www.peerates.net/servers.php
2007-11-19 23:18:25: ServerList.cpp(830): Start downloading server list from http://www.gruk.org/server.met.gz
2007-11-19 23:18:25: ThreadScheduler.cpp(308): ThreadScheduler: Completed task 'AICH Syncronizing', 0 tasks remaining.
2007-11-19 23:18:25: ServerSocket.cpp(622): Servers: Trying to connect
2007-11-19 23:18:25: ServerSocket.cpp(755): Connecting to no2.eserver.emule.org.cn (58.218.179.157 - 58.218.179.157:8080) using protocol obfuscation.
2007-11-19 23:18:25: ServerConnect.cpp(200): Connected to no1.eserver.emule.org.cn (222.73.207.86:8080)
2007-11-19 23:18:26: ServerConnect.cpp(200): Connected to no2.eserver.emule.org.cn (58.218.179.157:8080)
2007-11-19 23:18:26: ServerList.cpp(84): Loading server.met file: /Users/ycjhi/Library/Application Support/aMule/server_auto.met
2007-11-19 23:18:26: ServerList.cpp(171): 0 servers added
2007-11-19 23:18:26: ServerConnect.cpp(352): Lost connection to no1.eserver.emule.org.cn (222.73.207.86:8080)
2007-11-19 23:18:26: ServerConnect.cpp(411): Connection lost
2007-11-19 23:18:26: ServerConnect.cpp(352): Lost connection to no2.eserver.emule.org.cn (58.218.179.157:8080)
2007-11-19 23:18:26: ServerConnect.cpp(411): Connection lost
2007-11-19 23:18:29: ServerConnect.cpp(473): Connection attempt to no1.eserver.emule.org.cn (222.73.207.86:8080) timed out.
2007-11-19 23:18:29: ServerSocket.cpp(622): Servers: Trying to connect
2007-11-19 23:18:29: ServerSocket.cpp(755): Connecting to www.UseNeXT.to (80.252.110.146 - 80.252.110.146:4661) using protocol obfuscation.
2007-11-19 23:18:30: ServerConnect.cpp(200): Connected to www.UseNeXT.to (80.252.110.146:4661)
2007-11-19 23:18:33: ServerSocket.cpp(411): Servers: Connected
2007-11-19 23:18:33: ServerConnect.cpp(273): Connection established on: www.UseNeXT.to
2007-11-19 23:18:33: ServerSocket.cpp(419): New clientid is XXXXXXXX
2007-11-19 23:19:23: IPFilter.cpp(110): Loading IP-filters 'ipfilter.dat' and 'ipfilter_static.dat'.
2007-11-19 23:19:25: IPFilter.cpp(333): Loaded 229622 IP-ranges from '/Users/ycjhi/Library/Application Support/aMule/ipfilter.dat'. 0 malformed lines were discarded.
2007-11-19 23:19:25: IPFilter.cpp(333): Loaded 0 IP-ranges from '/Users/ycjhi/Library/Application Support/aMule/ipfilter_static.dat'. 0 malformed lines were discarded.

« Last Edit: November 20, 2007, 01:10:29 PM by phoenix »
Logged

phoenix

  • Evil respawning bird from aMule Dev Team
  • Developer
  • Hero Member
  • *****
  • Karma: 44
  • Offline Offline
  • Posts: 2503
  • The last shadow you'll ever see
Re: fix: aMule-CVS-20071115 doesn't update server.met on startup
« Reply #7 on: November 20, 2007, 01:19:16 PM »

ycjhi,

I have edited the log to remove your external IP address.

When I said to invert the order, I wanted to know if it is always the first address thad does not get downloaded or if it is always the same address that does not get downloaded.

Also, today's CVS has the logging I told you, you can use it to check if the address is beeing read properly. Go to preferences and enable general logging.

And for the lock of the mutex, I will check, but I have never seen this message. It is not from aMule, it is from wxWidgets. I'll check it.

Cheers!

EDIT: Look this message only happens on Mac:
./src/mac/carbon/mpthread.cpp:222:        wxLogSysError(_("Could not unlock mutex"));
./src/mac/carbon/mpthread.cpp:301:        wxLogSysError(_("Could not unlock mutex"));
./src/mac/carbon/thread.cpp:404:        wxLogSysError( wxT("Could not unlock mutex") );
./src/mac/carbon/thread.cpp:494:        wxLogSysError( wxT("Could not unlock mutex") );

I'll try to figure out what is happenning, but without a Mac I get rather limited.

EDIT2: I looked at the code and there's not much I can do without a live debug session. Anyway, it is probably a wxMac problem.
« Last Edit: November 20, 2007, 01:32:31 PM by phoenix »
Logged