Closed GoogleCodeExporter closed 9 years ago
Also, have a look at diff between 1.0.5 and 1.0.6
Original comment by korn...@gmail.com
on 16 Jul 2013 at 2:46
Original comment by Kai.Saerthen.Darker
on 16 Jul 2013 at 5:24
Print timer only once in a while, not every tick.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 4:13
Done printing once in 50 ticks.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 4:23
Print DNS work.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 4:24
Added printing, but need to add pointer to tell instances apart.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 6:17
Addresses of instances printed.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 10:08
Clarify Net message and add logging of Done/Error signals.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 10:18
To both Net and NetDNS.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 10:18
Did it.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 11:45
Left:
* turn on/off DNS lookup in config;
* set timeouts for DNS lookup and get/post separately in config.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 11:46
MainCore and Statistics create Net instances.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 11:49
Pass Net instance from MainCore to Statistics.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 1:33
Did it.
Create Net constructor:
* turn on/off DNS lookup;
* timeouts for DNS and get/post separately.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 1:45
Net constructor now accepts a flag to use DNS lookup or not.
I won't do separate timeout configuration, because that breaks the structure
too much.
Now introduce the following config options:
* NetDNSEnabled;
* NetTimeout.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 1:56
Did it.
Time to build 1.0.7 and describe NetDNSEnabled and NetTimeout options.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 2:22
Build OGS Mahjong 1.0.7 in Issue 671 and then assign this issue to Kai for
further investigation.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 2:27
Original comment by korn...@gmail.com
on 18 Jul 2013 at 2:27
The 1.0.6 with Net logging for Windows is available at:
http://sourceforge.net/projects/osrpgcreation/files/Mahjong/dev/windows32.7z
* game.cfg:
** NetDNSEnabled = 0|1 (enables or disables the use of c-ares for DNS lookup);
** NetTimeout = N (sets N/2 timeout for DNS lookup and N/2 timeout for
get/post).
Original comment by korn...@gmail.com
on 18 Jul 2013 at 4:00
Original comment by korn...@gmail.com
on 18 Jul 2013 at 4:01
Crashes for me under Windows at setScene(Room).
Original comment by korn...@gmail.com
on 18 Jul 2013 at 4:10
Right before the first NetDNSLookup print.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 4:11
Add prints to each step.
Original comment by korn...@gmail.com
on 18 Jul 2013 at 4:17
Btw, I can also try to see Net and NetDNS tests right under Windows in VM.
Original comment by korn...@gmail.com
on 19 Jul 2013 at 3:47
Test fails due to added MJIN_LOG: it requires Log being created beforehand.
Original comment by korn...@gmail.com
on 19 Jul 2013 at 3:51
Fixed it. Fails under Windows due to uninitialized c-ares. Investigate.
Original comment by korn...@gmail.com
on 19 Jul 2013 at 3:55
That's because init happens in mjin::Application which is unnecessary for the
test.
Introduce NetDNSLookup::initLibrary and use it in mjin::Application and the
test.
Original comment by korn...@gmail.com
on 19 Jul 2013 at 5:03
Still crashes under Windows. Right before logging.
Original comment by korn...@gmail.com
on 19 Jul 2013 at 5:19
It's not logging, looks like it's address printing with MJIN_STR!
Original comment by korn...@gmail.com
on 19 Jul 2013 at 6:13
Fixed it with '%p' instead of '%llu'.
DNS works fine under both Windows and Linux now.
testNet doesn't work. Fix it.
Original comment by korn...@gmail.com
on 19 Jul 2013 at 6:24
Somehow testNet runs STAGE_GET_VALID_HOST two times. And the second one fails.
It should run it second time at all.
Original comment by korn...@gmail.com
on 20 Jul 2013 at 12:37
That's because timeout = 0 and it fails right away. Timeout = 0 should actually
mean 'indefinite'.
Original comment by korn...@gmail.com
on 20 Jul 2013 at 12:47
Did it. Now it stops at SLOW_HOST stage.
Original comment by korn...@gmail.com
on 20 Jul 2013 at 12:59
DNS reports 'Domain name not found' for IP address. Hm.
Original comment by korn...@gmail.com
on 20 Jul 2013 at 1:04
* Why isn't error going to Net?
* Do not resolve IP addresses.
Original comment by korn...@gmail.com
on 20 Jul 2013 at 1:07
It's not going, because we start to use NetDNSLookup before the tick ends.
Figure out how to fix the overlap.
Original comment by korn...@gmail.com
on 20 Jul 2013 at 1:44
Try just to move the things located below ares_process higher before the call?
Original comment by korn...@gmail.com
on 22 Jul 2013 at 5:14
Did it. Looks like dsnCallback is simply never called when we try to resolve IP
address by name, so testNet simply hangs.
Original comment by korn...@gmail.com
on 22 Jul 2013 at 5:26
Try to use localhost instead of my own IP address.
Original comment by korn...@gmail.com
on 22 Jul 2013 at 6:07
The problem is actually in port specification. IP is resolved OK!
Original comment by korn...@gmail.com
on 22 Jul 2013 at 6:20
Well, then simply use bare IP at 80 port.
Original comment by korn...@gmail.com
on 22 Jul 2013 at 7:53
c-ares fails for several instances.
Original comment by korn...@gmail.com
on 22 Jul 2013 at 9:52
I don't know the reason...
Original comment by korn...@gmail.com
on 22 Jul 2013 at 9:54
Try to run tests under Windows.
Original comment by korn...@gmail.com
on 22 Jul 2013 at 10:39
testNet crashes under Windows at the same stage as under Linux.
Rebuild the game and retry it.
Original comment by korn...@gmail.com
on 22 Jul 2013 at 10:52
It runs! Great. Now build a package.
Original comment by korn...@gmail.com
on 22 Jul 2013 at 12:34
Uploaded as
http://sourceforge.net/projects/osrpgcreation/files/Mahjong/dev/ogs-mahjong-1.0.
6-windows32-net-logging.7z
Original comment by korn...@gmail.com
on 22 Jul 2013 at 3:14
Here's the log of this 1.0.6.
As i said before, 1.0.5 works fine.
Original comment by Kai.Saerthen.Darker
on 22 Jul 2013 at 5:54
Attachments:
Try to increase timeout with NetTimeout and turn DNS lookup on/off with
NetDNSEnabled.
Original comment by korn...@gmail.com
on 23 Jul 2013 at 2:14
NetDNSEnabled = 0
Solves the problem.
Setting bigger values for NetTimeout does not.
Still need to find out why it's not able to access DNS, but existing workaround
is a half way to fixing (or localizing) the problem.
Original comment by Kai.Saerthen.Darker
on 24 Jul 2013 at 7:14
Original issue reported on code.google.com by
korn...@gmail.com
on 16 Jul 2013 at 2:30