Darwinbots Forum

Code center => Bugs and fixes => Topic started by: Peter on November 20, 2009, 09:41:40 AM

Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Peter on November 20, 2009, 09:41:40 AM
If I try to teleport out into a directory, bots disappear but they don´t appear in the folder.
I can still use inner teleportation.
Set security for folder on allow anything from any user.

And anytime I use the IM, DB crashes.
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Moonfisher on November 20, 2009, 12:24:31 PM
IM makes me crash too, but I'm just running xp
Haven't tryed teleporting out to a folder... so dunno about that.
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Numsgil on November 20, 2009, 12:33:46 PM
IM crashing has to do with directories.  If you run from source, you can at least figure out which directory is missing and causing the problem.

Dunno about local folder teleportation.  It used to work... If you have the interest you could go back and try older versions and see if any of them work.
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Peter on November 20, 2009, 01:29:22 PM
Tried to get DB running with ubuntu(linux), seems to work with bots transportation and IM now only crashes whenever you want a graph. (IM itself seems broken through)

If anyone got a bright idea how to stop windows 7 stopping transportation, please step forward.
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Numsgil on November 20, 2009, 05:03:34 PM
Run the program (and/or the original installer) as an administrator.  Even if your UAC is entirely turned off, there may or may not be residual problems that are fixed by running as an administrator.  If you aren't familiar with the process, right click on Darwinbots and choose "Run as administrator".
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Peter on November 20, 2009, 05:45:41 PM
Running DB as a administrator when it is teleporting seems to do the trick, thanks.
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Numsgil on November 20, 2009, 07:00:21 PM
Out of curiosity, what's your UAC set to?
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Peter on November 21, 2009, 12:47:30 PM
Default settings, the second in the list.
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Numsgil on November 21, 2009, 02:33:00 PM
Thanks.  Sort of what I thought...
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Pascal666 on November 28, 2009, 11:50:20 AM
Internet mode doesn't function because the directory bots on the ftp is empty.
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Numsgil on November 28, 2009, 10:57:29 PM
Bots get posted there as a holding pen.  It shouldn't need bots there.  It will try to download one, see that there isn't one, and abort.

Actual IM crashes are issues having to do with folders either existing or not existing, from what I can tell.  If I have some spare time in the next week or so I might try patching issues like that.  But the code is really painful to work with so no promises
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Pascal666 on November 29, 2009, 07:36:48 AM
I noticed because I was trying to patch it, and when I try to run it in visual basic it actually doesn't crash.
But I did get this out of the debug: DownloadPopFiles: scaricata dir, poi errore which means the error is after fase 1:
Quote
fase = 1
  Debug.Print "FTP session initialized.  About to get FTP download list."
  CompilePopDirlist Directory, DirList()
  Debug.Print "FTP download list completed."
 
  dirnum = CInt(val(DirList(0)))
  If dirnum = 0 Then
    DownloadPopFiles = False
 '   frmMain_Client.Inet1.Cancel
    Disconnect
    Exit Function
  End If
  I = dirnum
  While I > 0
    If DownloadFile(DirList(I), frmMain.MainDir + "\Transfers\F1\") = False Then GoTo getout
    I = I - 1
  Wend
  DownloadPopFiles = True

And since I added a msgbox(which didnt show up after the first function means that compilepopdirlist() is bugged:

Quote
Debug.Print "FTP session initialized.  About to get FTP download list."
  CompilePopDirlist Directory, DirList()
  Debug.Print "FTP download list completed."
 
  MsgBox 1

I added ^ to compilePopDirList() and got the error subscript out of range.
Which probably means the array Dim DirList(150) As String is too small.

I have changed the array size in LoadRandomOrgs and DownloadPopFiles to 999 and it seems to work, though it takes a while downloading all the files.
Since it takes a while maybe you should ban newbie names from uploading their pop files, and resetting the whole pop database once in a while.

As a quick solution I have deleted all newbie pop files on the ftp server so you should be under the current 150 file limit now.
Anybody can use it again without patching( for now ) just be patient while darwinbots needs to download all the pop files.
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Pascal666 on November 29, 2009, 07:54:57 AM
I have been testing it for five minutes and think patching is required since it uploads all the pop files constantly.
My solution for it is only to update the internet population every 30 minutes:

Code: [Select]
Function DownloadPopFiles() As Boolean
  On Error GoTo fine
  Dim DirList(999) As String
  Dim k, I, dirnum As Integer
  Dim fase As Integer
  
  DownloadPopFiles = False
  If GetTickCount - popTickCount < 1800000 Then
    DownloadPopFiles = True
    Exit Function
  End If
  popTickCount = GetTickCount
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Numsgil on November 29, 2009, 10:11:17 PM
I've fixed the crashing from pop files.  Replaced the hard coded array with a version that auto resizes itself.  They're on the head.  Also fixed the specific problem I was talking about with paths not getting created correctly and crashing (would happen if you didn't have a transfers folder created).

I'm not sure I want to hard code a 30 minute update in to it... I'll give it a bit of thought.  I'll try to release a patched version (fixing some other bugs as well).

Also, if you're interested in bug fixing the current version as you use it, I can set you up with SVN permissions so you can commit changes yourself.  I only ask that you generally try to find general solutions (eg: upping the array ounds worked, but a better (more robust) solution was redimensioning the array).
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Pascal666 on November 30, 2009, 07:24:25 AM
I agree, but I was searching for a quick solution, because I was working on other things in the client.
In stead of updating the pop files every 30 minutes you could check if a new file has been uploaded by checking the creation date if that is possible.

Actually in private I have been working on the client already; improving speed and order.
I will share my updated version when it is finished.
Title: Outbound teleports don´t work(windows 7) -Run as Admin
Post by: Numsgil on November 30, 2009, 01:37:58 PM
Send me a PM with an email address and a desired user name and password and I'll set you up with SVN privileges and you can update code yourself.  It's a pretty big pain for me to copy+paste code changes from the forum to my working copy and submit, so it would be cool if you could do it yourself as well.

If you aren't familiar with SVN I can give a sort of live walkthrough.  The hard part is setting up the GUI client and server details.  Once that's done it's really easy (GUI client will scan for changes and have you type in a description of the change).

Also, if you're feeling adventurous, the best way to fix these problems would be to either set up a separate application that does the actual syncing with the server (would just get spawned when you enter IM mode, and monitor the in/out folders for transfers).  You could write it in VB.NET/C# and some of the code might even be recyclable for DB3.  Or learn how to call in to .NET from VB6 code and use .NET for the internet operations, since it works more robustly.  The first one would probably be easier and work better.