EpicSkookumScript / EpicSkookumScript/SkookumScript-Plugin

BlueprintImplementableEvent's can be called with wrong scope

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
138
Forks
22
PR merge metrics
No merged PRs in 30d

Description

**UE4 Version**
4.23

**SkookumScript Version**
4.23

**Describe the bug**
Calling mulltiple `BlueprintImplementableEvent`'s in the same script can result in them being called with the wrong scope.

**To Reproduce**
```javascript
// Classes A and B derive from the same subclass
// The subclass defines some_event as a BlueprintImplementableEvent
!class_a : SomeClassA.instances_first
!class_b : SomeClassB.instances_first

a.simulate_physics_set(true)
a.some_event(0, true)

b.simulate_physics_set(true)
b.some_event(0, true) // <--- Crash here
```
Crashes with assert:
```
Assertion failed: ((UObject*)ContainerPtr)->IsA((UClass*)GetOuter()) [File:C:\Epic Games\4.23\Engine\Source\Runtime\CoreUObject\Public\UObject/UnrealType.h] [Line: 367]
'SomeClassA_2' is of class 'SomeClassA_C' however property 'UberGraphFrame' belongs to class 'SomeClassB_C'
```

If I call the `BlueprintImplementableEvent` via a `UFUNCTION` marked method that is not `BlueprintImplementableEvent` then it works fine.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.