Separate Task Instance for the Dedi

Discussion in 'Bug Reports' started by redapg, Jan 19, 2021.

  1. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    @Marcel Offermans Maybe Others call it different, but i would call it a Bug.
    It is the Fact that when i run the Steam Dedicated Server, what for my Understanding should be a from the main Game independend Task, rFactor 2 is detected as "running", that it can not be started in Steam anymore.
    It would be great if such Things could be fixed quickly, because they make the Things unneccessary complicated and are against every intuitive Usage.
    Thank you

    EDIT I better had added more Information, as the below Posts prove.
    That Effect happens, when rFactor 2 and the Steam dedicated Server are installed on the same Machine and when Steam is running and you start the Dedi before you start rFactor 2.
     
    Last edited: Jan 19, 2021
    evi likes this.
  2. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    It's been like that for years.
     
  3. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    The more i don't understand why it wasn't fixed yet.
     
    Last edited: Jan 19, 2021
    Brent likes this.
  4. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    3,043
    Likes Received:
    1,958
    If you run a dedicated server anonymously with SteamCDM, Steam detects rF2 as running?
     
  5. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    Do you have the Steam dedicated Server installed?
    If yes, you can try it out. ;)
    If i start that Dedi here (it's not related to my Steam Account, at least as far as i know), rFactor 2 is shown as "running" in Steam and can not be started anymore.
    That is also the Reason why you have to first start rFactor 2 and then the Dedi, to get both running.
    And that is, what i call unneccessary complicated. ;)
     
  6. lagg

    lagg Registered

    Joined:
    Oct 1, 2012
    Messages:
    3,043
    Likes Received:
    1,958
    Ah, i didn't know this.
    I run the dedis in a server without a Steam account.
    You can run a dedi in a pc without having rF2 installed. But if you have rF2 installed you need to firts start it to run a dedi.
    Can't understand the logics of this.
    I'll try it tonight
     
    redapg likes this.
  7. Andy Bonar

    Andy Bonar Registered

    Joined:
    Mar 17, 2011
    Messages:
    639
    Likes Received:
    93
    You can run the dedi from a desktop shortcut without running the steam client at all.
     
    redapg likes this.
  8. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    It's my Fault, i should have written that it happens when the main Game and the Dedi are installed on the same Machine.
     
  9. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    That is correct and if you do that, you can start Steam and run the Game as usual.
    But in my Opinion, it makes no Sense at all, when Steam is running and you start the Steam Dedi, you can not start the Game anymore.
     
  10. evi

    evi Registered

    Joined:
    Dec 14, 2016
    Messages:
    44
    Likes Received:
    38
    @Marcel Offermans .Probably to clear situation a bit more. If you install rF2 on your PC you have dedicated server exec already there. If you would like to race with your friends you start "dedicated" server. If you do that you are unable to start rF2 "client" anymore.

    Starting from Steam - does not work - Steam thinks rF2 is already running
    Starting from \bin64\rFactor2.exe - does not work - brings server window to front
    Starting from \Launcher\Launch rFactor.exe - does not work - brings server window to front

    Expected behaviour - start rF2 client, so you are able to join server running on the same PC (for example)


    PS. Yes, I would call it a bug..
     
  11. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    It because the exe's have the same UID(?) which is meaning Steams sees them all as the game and changes the playing status.

    Even a separate SteamCMD installation separate from your Steam installation will get detected as running, tried it myself.

    It would be nice if they were different... it is not a bug, this is expected behaviour until they can separate these out. It's also a Steam thing as I doubt this happened pre-steam.
     
  12. evi

    evi Registered

    Joined:
    Dec 14, 2016
    Messages:
    44
    Likes Received:
    38
    I don't agree. At least partially. If it was pure Steam thing, then "launcher" method would work. It does not use Steam. Or, dedicated server start when client is already running would not work. I think it's just a bug (let's call it misbehavior) in how client is detecting previous running instance.

    For example, dedicated server is not detecting if it's already running and is starting another instance fine - regardless if one instance is already running or if client is running. But, client is checking if window with "rFactor" window class (I think that's how it's called in WinAPI) is already open and sets focus to it. That's why client is refusing to start when dedicated server is running. It uses the same window class. Fix would be to use different class or read complete window title.
     
  13. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,004
    Likes Received:
    1,058
    Yup that is what I meant :)

    Oh yeah I forget that it happened in the launcher to.... as the launcher was detected as the game too.
     
  14. Brent

    Brent Registered

    Joined:
    Nov 5, 2015
    Messages:
    236
    Likes Received:
    111
    As someone who runs a dedi server and RF2 on the same machine I find this very very frustrating. Even more so with the new UI because with the old UI I could leave the launcher window up and still launch RF2 at any time with the dedicated server running.

    I find myself still in the habit of closing RF2 and then realizing I have to shut down the dedi to restart RF2. So then I have to start RF2, alt-tab - show the desktop, then start the dedi server.

    In a discussion I just saw recently on discord with this same question someone mentioned a workaround, as long as you are not logged into steam you can start the dedi server, then log into steam and be able to launch RF2. This indeed works however the same problem exists, if RF2 crashes on me or I accidentally exit RF2, I have to ask everyone to leave the server in order to restart it.
     
  15. David Turnbull

    David Turnbull Registered

    Joined:
    Jan 1, 2013
    Messages:
    135
    Likes Received:
    29
    this is exactly the problem im having now, with the old ui i could have the dedi running on my machine and start the game and all was good, if i disconnected or left the game i could just go back on and no problems.

    now if i disconnect or leave the session i cant get back on because steam sees the dedi server still running. this is useless for league racing, if i disconnect at all then i need to restart the server and everyone gets kicked before i can rejoin.

    we at prestogp used it fine for years like this, now its a nightmare.
     
  16. Stefan_L_01

    Stefan_L_01 Registered

    Joined:
    Nov 18, 2012
    Messages:
    595
    Likes Received:
    386
    I think its due to an old-fashioned check to forbid double instances running on same machine. You query the system for your process name and if you get one with same name you know an instance is allready running. Rf2 is checking for it to avoid double game start, the dedi is not. Thus the logic what you have to start first.
    In task manager you can see rf2 and dedi to be listed with same process name, rfactor 2. If the dedi would be using rfactor 2 dedicated, there probably wouldnt be any problems starting rf2 after the dedi
    upload_2021-1-28_22-7-38.png
     
  17. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    As it was said in a former Post, you can avoid the Problem, if you start the Steam dedicated Server before you start Steam.
    Doing that, you can start and close rFactor 2 without any Conflict.
    Only when Steam was started already, before you start the Steam dedicated Server, the Server gets detected as rFactor 2 is running already.
    Try it out.
    But in any Case, it shouldn't work in a Way, that you have to start the Apps in a special Order, to get them running independently.
     
  18. David Turnbull

    David Turnbull Registered

    Joined:
    Jan 1, 2013
    Messages:
    135
    Likes Received:
    29
    doesnt work like it used to, i always started the dedi before i would open steam and it worked fine, i could then leave the server and then rejoin and steam would let me.

    now i do the same routine, start dedi, open steam, join game, but when i leave or if i disconnect, steam still see's rfactor 2 as open and i cant rejoin until the dedi is closed.
     
  19. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    3,958
    Likes Received:
    2,808
    Here it works in the Way i have posted.
    Are you sure that nothing from Steam gets loaded on Windows startup or something like that (did you check the Taskmanager?)?
    Or do you have anything else from rFactor 2 running?

    Alternativly, you can also try this:
    Create a Shortcut of the rFactor2.exe in the Bin64 Folder.
    Rightclick on it, select Properties and delete \Bin64 in the Field "execute in" (below of the Field "Target").
    Save it, move the Shortcut to wherever you want it to be and start rFactor 2 with that, instead of starting it in Steam.
    That should also work to start rFactor 2, independent of if the Dedi is running or not.
     
    Luiz Paulo Abreu likes this.
  20. Alexandr Meshkov

    Alexandr Meshkov Registered

    Joined:
    Jun 20, 2017
    Messages:
    214
    Likes Received:
    92
    CLI.txt in rfactor2/support/ folder referring to +multiple command. Probably you can add this to your shortcuts.

    +multiple
    Allows multiple instances of rFactor2 to run at the same time on the same
    machine. (SP,MP,DEV,unsupported)
     
    Vance Le Garde likes this.

Share This Page