The Ultimate Site of Worms Armageddon

Worms: Armageddon => General discussion => Topic started by: CyberShadow on September 20, 2015, 10:44 PM

Title: Update your WormNAT2!
Post by: CyberShadow on September 20, 2015, 10:44 PM
Hi wkWormNAT2 users,

Old versions of WormNAT2 have a bug which causes random desyncs/disconnects.

This can happen even when you're not hosting!

This is fixed in the latest version (v2.3). If you're using WormNAT2 (i.e. you have wkWormNAT2.dll in your W:A directory and have loading WormKit modules enabled), please download the latest version:

http://worms.thecybershadow.net/wormkit/wkWormNAT2.zip

Just drop the two files in your W:A directory and overwrite the old ones.

As an added incentive to update, I decided to remove the nag message that showed up on start-up. You might occasionally get a reminder in the lobby instead.

Users of old versions will see a message in the lobby when hosting games. Be warned, old versions will stop working completely on January 1, 2016.

Snooper authors who added WormNAT2 functionality to their snoopers:

The official version of WormNAT2 now implements the snooper protocol used by Wheat Snooper, so you no longer have to ship custom versions of the DLL. Check the source code of WormNAT2 (https://github.com/CyberShadow/WormKit/blob/e731da30b15fa3f5ebcc004107d95a3b603d70e7/WormNAT2/wkWormNAT2.dpr#L469-L502) and Wheat Snooper for details. The gist is: open a control connection to the HostingProxy server by connecting to proxy.wormnet.net:9301, read a port number (16 bit LE integer). Host the game at proxy.wormnet.net:PORT. Run WA.exe with the parameters: /wkargs /wnat2 X-Y-Z, where X is your snooper's PID, Y is the socket handle to the HostingProxy connection, Z is an event handle. WormNAT2 will duplicate Y and Z into its own process, take over the control connection and call SetEvent(Z) to inform your snooper that the game is hosted and it can release its connection handle (Y).
Title: Re: Update your WormNAT2!
Post by: Hurz on September 20, 2015, 10:59 PM
awesome, thanks :)
Title: Re: Update your WormNAT2!
Post by: Nivman on September 20, 2015, 11:25 PM
seems like its not working for me
Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 20, 2015, 11:27 PM
Connectivity may be spotty for an hour while DNS changes propagate. Post here if any problems persist for longer than that.
Title: Re: Update your WormNAT2!
Post by: Nivman on September 20, 2015, 11:31 PM
it works now (=
thanks for the update
Title: Re: Update your WormNAT2!
Post by: Sensei on September 20, 2015, 11:35 PM
Didn't really understand what's this fixing at all, rarely had troubles with any kind of disconnections.
But ty Cyber, I updated :)
Title: Re: Update your WormNAT2!
Post by: Tomi on September 21, 2015, 06:34 AM
Is there any advantage of this? The old way was working well too. Am i right that now anyone have to have that dll to use wnat?
Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 21, 2015, 06:38 AM
Is there any advantage of this? The old way was working well too. Am i right that now anyone have to have that dll to use wnat?
Not sure what you mean, but nothing changed in how you have to use WormNAT2.
Title: Re: Update your WormNAT2!
Post by: Tomi on September 21, 2015, 04:00 PM
ok, nvm..
Title: Re: Update your WormNAT2!
Post by: XV2 on September 21, 2015, 05:18 PM
Hello

Files changed the same error

(http://images70.fotosik.pl/1195/e95b97010e31c517med.jpg) (http://www.fotosik.pl/zdjecie/e95b97010e31c517)
Title: Re: Update your WormNAT2!
Post by: Hurz on September 21, 2015, 09:18 PM
Is there any advantage of this? The old way was working well too. Am i right that now anyone have to have that dll to use wnat?

never experienced skipped packet desynchs? will be glad if this will be erased now.
Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 21, 2015, 10:16 PM
Hello

Files changed the same error

(http://images70.fotosik.pl/1195/e95b97010e31c517med.jpg) (http://www.fotosik.pl/zdjecie/e95b97010e31c517)

Well, apparently they aren't changed then! Make sure your snooper isn't overwriting your wkWormNAT2.dll.

Another way to check is to rigth-click on the file, select Properties, and on the Details tab, the "Product version" field should say 2.3 (or higher).
Title: Re: Update your WormNAT2!
Post by: Sensei on September 22, 2015, 12:01 AM
Since I upgraded, WormKit started to acting weird. Icon is not even there anymore, like it got erased. Even snooper sending me some error messages before hosting the game.

Btw, 2/3 games I hosted disconected after aproximately 10 minutes. I'm hosting every night, and never had problems until today.

Basically, this update screwed me up somehow. Is it possible to downgrade on older version?
Ty.
Title: Re: Update your WormNAT2!
Post by: Hurz on September 22, 2015, 12:20 AM
i saved the old madchook and wormnat2 dlls just incase update wouldnt work, but so far its just fine.
Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 22, 2015, 02:22 AM
Since I upgraded, WormKit started to acting weird. Icon is not even there anymore, like it got erased.

Which icon? Are you still using a version of W:A so old that it doesn't have built-in WormKit support? Either way I can't think of any reason that would be related. How did you install it?

Even snooper sending me some error messages before hosting the game.
Unfortunately I can't do anything about this.

The way snooper authors added WormNAT2 support was to modify the module's code and use my WormNAT2 server without my permission. I have not been happy about this, but I've let it slide because ultimately it's a net benefit to the community. However, what you are seeing is the consequence of their choices - I can't update things on my side without possibly breaking things for unofficial WormNAT2 clients. The snooper API is not something I came up with, I adapted something that was already out there, and even though it worked in our tests, it takes two parties to create a stable and working API.

Btw, 2/3 games I hosted disconected after aproximately 10 minutes. I'm hosting every night, and never had problems until today.
Can you post some replays?

Basically, this update screwed me up somehow. Is it possible to downgrade on older version?
Ty.
You can get the older version from here (http://worms.thecybershadow.net/wormkit/wkWormNAT2-2015-07-27.zip), but again, this version will stop working in January. It would be better to fix whatever problems you have with the new one.
Title: Re: Update your WormNAT2!
Post by: TheWalrus on September 22, 2015, 02:49 AM
Can you post some replays?
Here they are:
Title: Re: Update your WormNAT2!
Post by: Sensei on September 22, 2015, 03:37 AM
About snoopper error msg - it's not actually error, but some kind of a warning. Like: "you hosted too many games recently" (still able to host, but that msg is just annoying). I guess snooper creators would do something about that in next upgrades. We'll be patient until then.

About replays (thx Walrus, btw) - maybe it's not wormnat2 thing and problem is just my modem. But highly doubt that, cause it happened 2 times in 15 mins. Before update I almost never got disconnected.

About worms version and built-in wormkit support - don't know man..it's like you talking to the wall atm :) Gonna try fix this, if I found solution, others experiencing similar problem (if there are any) will be informed.

EDIT: using 3.7.2.1. if that was your question.
Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 22, 2015, 03:40 AM
Haven't looked at the replays yet, but...

About worms version and built-in wormkit support - don't know man..it's like you talking to the wall atm :) Gonna try fix this, if I found solution, others experiencing similar problem (if there are any) will be informed.

EDIT: using 3.7.2.1. if that was your question.

Unless you use any modules that MUST be loaded before the game starts, you can just delete your WormKit.exe and instead enable "Load WormKit modules" in the game's advanced options.
Title: Re: Update your WormNAT2!
Post by: Sensei on September 22, 2015, 03:55 AM
Unless you use any modules that MUST be loaded before the game starts, you can just delete your WormKit.exe and instead enable "Load WormKit modules" in the game's advanced options.

Actually I had WormKit and W:A icon before. After upgrading - WormKit.exe just deleted on its own. On the other hand,moduls working like they supposed to. So basically, only weird thing are that disconnections we experienced tonight. Like i said, highly doubt it was modem problem.

Hm.. just experienced one more. Can't open replays at all anymore. Trying to put W:A to open .wagame files but nothing happens.

Title: Re: Update your WormNAT2!
Post by: Tomi on September 22, 2015, 06:07 AM
Is there any advantage of this? The old way was working well too. Am i right that now anyone have to have that dll to use wnat?

never experienced skipped packet desynchs? will be glad if this will be erased now.
I never really. I could even host with my dormitory net using some japanese free vpn. And I didn't get wrong feedbacks about the wormnat2 implementation in great snooper.

Quote
The way snooper authors added WormNAT2 support was to modify the module's code and use my WormNAT2 server without my permission. I have not been happy about this, but I've let it slide because ultimately it's a net benefit to the community. However, what you are seeing is the consequence of their choices - I can't update things on my side without possibly breaking things for unofficial WormNAT2 clients. The snooper API is not something I came up with, I adapted something that was already out there, and even though it worked in our tests, it takes two parties to create a stable and working API.
Oh man.. I wish I would still have the logs of our long-long conversations we had, but I guess you can't even remember me.  I remember that I asked for your permissions under the whole development of my snooper. Only one man have done what you said here. Don't get me wrong here, this just feels bad a little coz I am that type of man.

About snoopper error msg - it's not actually error, but some kind of a warning. Like: "you hosted too many games recently" (still able to host, but that msg is just annoying). I guess snooper creators would do something about that in next upgrades. We'll be patient until then.
Sorry that's my fault of lazyness. That can be that error as the error message says, but it can be communication fail too.
Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 22, 2015, 06:11 AM
Sorry Tomi, I was not talking about you, but about Lookias, I just didn't want to say out loud any names :)
Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 22, 2015, 01:59 PM
OK, looked at those replays.

In the first one, you simply timed out, on the control connection and all players' connections to you. Now, the new HostingProxy might be too aggressive in detecting timeouts - it is a double-edged sword, but it might have simply been a coincidence. Let me know if it happens again.

In the second one, the proxy crashed due to a bug that I've already fixed today. Sorry about that.

Unless you use any modules that MUST be loaded before the game starts, you can just delete your WormKit.exe and instead enable "Load WormKit modules" in the game's advanced options.

Actually I had WormKit and W:A icon before. After upgrading - WormKit.exe just deleted on its own. On the other hand,moduls working like they supposed to. So basically, only weird thing are that disconnections we experienced tonight. Like i said, highly doubt it was modem problem.

Hm.. just experienced one more. Can't open replays at all anymore. Trying to put W:A to open .wagame files but nothing happens.

I have no idea what's going on over there.

The new zip file just contains two DLLs, installing which would definitely not affect things like your WormKit icon and whether you can open replays. You have something else going on.
Title: Re: Update your WormNAT2!
Post by: Kaleu on September 22, 2015, 02:09 PM
I have huge lags (fps decrease) everytime I shot the rope the first time and a few other turns, It's impossible to play roping games now, I feel like this module is spying on me.  :-X
I will use the old wormnat2 for now.
Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 22, 2015, 02:12 PM
Pretty sure that's not related :) This module only modifies network code. You can download the older version from higher in this thread and test. In theory it might be due to some incompatibility with an antivirus/firewall, but I've never heard of such a problem.
Title: Re: Update your WormNAT2!
Post by: Sensei on September 22, 2015, 02:25 PM
The new zip file just contains two DLLs, installing which would definitely not affect things like your WormKit icon and whether you can open replays. You have something else going on.

SiD helped me with replays thing just 20 mins ago.
If someone experiencing "replays won't open problem" you're gonna solve it by going in W:A settings and checking box with "auto associations".


Cyber, ty for checking out that diconnections we had. But agree with Kaleu there, I also downgraded wormnat2 last night. Seems more stable, at least for my pc.
Title: Re: Update your WormNAT2!
Post by: Mega`Adnan on September 22, 2015, 02:28 PM
So, can this Wormnat host games by snooper without creating packets file?
Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 22, 2015, 02:37 PM
But agree with Kaleu there, I also downgraded wormnat2 last night. Seems more stable, at least for my pc.

Please, we need to test the new version, find bugs and fix them (assuming there are any!). If we are afraid of moving away from old versions, we will never make progress. This is especially important because many people do not post on TUS and will never see this thread, and I will never find out or be able to debug and fix any problems they will run into. The old versions will stop working in January, which is a fair way off, but it's best if we fix all problems as soon as possible.

BTW, the disconnections would happen with any version of the WormNAT2 module (because they all use the same server now)... of course the goal is to not have any.
So, can this Wormnat host games by snooper without creating packets file?
Yes in theory, but it depends on your snooper as well. Ask your snooper author.
Title: Re: Update your WormNAT2!
Post by: spleen17 on September 22, 2015, 02:39 PM
I've had no problems at all with the new version. Thanks CyberShadow for the update.
Title: Re: Update your WormNAT2!
Post by: Sensei on September 22, 2015, 02:43 PM
But agree with Kaleu there, I also downgraded wormnat2 last night. Seems more stable, at least for my pc.

Please, we need to test the new version, find bugs and fix them (assuming there are any!). If we are afraid of moving away from old versions, we will never make progress. This is especially important because many people do not post on TUS and will never see this thread, and I will never find out or be able to debug and fix any problems they will run into. The old versions will stop working in January, which is a fair way off, but it's best if we fix all problems as soon as possible.

Ye, you have point there. I'll upgrade again and let you know about any weird stuff happening.
Title: Re: Update your WormNAT2!
Post by: Hurz on September 22, 2015, 09:47 PM
I've had no problems at all with the new version. Thanks CyberShadow for the update.
Title: Re: Update your WormNAT2!
Post by: Sensei on September 22, 2015, 11:57 PM
Ok Cyber, I upgraded it again so you can find bugs related to this new version of wormnat2.

Earlier played Big RR with KungPow and in the middle of the game got chat message "skipped packet" but there was no any disconnections.. (search replay @7:39)

Then it happened again few games after, while we were playing Aerial. Only this time I dropped after message.
(search replay @8:27)

Title: Re: Update your WormNAT2!
Post by: CyberShadow on September 23, 2015, 12:53 AM
`KungPow` still has wkPackets.dll, he needs to delete it (whether he uses WormNAT2 or not, but if he does, he needs to update).
Title: Re: Update your WormNAT2!
Post by: philie on September 23, 2015, 06:14 PM
i'm using wheat with new wormnat: except for a few error messages everything seems to work fine.
i just press enter 3 times before hosting xD
Title: Re: Update your WormNAT2!
Post by: Almog on November 06, 2015, 07:44 PM
hey I'm getting that error:
[attachment=1]
Title: Re: Update your WormNAT2!
Post by: Almog on November 06, 2015, 07:48 PM
hey I'm getting that error:
[attachment=1]

well. I disabled workmit modules from W:A advanced options, and that error stopped (obviously), but for some reason I can still host with Great Snopper :o
Title: Re: Update your WormNAT2!
Post by: TheWalrus on November 06, 2015, 07:48 PM
hey I'm getting that error:
[attachment=1]
Same, just been ignoring it though because I can still host.  You having any problems hosting?
Title: Re: Update your WormNAT2!
Post by: aik on November 07, 2015, 12:44 PM
hey I'm getting that error:
[attachment=1]
Same, just been ignoring it though because I can still host.  You having any problems hosting?

Snoopers mostly come with "build-in" WormsNAT2. So your local WKs aren't needed, when hosting via snooper.
Title: Re: Update your WormNAT2!
Post by: Tomi on November 07, 2015, 01:41 PM
hey I'm getting that error:
[attachment=1]
Same, just been ignoring it though because I can still host.  You having any problems hosting?

Snoopers mostly come with "build-in" WormsNAT2. So your local WKs aren't needed, when hosting via snooper.
Yes, Great Snooper doesn't use any WormKit dll.. it has it's own Hoster.exe, which has the same code as Wormnat.dll, but in other programming language, and it is extended to make Great Snooper able to close the game on WormNet when it is started.
Title: Re: Update your WormNAT2!
Post by: bath on November 07, 2015, 08:01 PM
hey I'm getting that error:

# for hex 0x7e / decimal 126 :
  ERROR_MOD_NOT_FOUND                                           winerror.h
# The specified module could not be found.

Means you're missing a specific DLL that the module depends on. Visual C++ runtime maybe.
Title: Re: Update your WormNAT2!
Post by: StepS on November 08, 2015, 06:51 PM
Means you're missing a specific DLL that the module depends on. Visual C++ runtime maybe.
It's likely wkPackets.dll which was required by older versions, but is now out of date and causes problems if present.
If you're using The Wheat Snooper to host, you must update to 2.9.3 (https://www.tus-wa.com/forums/worms-armageddon/new-the-wheat-snooper-2-9-3-community-build-24418/), else it will keep trying to downgrade the module and cause you issues, such as skipped packets. Also, older versions will stop working after January 1st, 2016.