rFactor2 Dedicated Server crashes in session changes

Discussion in 'Technical & Support' started by JParra, Nov 30, 2023.

  1. Goanna

    Goanna Registered

    Joined:
    Jan 19, 2012
    Messages:
    1,407
    Likes Received:
    957
    I'm in no way an expert, I had a quick look at this with WinDbg and it suggests(to me) a problem with the HLSS dll file

    [​IMG]
     
    DuRiN, Flipo and Lazza like this.
  2. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,786
    Likes Received:
    2,244
    Do we have yours? Unless you and he are in the same league.
     
    Flipo likes this.
  3. Flipo

    Flipo Registered

    Joined:
    Dec 29, 2013
    Messages:
    92
    Likes Received:
    29
    @Coutie
    We are not in the same league, but if we use the same plugin with the same dll, we would like to know where the problem is and if it is in that dll, if it is possible to know. I don't have the rfmini.dmp file, so I can't provide it.
    thank you.
     
  4. DuRiN

    DuRiN Registered

    Joined:
    Oct 12, 2010
    Messages:
    44
    Likes Received:
    14
    Thanks Goanna. Now we can confirm that error comes from my plugin. HLSSim is a hotlaps system born ten years ago, and never gave errors like this. I have tried several things but can not get any clear clue about the problem but I think some structures or variables provided by the game to the plugin are not available in the plugin when times is out in the session.

    Thanks for clarification.
     
    Last edited: Dec 29, 2023
    Flipo likes this.
  5. JParra

    JParra Registered

    Joined:
    Jul 13, 2017
    Messages:
    262
    Likes Received:
    93
    After dozens of tests with @DuRiN we have isolated the problem to the point that his Hotlaps plugin must be enabled and at least one "human" player (this does not happen with AI) on the server for the problem to reproduce.

    We have tried different versions of the plugin to try to find what the problem is, but we have not been able to, so without knowing why it breaks, we do not know where to direct our efforts to solve the problem.

    We would greatly appreciate a little help from a developer or person who knows what changes in this regard were implemented in the latest version of rFactor2, since we believe that they are the only person who can help us find the right path.

    Thanks in advance.
     
    Flipo likes this.
  6. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    724
    Likes Received:
    222
    Is it possible to activate some logs or "extra" logs inside the plugin ?
    All serious plugins have some kind of log ... If not, no solution ...
    Only the person with the code of the plugin can help find the problem.
     
    Flipo likes this.
  7. Brent

    Brent Registered

    Joined:
    Nov 5, 2015
    Messages:
    237
    Likes Received:
    113
    Sorry I'm just reading this. We had the same thing happen to us last Thursday. We had 3 drivers in the server session and as soon as the last car crossed the finish line it crashed completely and everyone "lost connection". I checked the server and the dialog window was gone. It was only a 5 lap warmup race. I had set the grid via the server side with the /batch command in warmup and I can't for the life of me remember if I pushed the session forward as admin in game or I let the time runout and let it automatically roll to the race session.

    It didn't produce a dmp file or any kind of error file but it did save the race result.

     
    Flipo likes this.
  8. DuRiN

    DuRiN Registered

    Joined:
    Oct 12, 2010
    Messages:
    44
    Likes Received:
    14
    I think you are not using my plugin, because its only distributed to HLSSim communities, so I think we have a problem with many more plugins like mine.

    I have, of course, a log system to log errors, but no way to get errors traced, no info about the error, is like the error comes from any pointer de referenced or so...
     
    DanRZ likes this.
  9. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,391
    Likes Received:
    6,606
    Is it your plugin, as in you made it?
     
  10. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    724
    Likes Received:
    222
    Sometimes having no certain logs can help find the portion of code in error.

    If you have the code, you can add some extra logs to find where the bug happens.
    Like In and Out logs in every function.

    I had a division by zero at some point with my own plugin
    (But in my case i had "onFatalError 22" in log, not 11 as the case here).
    I added a few logs and the bad code was rapidly found in 2 or 3 iterations and corrected by adding protections.

    Something probably has changed in rFactor2 data provided that needs to be updated in a plugin
    and rFactor2 devs can't help on that ...
     
    Last edited: Jan 4, 2024
  11. Brent

    Brent Registered

    Joined:
    Nov 5, 2015
    Messages:
    237
    Likes Received:
    113
    I'm not using your plugin. Only plugin I'm using is the shared memory plugin and stockcar rules. I just wanted to report that we had this server crash issue with the last finishing car crossing the line. It likely isn't plugin related?

    We have had a very rare issue with the stockcar plugin where the server crashes when the leader crosses the line with one to go green during a caution/yellow, that doesn't generate any race result.
     
    Last edited: Jan 5, 2024
    DuRiN likes this.
  12. DuRiN

    DuRiN Registered

    Joined:
    Oct 12, 2010
    Messages:
    44
    Likes Received:
    14
    I have added a lot of try cath, checking null references but nothing seems to solve.

    Lazza, yes, this is my plugin, developed too many years ago for HLSSim in the early days of rf2 and have a long live without problem until now. In April system will shut down because no communities to support the system.

    I am C# developer and C++ is not my field but add trys or check null references is easy for developers. I think they have change something that i must change in my plugin, but I think they must warn about changes like this to be fix for us not to be confident that we will fix by god inspiration.
     
  13. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,391
    Likes Received:
    6,606
    How a plugin might be affected by any changes could depend a lot on what the plugin does. I don't think we could reasonably expect devs to foresee that; alerting us to changes is potentially possible, but as with modding sometimes people can get away with doing things in an unusual manner until a benign change (from the devs point of view) means that the unusual approach no longer works. It's also very possible an unintended change was made and this is the first opportunity to identify it for fixing.

    You could set your debug build to output a whole heap of diagnostic data, starting at session changes, and possibly see some broken values.

    You could also run a debug version on a machine with your development environment and see exactly where it's hitting a null (with the call stack as well). I believe a dmp file would allow you to replicate this process also, I've never done it personally.
     
  14. DuRiN

    DuRiN Registered

    Joined:
    Oct 12, 2010
    Messages:
    44
    Likes Received:
    14
    Yes, i am debuging the plugin attaching to the game running on a server in my local machine but no results from there.

    I know what you mean about changes in plugin, but if you expose info in an object for the plugin and you change that info, its recommended to warn developers about that change to allow us to be fixed.
     

Share This Page