rFator2 plugin being run twice, 2 instances within one rFactor2 instance?

Discussion in 'Plugins' started by antfurn, Dec 17, 2012.

  1. antfurn

    antfurn Registered

    Joined:
    Dec 17, 2012
    Messages:
    8
    Likes Received:
    0
    rFactor2 plugin being run twice, 2 instances within one rFactor2 instance?

    Hi, I'm porting over a plugin from rFactor to rFactor2 and it appears that my plugin is being picked up and run twice by rFactor2
    A quick search hasn't found anyone else reporting this, but unless your plugin connects to external resources in real time, then I guess it could be going unnoticed.
    I'm running with build 1125 now, but I've also seen it on 1107.

    Has anyone else noticed this? Is there something in the new rFactor2 plugin interface that needs modifying to stop my code being run twice?

    Thanks for any help,
    Antony
     
    Last edited by a moderator: Dec 17, 2012
  2. Kev

    Kev Registered

    Joined:
    Oct 28, 2010
    Messages:
    156
    Likes Received:
    0
    Probably i can help.
    I got similar behavior once.
    rFactor is really intelligent and loading every file from Plugins folder that CONTAINS '.dll' in its name. For ex, if you renaming your old plugin to 'Plugin.dll.bak' and copy new version as 'Plugin.dll' - they both will be loaded. If so, you should break '.dll' sequence, i usually rename to '.1dll' and this files not loaded anymore.
     
  3. antfurn

    antfurn Registered

    Joined:
    Dec 17, 2012
    Messages:
    8
    Likes Received:
    0
    Hi Kev,
    Great, I'll make sure I only have one copy of my plugin anywhere near the rFactor2 path.
    Thanks, Antony
     
  4. antfurn

    antfurn Registered

    Joined:
    Dec 17, 2012
    Messages:
    8
    Likes Received:
    0
    So I've checked and double checked, only one copy of my plugin in the plugin folder hierarchy :-(
    Still getting two entries into the destructor method after I've attached the debug to the rFactor2 process.

    I'm going to make a very simple plugin that just appends to a file when ever it is called, just to see if that happens twice too.

    Antony
     
  5. antfurn

    antfurn Registered

    Joined:
    Dec 17, 2012
    Messages:
    8
    Likes Received:
    0
    OK, well more messing with my plugin and it seems to be fixed. Although I don't know exactly what I changed to fix it :-(
    I was playing with the plugin interface version number and also remove some original rFactor1 plugin code that no longer seemed required. And now it works as I expect it too - so something a bit odd going on.
    Thanks anyway, Antony
     

Share This Page