Page MenuHomeFeedback Tracker

Server Crash Related to "Weapon Slings"
Reviewed, UrgentPublic

Description

Since 1.20, there's a persistent server crash issue when players with rifle slings are loaded from the database.

To further clarify, a "weapon sling" in this regard is a Clothing object with slots that Rifles or other items can be attached to, which is worn in either the Shoulder or Melee slot.

There are multiple mods which provide weapon slings, all of which seem to be affected and therefore the suspicion is that loading items and attaching them to the relevant slots is causing the crash, rather than a P3D issue.

These crashes seem to occur primarily shortly after server boot, and will typically happen to the same player multiple times in a row.

Details

Severity
Crash
Resolution
Open
Reproducibility
Sometimes
Operating System
Windows 11 x64
Category
General
Steps To Reproduce

Attach a weapon to a sling, attach the sling to the player, and restart the server. On logging back in, there may be a crash.

Additional Information

I've attached mdmp and script log files from instances of the crash. In the later script logs I've implemented a dump of loaded items and typically the last item loaded before each crash is a weapon on a sling.

In today's logs, I've re-implemented the slings entirely with different slots as new items, to eliminate the possibility of DB corruption from items previously stored.

Event Timeline

mdc created this task.Feb 17 2023, 9:42 AM
Mortan added a subscriber: Mortan.Apr 13 2023, 2:07 PM
mdc added a subscriber: Geez.Apr 21 2023, 2:52 PM

@Geez Can you confirm if the latest patch notes entry for "Fixed: Crash when calling methods on inventory owner in GameInventory.Init" is related to this issue?

Can confirm this exact issue. Weapon slings are crashing the entire server. Many different modifications add these items and they are useful for more realistic gameplay. The issue we are facing is that is rolls back the server about 2-5 minutes and does not produce a crash log for us.

@Geez Any news on this fix?

Geez changed the task status from New to Reviewed.Jun 16 2023, 10:53 AM

Hello everyone.

The mod authors are using the config array parameter simpleHiddenSelections for the weapon slings. This parameter was not intended to be used on clothing due to P3D switching for when the item is on the ground or when it is on the persons body. The mod authors should try and find a different solution.

Of course we are looking into this internally as well.

Regards,
Geez

mdc added a comment.Jun 17 2023, 12:03 AM

Hello everyone.

The mod authors are using the config array parameter simpleHiddenSelections for the weapon slings. This parameter was not intended to be used on clothing due to P3D switching for when the item is on the ground or when it is on the persons body. The mod authors should try and find a different solution.

Of course we are looking into this internally as well.

Regards,
Geez

Can you confirm that's the cause of the issue as indicated in the MDMP files, or whether or not it's simply a theory that's been proposed externally? Because I've done extensive testing at this end after hearing that be suggested by certain people in the community, which indicates no actual issue with simple hidden selection states. There are also plenty of mods which have used the method - Windstride's Clothing - for example with no other issues in the "Back" slot.

In fact, the only difference between these two use cases seems to be that vanilla itself uses SetSimpleHiddenSelectionState in DayZPlayer::UpdateDummyPlayerProxyVisibility for the shoulder slots, so knowing *what* the dump files are indicating would be helpful in determining whether or not we're dealing with an issue arising from chained use of this function.

I've also *removed* the selection hiding and still experienced the same crashing, hence why I'm hesitant to accept this as the cause without further details.

mdc added a comment.Thu, May 2, 8:46 AM

@Geez

Looking to close up some of my tickets, and figured out the cause of this specific issue.

When a selection is missing from an LOD on one gender's clothing, calling SetSimpleHiddenSelection will result in a crash. Matching selections across _m, _f and _g variants resolves the issue. My guess is on an unhandled index out of range or null pointer when setting mesh visibility.

If that detail could be passed on to the devs this should be good to close.