Author Topic: Autopatcher stops  (Read 12793 times)

Sharlataans

  • Guest
Autopatcher stops
« on: December 29, 2006, 02:42:42 AM »
Hello!

I am trying out AutopatcherServer (with PostgreSql) and AutopatcherClient. I have imported about 20mb big project
into the database and try to download using AutopatcherClient.

If the client and server are located on the same computer, then all works ok. But if they are on different computers (on LAN)
or I connect through my router (and NAT), then after some 40-50 seconds the download process simply stops!
And it happens every time after roughly the same amount of time, so I can reproduce it.

But I am having difficulty of tracing down why it happens. I tried to lower MTU, it does not help. I tried to lower sleepTimer,
it does not help. If I turn on PacketFileLogger plugin, it crashes after some while in RPCMap() constructor.

Could you suggest some basic steps to find out where is the problem?

Rackle

  • Not-a-newbie
  • *
  • Posts: 23
  • Karma: 1
    • View Profile
Re: Autopatcher stops
« Reply #1 on: December 29, 2006, 07:51:03 AM »
I'm also having that problem: Unhandled exception at 0x7c91084b in Patcher.exe: 0xC0000005: Access violation writing location 0x0519fffc.  The call stack shows ntdll.dll!7c91084b().  And the debug window shows:
First-chance exception at 0x00f32574 (RakNetDebug.dll) in Patcher.exe: 0xC0000005: Access violation reading location 0x756f7464.
and 2139 times:
First-chance exception at 0x32352c36 in Patcher.exe: 0xC0000005: Access violation reading location 0x32352c36.

I have to work on another project for a short while so cannot spend time on this problem this year.

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: Autopatcher stops
« Reply #2 on: December 29, 2006, 05:41:05 PM »
I'll be looking into this myself soon enough.  You might try updating to RakNet 3.0 from source control http://www.rakkarsoft.com/raknet/forum/index.php?topic=2.0 and see if that helps.  Unfortunately I don't have any idea off the top of my head why this might be.

Sharlataans

  • Not-a-newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Autopatcher stops
« Reply #3 on: January 04, 2007, 12:16:48 PM »
I'll be looking into this myself soon enough.  You might try updating to RakNet 3.0 from source control http://www.rakkarsoft.com/raknet/forum/index.php?topic=2.0 and see if that helps.  Unfortunately I don't have any idea off the top of my head why this might be.

Hello!

I upgraded to 3.0, but unfortunately the problem stays.  :'(

What cought my attention is that files are being downloaded not one by one, but in a mix - new files are being
sent when the previous one is not finished. But may be it is some kind of buffering.

Quote
Downloading: 0. (88%) 1/4 myfile1.dll 815371b->983040b / 1246479b
->1494236b
Downloading: 0. (90%) 1/4 myfile1.dll 815371b->983040b / 1246479b
->1494236b
Downloading: 0. (92%) 1/4 myfile1.dll 815371b->983040b / 1246479b
->1494236b
Downloading: 0. (94%) 1/4 myfile1.dll 815371b->983040b / 1246479b
->1494236b
Downloading: 0. (96%) 1/4 myfile1.dll 815371b->983040b / 1246479b
->1494236b
Downloading: 0. (29%) 3/4 mylib2.dll 48306b->55808b / 1246479b->1494236b
Downloading: 0. (58%) 3/4 mylib2.dll 48306b->55808b / 1246479b->1494236b
Downloading: 0. (97%) 1/4 myfile1.dll 815371b->983040b / 1246479b
->1494236b
Downloading: 0. (99%) 1/4 myfile1.dll 815371b->983040b / 1246479b
->1494236b
Downloaded: 0. (100%) 1/4 myfile1.dll 815371b->983040b / 1246479b
->1494236b
Downloaded: 0. (100%) 2/4 config.cfg 668b->732b / 1246479b->1494236b
Downloading: 0. (88%) 3/4 mylib2.dll 48306b->55808b / 1246479b->1494236b
Downloaded: 0. (100%) 3/4 mylib2.dll 48306b->55808b / 1246479b->1494236b
Written: 0. (100%) 1/4 myfile1.dll 815371b->983040b / 1246479b->1
494236b
Written: 0. (100%) 2/4 config.cfg 668b->732b / 1246479b->1494236b
Written: 0. (100%) 3/4 mylib2.dll 48306b->55808b / 1246479b->1494236b

Anyhow I will appreciate any ideas how to fix autopatcher stopping! Thanks!

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: Autopatcher stops
« Reply #4 on: January 15, 2007, 01:59:47 AM »
Can you contact me on instant messenger at 4639385 and we can debug it.  I can't repro it here.

Sharlataans

  • Not-a-newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Autopatcher stops
« Reply #5 on: January 19, 2007, 02:31:00 AM »
Sorry, did not notice your reply earlier. Are you using AIM for messaging?

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: Autopatcher stops
« Reply #6 on: January 29, 2007, 01:19:46 PM »
ICQ

reskin

  • Not-a-newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
    • Unistellar Industries
Re: Autopatcher stops
« Reply #7 on: March 29, 2007, 10:01:11 PM »
What ever came of this issue?  I am having the same problem, it seems to work fine on a LAN but over the Internet if it tries to patch more than a MB or so it will get hung.

I took the advice of this thread and upgraded to the 3.0beta but there is a problem with the repository virtual function definition and what is actually in the distributed library file...

Quote
\dependentextensions\autopatcherserver.cpp(257) : error C2660: 'AutopatcherRepositoryInterface::GetPatches' : function does not take 3 arguments
« Last Edit: March 31, 2007, 11:44:52 AM by reskin »

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: Autopatcher stops
« Reply #8 on: March 30, 2007, 04:12:24 PM »
Sorry about that.  I fixed the virtual error.  I don't know about not completing, as it works for me.  I will be using this on a wide-scale for my MMOG in 1-2 months so if there are any bugs they'll be fixed before then.

reskin

  • Not-a-newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
    • Unistellar Industries
Re: Autopatcher stops
« Reply #9 on: March 30, 2007, 04:29:57 PM »
Thanks!  When you say that does it mean I should click on "Download Now" again or is it pending for the next version number?

Do you use postgre as well?  I have seen ways of doing this in the documentation where you handle the list of current files manually.

The GetServerDate() string returned is not NULL terminated, is that correct? 

The example AutoPatchServerTest.cpp has a printf statement which shows the gets date as %i-%i-%i-%i-%i is there something I am missing with the format of the date?  It is just a string like in postgre, right?  I added my own NULL terminator because postgre was complaining...

Quote
ERROR:  invalid input syntax for type timestamp: "2007-03-18 08:15:47.232  :>"
STATEMENT:  SELECT DISTINCT ON (filename) filename, fileLength, contentHash, createFile FROM FileVersionHistory WHERE applicationId=1 AND modificationDate > '2007-03-18 08:15:47.232         :>' ORDER BY filename, fileId DESC;
WARNING:  there is no transaction in progress

Otherwise my implimentation is straight forward from the example apps and files as-is from the most recent archive.

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: Autopatcher stops
« Reply #10 on: March 30, 2007, 04:44:56 PM »
Sorry, here's the fix

Code: [Select]
AutopatcherServer::ResultTypeAndBitstream* GetChangelistSinceDateCB(AutopatcherServer::PatcherAndPacket pap, bool *returnOutput)
{
Packet *packet = pap.packet;
AutopatcherServer *server = pap.server;

RakNet::BitStream inBitStream(packet->data, packet->length, false);
inBitStream.IgnoreBits(8);
char applicationName[512];
char lastUpdateDate[64];
stringCompressor->DecodeString(applicationName, 512, &inBitStream);
if (stringCompressor->DecodeString(lastUpdateDate, 64, &inBitStream)==false)
{


reskin

  • Not-a-newbie
  • *
  • Posts: 7
  • Karma: 0
    • View Profile
    • Unistellar Industries
Re: Autopatcher stops
« Reply #11 on: March 30, 2007, 05:43:09 PM »
Cool, that fixes the string problem, thanks!

I dunno what else to try... I am not getting a ID_AUTOPATCHER_FINISHED and watching the overall progress it gets to 100% and then stops... not getting any errors returned either.  This is output generated by your sample AutopatcherClient and AutopatcherServer...

Quote
Written: 0. (100%) 1777/1784 Textures/Weapons/weapon8.dds 16461b->32896b / 10298
3149b->138630580b
Written: 0. (100%) 1778/1784 Textures/Weapons/weapon9.dds 17586b->32896b / 10298
3149b->138630580b
Written: 0. (100%) 1779/1784 Textures/World2a1.dds 68441b->65664b / 102983149b->
138630580b
Written: 0. (100%) 1780/1784 Unistellar Industries.url 162b->144b / 102983149b->
138630580b
Written: 0. (100%) 1781/1784 universe.dat 31157b->98387b / 102983149b->138630580
b
Written: 0. (100%) 1782/1784 Viewscreen.exe 1074158b->1261056b / 102983149b->138
630580b
Written: 0. (100%) 1783/1784 Viewscreen64.exe 1357701b->1583104b / 102983149b->1
38630580b

I use one rakPeer interface for everything, there should be no problem with that (plugin limit, etc)?  I am using low priority with a 30ms sleep time and MTU of 10.

Do you remember what bone-head thing the originator of this thread did?  Did you talk to him over ICQ?

One of the things I noticed when converting from DirectPlay to RakNet is the DCOM and CoInitialize is not necessary, correct?

Have you heard of any issues like if the SQL database is corrupted?  Did the tables change at all from 2.52 to 3.0 beta?
« Last Edit: March 30, 2007, 09:30:28 PM by reskin »

Sharlataans

  • Not-a-newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: Autopatcher stops
« Reply #12 on: March 31, 2007, 04:32:45 AM »
Hello!

I became busy with other things now, but I am still very interested in fixing this problem. I will be
more free in 2-3 weeks and then I can invest more time in it.

In the meantime I can only do some tests.

Rak'kar

  • Administrator
  • Hero Member
  • *****
  • Posts: 6895
  • Karma: 291
    • View Profile
    • RakNet
Re: Autopatcher stops
« Reply #13 on: March 31, 2007, 11:29:23 AM »
* Edit *

I believe this is fixed now.  The update is in source control.
« Last Edit: April 01, 2007, 12:54:27 AM by Rak'kar »

SpaceDude

  • Not-a-newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Autopatcher stops
« Reply #14 on: April 16, 2007, 04:55:44 PM »
* Edit *

I believe this is fixed now.  The update is in source control.

I downloaded the Zip version today (http://www.rakkarsoft.com/raknet/downloads/RakNet30Beta.zip) and I'm still having the exact same problem as the original poster, using the postgre server.

The autopatcher works fine when running on a single computer. But I tried running it across my LAN and after about 10 seconds the client stops downloading and then a while later the server reports ID_CONNECTION_LOST. I don't get any crashes or anything like that... Could it be that some packets are being sent unreliably when they should be sent reliably? That's just a guess but I'll try spend some more time debugging it when I get the time.