Server Help

Bot Questions - awarp.dll

Anonymous - Sat Mar 12, 2005 8:55 pm
Post subject: awarp.dll
hey some reason in my zone awarp.dll was working fine and it just stopped working for no reason, i tried to load a fersh new one and all and still dosnt work why?
Solo Ace - Sat Mar 12, 2005 9:25 pm
Post subject:
Giving at least some details about the problem would make it easier to find the cause of it, post some more details like settings, a link to the dll, error messages, whatever.
CypherJF - Sat Mar 12, 2005 9:30 pm
Post subject:
Well along with this, I know both TT and I have had this issue; so it's not only I. But over time Merv stops yoinking antiwarp. I've talked to Catid about it - he hasn't found a solution becuase it doesn't always happen. The only way to fix it, is by resetting the machine. icon_sad.gif ... Anyone else have this issue?

Like it'll work for a month or so of yoinking awarp, in both flag.dll, and awarp.dll - then one day just stop working.
Smong - Sun Mar 13, 2005 4:22 am
Post subject:
If it works for about a month it could be a timer problem.
Cerium - Sun Mar 13, 2005 5:33 am
Post subject:
Doesnt getTickCount() start returning negative values once the machines been on for longer than 24 days?
Maverick - Sun Mar 13, 2005 5:55 am
Post subject:
I have the same problem with my duel bot. It seems to idle after some time. (It stops warping people to the boxes)
However, it can be easily restored by doing !help on the bot icon_smile.gif

Cerium, you should test that theory icon_wink.gif
Solo Ace - Sun Mar 13, 2005 5:59 am
Post subject:
It probably does, I think Subgame became very slow after ~ a month because of a negative value returned by GetTickCount().
Maverick - Sun Mar 13, 2005 6:07 am
Post subject:
isn't getTickCount() a mervbot feature?
Solo Ace - Sun Mar 13, 2005 6:19 am
Post subject:
No.

Header:
Declared in Winbase.h; include Windows.h.

Library:
Link to Kernel32.lib.

DLL:
Requires Kernel32.dll.

MSDN wrote:
Remarks
The elapsed time is stored as a DWORD value. Therefore, the time will wrap around to zero if the system is run continuously for 49.7 days.


Subgame's WhatsNew.txt wrote:
----------------------------- version 1.34.13a --------------------------------
Fixed extreme lagging bug when subgame was stated when GetTickCount() returned
negative values (Windows has been running without rebooting 25 days)

Maverick - Sun Mar 13, 2005 6:22 am
Post subject:
once again ... crappy windows :/
Cerium - Sun Mar 13, 2005 7:39 am
Post subject:
I <3 System.currentTimeMillis()

You guys should find/post/use the C equivilant =)
D1st0rt - Sun Mar 13, 2005 11:28 am
Post subject:
you mean time() from time.h?

http://cplusplus.com/ref/ctime/time.html
CypherJF - Sun Mar 13, 2005 11:47 am
Post subject:
Hm, if they had to fix it from returning negative numbers; yet MSDN says it wouldn't... Which one do we believe icon_wink.gif... Anyone have a machine thats been running for more than 49.7 days? lol...
D1st0rt - Sun Mar 13, 2005 11:54 am
Post subject:
Wait, aren't DWORD's unsigned? How could it be negative then?
Cyan~Fire - Sun Mar 13, 2005 12:09 pm
Post subject:
Shhhh d1s, you weren't supposed to notice that!

I dunno, probably some crappy subgame type casting problem.
CypherJF - Sun Mar 13, 2005 6:01 pm
Post subject:
GetTickCount() is returning a negative value:

sendPrivate(p, (String)GetTickCount());

returned:

OF-Main-Bo> -1951598312
Solo Ace - Sun Mar 13, 2005 6:05 pm
Post subject:
Oh! So your system's uptime is -5 days, -22 hours, -38 minutes and -32 seconds!
Anonymous - Sun Mar 13, 2005 6:05 pm
Post subject:
Can anyone whip up a plugin or sumit that fixes?
CypherJF - Sun Mar 13, 2005 6:07 pm
Post subject:
Guess so! So, how do we come up w/ a fix, other than rebooting the machine.

edit: according to a microsoft tool, the uptime of the server has been 27 days.
D1st0rt - Sun Mar 13, 2005 8:07 pm
Post subject:
how about just take the absolute value?
Cyan~Fire - Sun Mar 13, 2005 8:17 pm
Post subject:
That's a problem with String::String(Uint32). I'll talk to catid about it when I see him on IM next.
Cerium - Sun Mar 13, 2005 8:28 pm
Post subject:
Absolute value wouldnt work. Itd go up to ~25 days, then start coming back down to 0.

The real problem with this, is even when the problem is 'fixed', after 47 days the problem will resurface =(

You should start making use of time(), only find an alternate that returns the current time in milliseconds.
Bak - Sun Mar 13, 2005 9:08 pm
Post subject:
your variable is overflowing... 24.8551 days = 2^31 milliseconds

use an unsigned variable and you'll double that... store it as centiseconds and you get 10 times... deciseconds and you get 100 times...
CypherJF - Sun Mar 13, 2005 10:33 pm
Post subject:
Well, why does this only affect awarp though?
Bak - Sun Mar 13, 2005 11:05 pm
Post subject:
it probably affects the cycling of the players when in spec... and therefore will prevent antiwarp from being detected properly
Anonymous - Mon Mar 14, 2005 8:03 am
Post subject:
SSCC just had a recycle seem that the plug will break every 27 days, can anyone fix this problem and upload a new one, or is there a fixed plugin out there?
Night_Fox - Mon Mar 14, 2005 9:25 am
Post subject:
Its that the reasons way it goes down?
CypherJF - Mon Mar 14, 2005 10:51 am
Post subject:
I brought it to TestTubes attention that the awarp system wasn't working on SSCC. I had previous discussions with him prior to this, when we were on SSCX - he told me the only solution he found was to reset the machine.

So far, that seems to be the ONLY solution presented at this time..
CypherJF - Mon Mar 14, 2005 11:41 am
Post subject:
Bak wrote:
it probably affects the cycling of the players when in spec... and therefore will prevent antiwarp from being detected properly


So in host.cpp:

void Host::spectateNext() {...

Uint32 time = getTime(); // GetTickCount essentially...

... }

void Host::spectate(Player *p) {...

Do you think changing Uint32 to DWORDs, in general?
Bak - Mon Mar 14, 2005 2:38 pm
Post subject:
DWORD = unsigned long = Uint32

I don't see how it would do it every 24 days though... the functions are all using unsigned so the wrap around would occur 49 days in. The problem must be somewhere else.

Something I found out that everyone else probably knows already is you need Misc:NoisySpectator=1 in MERVBot.ini for the bot to cycle when in spec, and it only cycles people whose packets it hasn't gotten in a while (so if everyone is close to one another it won't cycle.
CypherJF - Mon Mar 14, 2005 4:15 pm
Post subject:
NoisySpectator is set to 1.
CypherJF - Wed Mar 16, 2005 12:36 am
Post subject:
Any other comments, thoughts, feed back.

has anyone really taken a few spare minutes to look around to see if they find the issue?
myke - Wed Mar 16, 2005 1:26 am
Post subject:
send me the source and i will but i doubt i'll find anything lol
CypherJF - Wed Mar 16, 2005 10:29 am
Post subject:
you can download the src yourself :X ... it'd be the merv core, ya know.
Cyan~Fire - Wed Mar 16, 2005 12:12 pm
Post subject:
The source to awarp.dll?
CypherJF - Wed Mar 16, 2005 3:26 pm
Post subject:
Well considering it affects both awarp.dll and the awarp checking in the flag.dll, so i know it doesnt apply to any particular plugin.
Cyan~Fire - Wed Mar 16, 2005 5:50 pm
Post subject:
Not a particular plugin, but possibly a particular method.
CypherJF - Wed Mar 16, 2005 8:04 pm
Post subject:
I doubt it, but here ya go:

http://explody.ssihosting.com/merv/awarp/awarp.zip

edit: that doesn't include src. hah. here it was slightly modified by me to turn on a LVZ a looooooong time ago
CypherJF - Wed Mar 16, 2005 8:20 pm
Post subject:
nm this
ShortyMatt - Wed Mar 16, 2005 11:18 pm
Post subject:
btw, you guys still using visual studio to make the codes for the plugins?
Cyan~Fire - Thu Mar 17, 2005 6:24 am
Post subject:
Yes. But it's not necessary. AFAIK, I've patched the src to work with Dev-C++.
D1st0rt - Thu Mar 17, 2005 6:23 pm
Post subject:
I use dev-cpp now
Anonymous - Fri Mar 18, 2005 8:07 am
Post subject:
Can anyone fix this error?
Solo Ace - Fri Mar 18, 2005 10:01 am
Post subject:
What's the actual problem and where is it?
I'm willing to fix it if found already, if not, I can probably try.
CypherJF - Fri Mar 18, 2005 2:41 pm
Post subject:
I don't think anyone knows off the top of their heads...
CypherJF - Sat Mar 26, 2005 5:06 pm
Post subject:
Any work/discovery?
Solo Ace - Sat Mar 26, 2005 5:13 pm
Post subject:
Not me! sa_tongue.gif
Cyan~Fire - Sat Mar 26, 2005 6:26 pm
Post subject:
catid wrote:
3/23/2005 17:10:26 imma look at that later tonight

CypherJF - Sat Mar 26, 2005 7:14 pm
Post subject:
rotfl riiight icon_wink.gif
Cyan~Fire - Sun Mar 27, 2005 12:39 am
Post subject:
Well, it's not as if I said to him "There's a problem, fix it." I told him what function the problem is in, what the problem is, and how to fix it.
Bak - Sun Mar 27, 2005 2:28 pm
Post subject:
Quote:
and how to fix it


so how would you fix the problem again?
Solo Ace - Mon Mar 28, 2005 12:00 pm
Post subject:
Cyan, tell us how to fix it, oh great leader.
Cyan~Fire - Mon Mar 28, 2005 2:56 pm
Post subject:
Bah.

Code: Show/Hide
void Host::spectateNext()
{
//...

   if (pp->ship != SHIP_Spectator && botInfo.db->noisySpectator)
   {
//      if (time - pp->lastPositionUpdate > 100)
      if (time - pp->lastPositionUpdate > 100 || time - pp->lastPositionUpdate < 0)
//      if (time - lastSpec > 20)
      if (time - lastSpec > 20 || time - lastSpec < 0)
      {   // Request position if we've lost him
         pp->lastPositionUpdate = time;

         spectate(pp);
      }
   }
//...
}

All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group