[bug/question] Delegate bindings crash and how to find expected signatures?
Hi,

So here is the issue I mentioned over discord.

I can't find how to replicate the following `.AddDynamic` of cpp using `bindUFunc`:

```cpp
AOverlapped::AOverlapped()
{
  TriggerVolume->OnComponentBeginOverlap.AddDynamic(this, &AOverlapped::OnTriggerVolumeOverlapBegin);
}

void AOverlapped::DoorAction(UPrimitiveComponent* OverlappedComp, 
                       AActor* OtherActor, 
                       UPrimitiveComponent* OtherComp, 
                       int32 OtherBodyIndex, 
                       bool bFromSweep, 
                       const FHitResult &SweepResult
) {
                      // overlapped
}

```


This is all the options I have tried, first based on the C++ signature, then by looking into the reflection data, both crash.

So the base common class is that:
```nim
uClass AOverlapped of AActor:
  (Blueprintable, BlueprintType)
  uprops(EditAnywhere, BlueprintReadOnly, Category = "Door Settings"):
      triggerVolume: UBoxComponentPtr
      
  proc constructor(initializer: FObjectInitializer) =
      self.triggerVolume = createDefaultSubobject[UBoxComponent](initializer,
        n"TriggerVolume")
      self.triggerVolume.setCollisionProfileName(n"Trigger")
      discard self.setRootComponent(self.triggerVolume)
      bindUFunc(self.triggerVolume.onComponentBeginOverlap, self, n"doorAction")
```

And I tried those signatures (both inside and outside `ufuncs`):

- Cpp signature:

```nim
proc doorAction(OverlappedComponent: UPrimitiveComponentPtr, 
                           OtherActor: AActorPtr, 
                           OtherComp: UPrimitiveComponentPtr,
                           OtherBodyIndex: int32, 
                           bFromSweep: bool, 
                           SweepResult: var FHitResult) =
                              log "Over Me"
```

- Reflection signature:

```nim
proc doorAction(SweepResult: var FHitResult,
                            bFromSweep: bool, 
                            OtherBodyIndex: int32, 
                            OtherComp: UPrimitiveComponentPtr, 
                            OtherActor: AActorPtr,  
                            OverlappedComponent: UPrimitiveComponentPtr) =
   log "Over Me"

```                        
So more generally I wonder how one find the proper signature for a given delegate? I tried browsing the reflection data but couldn't find the expectations!

Thanks


### Full repro

<details><summary>click to expand</summary>

- **game.nim**

```nim
uClass AOverlapped of AActor:
  (Blueprintable, BlueprintType)
  uprops(EditAnywhere, BlueprintReadOnly, Category = "Door Settings"):
    triggerVolume: UBoxComponentPtr

  ufuncs:
    proc doorAction(OverlappedComponent: UPrimitiveComponentPtr, OtherActor: AActorPtr, OtherComp: UPrimitiveComponentPtr,
                           OtherBodyIndex: int32, bFromSweep: bool,
                               SweepResult: var FHitResult) =
      log "Over Me"
  proc constructor(initializer: FObjectInitializer) =
    self.triggerVolume = createDefaultSubobject[UBoxComponent](initializer,
      n"TriggerVolume")
    self.triggerVolume.setCollisionProfileName(n"Trigger")
    discard self.setRootComponent(self.triggerVolume)
    bindUFunc(self.triggerVolume.onComponentBeginOverlap, self, n"doorAction")

```

</details>
   
<details><summary>the "stack trace"</summary>

```sh
[2024.06.20-18.41.40:265][  0]LogThreadingWindows: Error: Runnable thread Background Worker #14 crashed.
[2024.06.20-18.41.40:268][  0]LogWindows: Error: === Critical error: ===
[2024.06.20-18.41.40:268][  0]LogWindows: Error:
[2024.06.20-18.41.40:268][  0]LogWindows: Error: Fatal error!
[2024.06.20-18.41.40:268][  0]LogWindows: Error:
[2024.06.20-18.41.40:268][  0]LogWindows: Error: Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffffffffffff
[2024.06.20-18.41.40:268][  0]LogWindows: Error:
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffed9259b35 UnrealEditor-CoreUObject.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffed926d0c2 UnrealEditor-CoreUObject.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffed92a8a7b UnrealEditor-CoreUObject.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffed9202963 UnrealEditor-CoreUObject.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffed9264a88 UnrealEditor-CoreUObject.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffed91f71ee UnrealEditor-CoreUObject.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffed9199944 UnrealEditor-CoreUObject.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffec9b124c5 UnrealEditor-Core.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffec9b121ff UnrealEditor-Core.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffec9b3a155 UnrealEditor-Core.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffec9b023d0 UnrealEditor-Core.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffec9d07c93 UnrealEditor-Core.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffeca16c93d UnrealEditor-Core.dll!UnknownFunction []
[2024.06.20-18.41.40:268][  0]LogWindows: Error: [Callstack] 0x00007ffeca1602b7 UnrealEditor-Core.dll!UnknownFunction []
[2024.06.20-18.41.40:269][  0]LogWindows: Error: [Callstack] 0x00007fff1edc257d KERNEL32.DLL!UnknownFunction []
[2024.06.20-18.41.40:269][  0]LogWindows: Error:
[2024.06.20-18.41.40:269][  0]LogWindows: Error: Crash in runnable thread Background Worker #14
[2024.06.20-18.41.40:277][  0]LogExit: Executing StaticShutdownAfterError
[2024.06.20-18.41.40:278][  0]LogWindows: FPlatformMisc::RequestExit(1, FRunnableThreadWin::GuardedRun.ExceptionHandler)
[2024.06.20-18.41.40:278][  0]LogWindows: FPlatformMisc::RequestExitWithStatus(1, 3, FRunnableThreadWin::GuardedRun.ExceptionHandler)
[2024.06.20-18.41.40:279][  0]LogCore: Engine exit requested (reason: Win RequestExit)
```
</details>