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

Research direction

Start by reproducing the provided UE4 4.23 example with two derived classes and multiple BlueprintImplementableEvent calls. Compare the direct event call with the UFUNCTION wrapper that reportedly works, then trace the plugin's BlueprintImplementableEvent handling. Done means calls retain the correct object scope without the reported UberGraphFrame assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, unreal-engine
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.