0

Not sure if it's a software issue or my incredible programming skills. I'm using UE4.27 and Rider for UE 2021.2.1 for C++ project. Recently I got some strange bug or something else: some changes in the code do not affect the program in any way. For example, there are old logs (Unable to get Owner Actor, AttackMontageN) that still work fine and new logs (NewLog) that didn't work, but there are no errors while building, crashes or anything like this:

 void UMeleeAttackAbility::CommitExecute(const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo* ActorInfo,
                                     const FGameplayAbilityActivationInfo ActivationInfo)
    {
        Super::CommitExecute(Handle, ActorInfo, ActivationInfo);
        const auto Owner = ActorInfo->OwnerActor.Get();
        if (!Owner)
        {
            UE_LOG(LogPRAbilitySystemBase, Error, TEXT("Unable to get Owner Actor"))
            K2_EndAbility();
        }
        UE_LOG(LogPRAbilitySystemBase, Warning, TEXT("NewLog"));
        const int MontageIndex = rand() % 3;
        switch(MontageIndex)
        {
        case 0:
            UE_LOG(LogPRAbilitySystemBase, Warning, TEXT("AttackMontage1"));
            AttackMontage = AttackMontage1;
            break;
        case 1:
            UE_LOG(LogPRAbilitySystemBase, Warning, TEXT("AttackMontage2"));
            AttackMontage = AttackMontage2;
            break;
        case 2:
            UE_LOG(LogPRAbilitySystemBase, Warning, TEXT("AttackMontage3"));
            AttackMontage = AttackMontage3;
            break;
        default:
            break;
        }
        UE_LOG(LogPRAbilitySystemBase, Warning, TEXT("NewLog"));
        //...
    }

I reverted to one very old commit where this code is completely different, but the results in the logs and character behavior are still the same. Also I'm tried to rebuild current project (in Advanced Build Actions) and do some other obvious things such restarting UE4/Rider, etc. Is it Rider problem or it can be something else?

msBirb
  • 3
  • 2
  • Rider is still pretty experimental and there have been some crippling issues recently (although a lot the bugs are fixed on the latest patch). You could try deleting the binaries folder in your intermediates, which will force a complete re-build. It's probably also worth grabbing an update with the arrow at the top right, just incase this issue has been patched out. – George Feb 11 '22 at 08:03
  • @George Hello again! It helped, but temporarily. Now it's happening again. If I delete those folders again, the first compilation succeeds, but changes that done after that don't work. So in order to somehow start the project, I would have to repeat this deletion every time. What can I do with this? – msBirb Feb 12 '22 at 12:19

0 Answers0