Sorter Filter shows "(null)/Stone" on dedicated server when added via Program Block script

Frigidman shared this bug 18 months ago
Reported – Awaiting fix

I wrote a script in my small mining ship that toggles the Sorter Filter list to either have nothing in it, or "Stone" ... and then the script turns on "Drain All" on the sorter, and "Throw Out" on the connector. Essentially this allows the toolbar to toggle the program block and 'throw out all stone while drilling'.

Works perfectly fine in my single-player game in both Creative, and Survival.

SADLY though, the exact same WORKING script on our dedicated server (just the two of us), the ".SetFilter" method adds "(null)/Stone" to the Sorter's filter list (instead of "MyObjectBuilder_Ore/Stone"), which bricks the sorter, and it all stops working. In fact, if any user on the server tries to manually remove that barfed "(null)/Stone" filter entry using the Control Panel, they get disconnected from the server.

I have tried different ways of adding the ItemType to the filter list, and using .SetFilter on the ConveyorSorter, and it always results in the same broken filter entry. Clearing the filter list works just fine though.

Getting the current Filter List, and echoing out the ItemType and ItemId, shows the exact same thing I am putting into it... but clearly there is something missing/broken on a dedicated server which causes it to rest at "(null)/Stone". This in turn makes the sorter not pass ANYTHING (not even stone), and just does not function.

Replies (5)

photo
1

Attaching some files to help facilitate in seeing and debugging this.

Attached is the basic .cs file used to produce this bug.

Attached blueprint is the most basic of basic to get it happening. Includes the minimal verified code example in the program block.

Attached world file is from my dedicated server I setup on my own machine, just to directly test the bug issue in a clean server world. No mods, empty world, basic setup.

--

Again, this bug is NOT present in single player mode in either Creative or Survival. It only shows up on Dedicated Servers.

photo
1

Hello, Frigidman,

thanks for letting us know! However, it´s not possible for us to reproduce this issue, as there are problems with pasting the BP you provided on DS.

As you mentioned, it is working seamlessly on single player, when trying on DS, though, upon pasting the BP, player (admin) is kicked from server with a message: Server host left the game.

Will try some other approach to reproduce the issue. But at least this part of the issue (even though it´s not what you are writing about) is now listed in our internal system. As soon as I will manage to reproduce it with some workaround, or the bug with pasting the BP will be fixed, I try to reproduce it again.

Will let you know how things are going.

Hope you understand.

Kind Regards

Keen Software House: QA Department

photo
1

Really?

The blueprint is basically a couple blocks, program block, conveyor sorter, and battery. I did not use any DLC content on it or mods.

The script is the important part of this bug though. So on a DS, you can simply re-create any small grid with the blocks mentioned above, and load the script into the program block. Really surprised that blueprint file I supplied won't just work.... different bug?

photo
1

Ok, I think I see what the problem is you are having, which is related to this bug's ability to "kick a client".

It seems the blueprint I MADE, was after the script added the filter to the list (the "(null)/Stone" broken filter). So by trying to paste this blueprint into the DS, causes the same "kick the client" behavior as when someone tries to remove that filter in control panel.

This part of the .sbc shows the issue: (note the SerializableDefinitionId of Type = (null))...

            <MyObjectBuilder_CubeBlock xsi:type="MyObjectBuilder_ConveyorSorter">
              <SubtypeName>MediumBlockConveyorSorter</SubtypeName>
              <EntityId>89111728257283348</EntityId>
              <Min x="-1" y="1" z="-2" />
              <Owner>144115188075855897</Owner>
              <BuiltBy>144115188075855897</BuiltBy>
              <ShareMode>Faction</ShareMode>
              <ComponentContainer>
                <Components>
                  <ComponentData>
                    <TypeId>MyInventoryBase</TypeId>
                    <Component xsi:type="MyObjectBuilder_Inventory">
                      <Items />
                      <nextItemId>0</nextItemId>
                      <Volume>0.343</Volume>
                      <Mass>9223372036854.775807</Mass>
                      <MaxItemCount>2147483647</MaxItemCount>
                      <Size xsi:nil="true" />
                      <InventoryFlags>CanSend</InventoryFlags>
                      <RemoveEntityOnEmpty>false</RemoveEntityOnEmpty>
                    </Component>
                  </ComponentData>
                </Components>
              </ComponentContainer>
              <CustomName>Conveyor Sorter</CustomName>
              <ShowOnHUD>false</ShowOnHUD>
              <ShowInTerminal>true</ShowInTerminal>
              <ShowInToolbarConfig>true</ShowInToolbarConfig>
              <ShowInInventory>true</ShowInInventory>
              <Enabled>true</Enabled>
              <IsWhiteList>true</IsWhiteList>
              <DefinitionIds>
                <SerializableDefinitionId Type="(null)" Subtype="Stone" />
              </DefinitionIds>
              <DefinitionTypes />
              <DrainAll>true</DrainAll>
            </MyObjectBuilder_CubeBlock>
I removed that from the sbc and attached a new blueprint zip.

photo
photo
1

Hello, Frigidman,

yeah, though something similar. That would be the first thing I would try today... to strip the BP of the script in single player, do my own BP, copy the script and, paste it on DS and put the script to programmable block there. But you were faster :) Thanks.

With newly provided BP, the issue was easily reproduced and put into our internal system.

Kind Regards

Keen Software House: QA Department

photo
1

I've just encountered this same issue when trying to update my AiEnabled mod to automatically filter my mod-created components into the RoboFactory block.

STR:

1. Place a RoboFactory (with gamelogic code that uses IMySorter.SetFilter() )

2. Move out of sync range on DS and wait for grid with block to close

3. Move back into sync range and wait for CTD when block tries to load with null type ids in the filter

Leave a Comment
 
Attach a file