# Trying to fix UE-75309

**URL:** <https://forums.unrealengine.com/t/trying-to-fix-ue-75309/450752>\
**Category:** FX\
**Tags:** unreal-engine, crash, bug-report, question\
**Created:** [June 16, 2019, 1:50am UTC](https://forums.unrealengine.com/t/trying-to-fix-ue-75309/450752 "2019-06-16T01:50:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![trashbyte](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@trashbyte](https://forums.unrealengine.com/u/trashbyte)\
**Post date:** [June 16, 2019, 1:50am UTC](https://forums.unrealengine.com/t/trying-to-fix-ue-75309/450752/1 "2019-06-16T01:50:22Z")

</div>

- Issue: UE-75309
- Issue page: [https://issues.unrealengine.com/issue/UE-75309](https://issues.unrealengine.com/issue/UE-75309)
- Version i’m testing with: GitHub release branch (currently 4.22.2-0)

I’ve been trying to figure out what causes this bug, and I think it’s caused by `bUseTriangleSampling` / `bUseVertexSampling` not being set properly.

Of note: the game doesn’t have to be fully packaged to trigger the bug, it just needs to be run standalone. Running the game from the editor in standalone mode, or running the `DebugGame` configuration from VS with cooked content works fine.

Here’s the current behavior: When a standalone game tries to load an actor with a skeletal mesh, and a niagara system set up to sample that mesh surface, the behavior depends on the Skinning Mode:

- `None`: Doesn’t do anything. Works as expected.
- `Skin on the fly`: Game runs, but particles don’t track animated meshes properly. Instead, the particle system will behave as if the skeletal mesh was always on the first frame of its animation.
- `Pre skin`: Game crashes as soon as the actor with the mesh and system are loaded.

Look in `NiagaraDataInterfaceSkeletalMesh.cpp` at line 515:

```
ENDISkeletalMesh_SkinningMode SkinningMode =
    (GIsEditor || Interface->bUseTriangleSampling || Interface->bUseVertexSampling)
    ? Interface->SkinningMode
    : ENDISkeletalMesh_SkinningMode::None;

```

If a project with an actor as described above is run in standalone mode, and a breakpoint is set here, you’ll see that `Interface->bUseTriangleSampling` and `Interface->bUseVertexSampling` are `false` even though this skeletal mesh interface should be using skinning. If you replace that line with:

```
ENDISkeletalMesh_SkinningMode SkinningMode = Interface->SkinningMode;

```

and ignore the flags on the interface, the standalone game will run without crashing and the system will behave properly. It would appear that `bUseTriangleSampling`/`bUseVertexSampling` are not being set properly in the `UNiagaraDataInterfaceSkeletalMesh`. As for why that’s happening, this is as far as I’ve gotten. I’m not really interesting in taking this further at the moment but hopefully this is helpful.

---

<div class="post-metadata">

**Author:** ![intoxicat3](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@intoxicat3](https://forums.unrealengine.com/u/intoxicat3)\
**Post date:** [May 14, 2021, 12:42pm UTC](https://forums.unrealengine.com/t/trying-to-fix-ue-75309/450752/2 "2021-05-14T12:42:54Z")

</div>

Have the same issue with crashing. Were you able to resolve the issue?
