Jump to content
  • SecureLoot class throws error on quest reset/chunkreset on dedicated server


    bdubyah
    • Version: 21.2

    This is a repost of a bug Zilox posted in Gup's discord. It can happen in vanilla, but running mods seems to make it worse. I'm going to copy/paste his original post and then I'll post the usual bug report form. Also a small modlet is linked after his info that is used to reproduce the error.

     

    "I have come across a game breaking bug with the SecureLoot class when resetting quests, and or resetting chunks with blocks that have this class.  When I reset a quest in a poi that has a block with the class SecureLoot, it throws an exception about attempting to read past the end of the stream It seems to only happen when I use this within a mod, as I could not reproduce this with any vanilla vehicles such as the cop car which also used the SecureLoot class, so I believe it is a mod specific issue when using SecureLoot. It only happens when running on a dedicated server. I have included an example modlet which adds SecureLoot to the vanilla vending machines to help easily reproduce the issue, these machines can be found in many POI's so it was the easiest way to demonstrate the issue.

     

    Test modlet can be found here: https://drive.google.com/file/d/1u27ngPLHWs4btJ6YOh0bWu78m5Cxn3G-/view?usp=sharing

     

    I have tested this against the latest stable build of A21.2(B30) How To Reproduce:

    1) Install the provided modlet on client and dedicated server

    2) Load the Navezgane map on the dedicated server

    3) Once in game, teleport to the navezgane hospital (hospital_01)

    4) Make your way downstairs to a vending machine

    5) Open the console and type the command cr twice (this can also be done by giving yourself a quest at the hospital and starting it twice)

    6) Observe that an error pops open the console reading Attempted to read past the end of the stream"

     

    Summary: Having SecureLoot blocks in a POI can cause errors when resetting the POI for a quest.
     

    Game Version: (A21 b37)

    OS/Version: Windows

    CPU Model: Intel i7 12700K

    System Memory: 32 GB

    GPU Model and VRAM: nVidia GTX 3080 Ti 12 GB

    Screen Resolution: 2560x1440

    Video Settings:  High

    Game mode: Client on Dedi, RWG or NAV

     

    Did you wipe old saves? Yes

     

    Did you start a new game? Yes

     

    Did you validate your files? Yes

     

    Are you using any mods? Yes

     

    EAC on or off? Off

     

    Status: NEW

     

    Bug Description: Resetting a POI that has blocks using the SecureLoot class throws End of Stream errors.

     

    Detailed steps to reproduce the bug: Read the process above

     

    Actual result: Resetting a POI on a dedicated server that has blocks using the SecureLoot class throws End of Stream errors. Usually breaks the POI reset as well.

     

    Expected result: No errors when resetting a POI that has SecureLoot class blocks in it.


    User Feedback

    Recommended Comments

    Hey @bdubyah. CR is an unstable command, especially on a server, weird things can happen. I can have a look into this soon, but could you try seeing how the Gameevents command test_poi_reset interacts with it? You'll need to be inside the bounds of the POI.

     

    If I get to it first no worries.

    Link to comment
    Share on other sites

    56 minutes ago, Jugginator said:

    Hey @bdubyah. CR is an unstable command, especially on a server, weird things can happen. I can have a look into this soon, but could you try seeing how the Gameevents command test_poi_reset interacts with it? You'll need to be inside the bounds of the POI.

     

    If I get to it first no worries.

    I can give it a try. But it also happens when a quest rally marker is activated to reset the POI. the CR method was just a quicker way to repro it.

    Link to comment
    Share on other sites

    Hey @bdubyah, is this the same error you're getting?

     

    EndOfStreamException: Attempted to read past the end of the stream.
      at PooledBinaryReader.FillBuffer (System.Int32 _numBytes) [0x00030] in <9353b4dc7ad8423cbcf8e715c4f38529>:0 
      at PooledBinaryReader.ReadUInt64 () [0x00000] in <9353b4dc7ad8423cbcf8e715c4f38529>:0 
      at TraderData.Read (System.Byte _version, System.IO.BinaryReader _br) [0x0000c] in <9353b4dc7ad8423cbcf8e715c4f38529>:0 
      at TileEntityVendingMachine.read (PooledBinaryReader _br, TileEntity+StreamModeRead _eStreamMode) [0x00095] in <9353b4dc7ad8423cbcf8e715c4f38529>:0 
      at NetPackageTileEntity.ProcessPackage (World _world, GameManager _callbacks) [0x0007b] in <9353b4dc7ad8423cbcf8e715c4f38529>:0 
      at ConnectionManager.ProcessPackages (INetConnection _connection, NetPackageDirection _disallowedDirection, ClientInfo _clientInfo) [0x000f0] in <9353b4dc7ad8423cbcf8e715c4f38529>:0 
      at ConnectionManager.Update () [0x0016a] in <9353b4dc7ad8423cbcf8e715c4f38529>:0 

     

    Link to comment
    Share on other sites

    I have confirmed this and am writing up a ticket/doing a bit more digging into this. One more question @bdubyah if you don't mind, does this happen to other blocks than a vending machine? I suspect not, I believe it's a case of SecureLoot not playing well with the vending machines (technically being traders), over networking and this doesn't happen to other blocks with SecureLoot, but I just wanted to be sure :)

     

    Note, I don't mean for you to go checking a bunch of blocks, I can do that, just if yall have seen it being thrown with other modded blocks with SecureLoot ^^

    Edited by Jugginator (see edit history)
    Link to comment
    Share on other sites

    There have been issues with POIs having a working workbench it in causing issues when the POI gets reset, but I've not been able to get it to reliably happen in a totally vanilla game. Though I know it is usually when the reset comes from a quest, not sure if there is any difference from that versus using the game event to reset the POI. That might not be the same issue as the SecureLoot error though. I know Khaine even mentioned workstations could corrupt chunks on dedicated servers when the POI gets reset, but he said it was super random when it would happen and couldn't easily reproduce it. So it may be tied to the SecureLoot stuff, but maybe not.

    Apparently a POI with a workbench that has tools installed in it is one cause for workbenches to corrupt chunks. But at least in my mod, I have added back the random chance of finding workstations in POIs and I still get errors when resetting POIs with workstations in them, and they wouldn't have tools in them yet, so not sure about that. It seems to be the common thing is blocks that are associated with Tile Entities. So vending machines, loot boxes, workstations, etc. But I suppose this might be outside the scope of this report.

    Link to comment
    Share on other sites

    Nah good info, not outside the scope (even if so it's related enough). I'll have a play with working workstations and such with quest resets. 

    Link to comment
    Share on other sites

    So far, the vending machine is the only reliable one to reproduce. I thought I had something with the workstations, but it was an Assertion failure and is as generic as they come, and only got that after I triggered the error with the vending machine. 

     

    I'll have a play with it, but unfortunately with how busy we are with 1.0 I don't have as much time as I'd like. Likely could automate on my second computer in a world, having it run random poi reset or region reset commands in a test world or something. But, if you find something concrete (maybe it's not a thing but only a thing after a POI with a broken vending machine with SecureLoot gets hit) def let me know here.

    Link to comment
    Share on other sites



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...