Connection lost- Server lost- build 342

Discussion in 'Technical Archives' started by TIG_green, Oct 31, 2013.

  1. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    Noel talk about C + +.
     
  2. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    The DLLs are written in C++ actually. If I was you guys I would start with downloading the sample plugin from here:
    http://downloads.imagespaceinc.com/rf2/plugin/InternalsPlugin5.zip

    The sample takes the scoring data and dumps it to a text file. UpdateScoring used to get called 2 times per sec but I think I remember reading that it was bumped up to 5 times per sec in build 342. So if the sample dll is set to append the txt file (which I think it is if I recall) it will build a big file fast.

    I haven't had a chance to look yet but if I remember correctly this plugin you guys were using writes data to a MySQL database. What I was going to do is write some basic code for taking the scoring data and writing it to a MySQL db. It should be a good starting point. So you will need to learn some C++ and SQL.
     
  3. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    Vmliveliew acts like this :

    The dll append the data to an xml file
    There's another binary in charge of mysql loading

    Not sure if it´s a good idea to load data directly to the db via the dll. For performance reasons.

    I saw the example.cpp, will try to compile ...
     
  4. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    Or just wait for Frank Geyer to release his code or recompile the dll like he did in the past
     
  5. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Actually it is best to offload as much as possible to an external process because the plugin API is blocking. If you do too much work in the DLL it will cause framerate drops (on the server too). I actually don't like the idea of writing to a file. My first timing plugin wrote to an XML file (overwrote though) and I had another process that read the XML and then wrote the data to a database. I ended up switching to sending Windows Messages to another process that then wrote to the DB. The Windows Messages literally sent the raw scoring struct via WM. If the second process wasn't running the plugin will automatically return without doing any work at all. The advantage to this design is that the plugin remains static. I never made any changes to it. All the real work was in the second process which I wrote in a higher level language (C#). In the middle of a race I could push a new version to the server without having to restart the server. The second process also has a very minimal HTTP server built in which would serve up XML on demand. So I had a webpage that used Javascript to pull the XML timing data and display that. This was all written for an endurance league (VOR) I have been with for 3 years now. When you have 40 teams doing a 12 hour race with drive swaps you want to make sure your plugin doesn't add too much load.

    Do you have a sample of the XML data your plugin was generating?
     
  6. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    Exactly what I thought.

    Yeah at home, but just download the plugin from here http://isiforums.net/f/showthread.php/4065-VM-LiveView-Lite-for-rFactor-rFactor2

    and launch a dedicated (I think you have to create a folder and perhaps setup a config file, don't remember).

    Or perhaps Valbuena can send us an xml sample from vmliveview?

    Your module sounds really better than this "pass thru file" thing !!!
     
  7. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    I did a quick port from rF1 to rF2 about 6 months ago and there were problems with it (can't recall what but I do recall it being a simple fix). I need to revisit the project and maybe release the DLL to the public. It will then allow people to make a second process for receiving the data and they can write it in what ever language they want. The only downfall to my DLL is that you can't send WMs to a windowless process (AKA windows service).
     
  8. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    should be good enough with a running window Noel ! Your tool seems way better, appart from the problem you don't yet remember :)

    The loader rfactorSL.exe is a window too, easier for users

    Anyway, shouldn't be a problem doin the file stuff in the meantime cause the author just used the internalplugin.dll removing unuseful stuff inside.

    I'll have a look tonight, the internalsamples do compile here at work using VS2010.

    Do you think we have to use VS2012?

    Thanks very much for your help cause I think without this vmhotlaps.dll : there are loads of leagues without proper hotlaping system !!!
     
  9. Valbuena72

    Valbuena72 Registered

    Joined:
    Dec 23, 2011
    Messages:
    194
    Likes Received:
    0
    Excellent your system Noel
    Especially it should not restart the dedicated server to modify the plugin , it's a great system.
     
  10. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    Sure i had a look to what is produced by the dll and what is produced by the internals template : too complex for me !!!
     
  11. 88mphTim

    88mphTim racesimcentral.net

    Joined:
    Sep 23, 2010
    Messages:
    10,840
    Likes Received:
    314
    Our last API change was May 20. Any before that could be out of date.
     
  12. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    I think that dll is from april
     
  13. 88mphTim

    88mphTim racesimcentral.net

    Joined:
    Sep 23, 2010
    Messages:
    10,840
    Likes Received:
    314
  14. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    Hi Tim,

    no problem Tim : it's the dev faults not ISI.
    You did your job.

    Thanks anyway,
     
  15. Jerry Luis

    Jerry Luis Banned

    Joined:
    Aug 25, 2013
    Messages:
    769
    Likes Received:
    1
    Since yesterday i´m getting "connection lost" in very short intervals. I´m not able to do even 10 min without loosing connection (but most of time in just 2 or 3 min).
    Sometimes before loosing connection (Isi servers and non Isi servers), appears in screen the word "synchronizing".

    Already tried reset modem, log out from rf2 then log in again, restart PC. Nothing helps.
    Please help.
     
  16. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    Antivirus?
     
  17. Jerry Luis

    Jerry Luis Banned

    Joined:
    Aug 25, 2013
    Messages:
    769
    Likes Received:
    1
    Never cause problems before but worth a try. Thanks.
     
  18. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    I had problem serverside too with antivirus (with arma3 dedicated server - not rfactor2)...

    But sometimes it filters a bit too much ...

    You're playing with an ethernet cable or wifi ??
     
  19. Jerry Luis

    Jerry Luis Banned

    Joined:
    Aug 25, 2013
    Messages:
    769
    Likes Received:
    1
    Wifi.
    Look what happened now. I entered in a ISI server (open wheel) when restart weekend take place. But had to check out one of my dogs and missed practice and qualify. When i come back the race already start (no connection lost during this period) but when i leave pits, as soon i get on track i got another connection lost.
    This is pretty strange.
     
  20. gagipro

    gagipro Registered

    Joined:
    Feb 26, 2013
    Messages:
    473
    Likes Received:
    7
    Well : first try with an ethernet cable

    You should avoid wifi online, it introduces loads of lag so that´s not good for you AND for the other players.

    Try this first then come back.

    Thanks
     

Share This Page