Author Topic: Duh, IM graph error under Wine/Linux OPEN  (Read 4394 times)

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« on: September 20, 2007, 06:59:52 PM »
I know, I know, it would be too much to wish the VB branch worked flawlessly under Linux.

Actually, it does, but for the Internet Mode. The 43e - 43j versions throw an 'ActiveX error: could not create object'  when they update the internet population graphs. Normal graphs don't throw any error, nor does 43d -tho it drops the connection all the time-,

I still remember a bit from my VB days. Does the new graph use a control that wasn't being used before? I could look for a missing or better dll if I know what it needs.

Otherwise, I guess I'll need a hardcoded workaround, like a text mode population statistic or an option to disable the graph.

Or a Gambas port.  
« Last Edit: October 05, 2007, 12:30:26 PM by EricL »
Sometimes you win, and sometimes you lose...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #1 on: September 20, 2007, 08:04:41 PM »
The data in the internet mode population graph comes from "population" files passed up and downloaded from the FTP server.  Each sim uploads their file, representing the organisms they have and then downloads others from the other sims.  The issue you are seeing is likely a consequence of the file system handling code I use in the graph to create and read these files, probably when the code declares a varaible of type FileSystemObject.   I'm not using anything special, no add-in object or special ActiveX control.  Just the stuff that comes with the VB runtime, but I suspect this is the issue.
Many beers....

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #2 on: September 20, 2007, 09:00:09 PM »
Thanks! That was the good clue!  

This is how it's fixed:

- get a copy of scrrun.dll and place it at the system32 folder under wine.
- go to the folder in the terminal and write wine regsrv32 scrrun.dll

scrrun is the library that provides the FileSystemObject.

May I add the instructions to install and run DB under linux to the bottom of the Wiki page?
http://www.darwinbots.com/WikiManual/index...on_Instructions
« Last Edit: September 20, 2007, 09:03:54 PM by MacadamiaNuts »
Sometimes you win, and sometimes you lose...

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #3 on: September 20, 2007, 10:20:40 PM »
By all means, please do.  I'm actually surprised that it works at all under Linux, I figured long ago that it was a lost cause.  Kudos to the linux code monkeys who managed to get VB programs working

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #4 on: September 22, 2007, 10:54:27 AM »
Mmh, it seems able to run offline without crashing,but it won't upload bots in the out folder and fails to download the population files.

So... err...

Could the bot sharing go in a portable stand-alone C mini-application? So the mini-app manages the files and the main executable, on internet mode, just checks the folders. I guess that C module could be latter turned into a DLL for the C fork, so it wouldn't be wasted work after all.
Sometimes you win, and sometimes you lose...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #5 on: September 22, 2007, 11:45:11 AM »
Quote from: MacadamiaNuts
Could the bot sharing go in a portable stand-alone C mini-application? So the mini-app manages the files and the main executable, on internet mode, just checks the folders.

It certainly could.  I considerred building it that way in the first place actually just to get the communication stuff into another process so that the single threaded sim wouldn't hang waiting for network stuff like it does currently.  In the end I did it in one process because a) I'm lazy  it was easier and c) it makes things simpiler not having the user have to download and run another program (or have the sim run it).

There are a few places where the split isn't clean, mostly where I detect network problems and turn the teleporter intrasm to prevent backups but we could come up with a simple file-based way for the pump to comminicate connection status back to the sim process or now that I think about it, the sim could handle it all itself implicitly I.e. if more than 10 files in the local out directory, assume the connection is down until they go away.

I'm not set up to write portable C at the moment though that wouldn't take much.  I could pretty easily make the separation as two VB exes and provide the back pressure communication channel in the main line sim.  I should do this anyway just to get the communication on another thread.   The file copying is all FTP and no parsing would need to be done outside the sim process.  You could probably write a servicable pump for linux as a scheduled command line script or two, one for bots, one for pop files.

Give me a week and I'll see what can be done to split the sim and the comm.
Many beers....

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #6 on: September 22, 2007, 04:18:32 PM »
No, please consider it very low priority. I still can try to investigate myself why it doesn't connect to darwinbots.serveftp.com. I can't even ping it so maybe there's something else.
Sometimes you win, and sometimes you lose...

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #7 on: September 22, 2007, 05:20:26 PM »
Ok I did setup a FTP account in my own website, added a darwinbots folder and then loaded an old version to change the connection settings and test it; it didn't hang trying to connect, but it failed to upload anything, so probably it's about something not being well supported by my wine install.

I guess I'll try to learn a bit about Linux command line scripting.
Sometimes you win, and sometimes you lose...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #8 on: September 22, 2007, 06:00:29 PM »
It won't work with your own FTP share currently.  The path and password, etc.
are hardcoded in the exe.  The old Inet settings arn't even looked at by the new internet mode code...
Many beers....

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #9 on: September 22, 2007, 07:01:45 PM »
Yuck. I knew that.

And then forgot it.
Sometimes you win, and sometimes you lose...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #10 on: September 22, 2007, 11:30:29 PM »
Give me a little time and I'll clean up Internet Mode to make it easy to host the network stuff in another process as well as supporting megasims which can operate against private servers.   I'll be able to post exact instructions on the handshaking for backpressure and throttling and such within the week I expect.
Many beers....

Offline MacadamiaNuts

  • Bot Destroyer
  • ***
  • Posts: 273
    • View Profile
Duh, IM graph error under Wine/Linux OPEN
« Reply #11 on: October 26, 2007, 07:58:15 PM »
An update:

To run 43o with Wine the msstdfmt.dll library is needed too, or it will crash when clicking on custom costs.

It's just a VB library to format data fields.
« Last Edit: October 26, 2007, 07:58:50 PM by MacadamiaNuts »
Sometimes you win, and sometimes you lose...