AllEnabledTickFunctions.Remove Crashes 4.12

I recently upgraded from 4.9 to 4.12 because of platform requirements, and I keep getting this random crash when playing one of my levels.

[2016.06.13-18.06.19:409][292]LogCrashTracker: 


[2016.06.13-18.06.19:409][292]LogWindows:Error: === Critical error: ===
Assertion failed: AllEnabledTickFunctions.Remove(TickFunction) == 1 [File:D:\Build\++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp] [Line: 872] 





[2016.06.13-18.06.19:483][292]LogExit: Executing StaticShutdownAfterError
[2016.06.13-18.06.19:546][292]LogWindows: FPlatformMisc::RequestExit(1)
[2016.06.13-18.06.19:547][292]Log file closed, 06/13/16 14:06:19

It doesn’t crash on my test level, but it does crash on one of the games levels. I have seen people with this problem before and attribute it to AI, supposedly this was fixed in 4.12 but I still see it.

Note: Removing all AI in the level does prevent the crash from happening.

If there is something in the source code that I need to change I will do it.

Thanks!

I really hope there is help or a fix, its making it impossible to play test and make any progress. When it crashes constantly with the same error. This never happened in 4.9

Me too. Random, but often crashes. All worked smoothly before update to 4.12. I have ticks enabled (and don’t even use it manually) only in AI Controllers.

[2016.06.14-14.01.47:133][795]LogWindows:Error: === Critical error: ===
Assertion failed: AllEnabledTickFunctions.Remove(TickFunction) == 1 [File:D:\Build\++UE4+Release-4.12+Compile\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp] [Line: 872]

Hello ,

This seems to be an issue that arises from conversion and has been reported quite a few times but never actually entered into our database. As far as fixing the problem, you may be able to avoid it by migrating your blueprints/content from your old project directly into a new 4.12 project instead of converting the entire project. A few other users have mentioned workarounds for the issue as well in these other threads but those would be only for a temporary solution until we get the root problem solved.

If the migration of the content doesn’t fix the problem for you, would either of you be willing to share your project (preferably the one prior to conversion) as a reproduction case? If you would like to send it, but would also prefer to keep it private, you could send it to me through a private message on our [forums][1].

[1]:

I’ll try migrating instead. if that doesn’t work I will send you the project, thanks for the reply Matthew!

Note: I don’t have the old project conversion happened a week ago and I only noticed the issue this past day.

Im uploading my project and I will PM you the link when its done, its only the 4.12 I couldnt get an older version, but this should still help solve the issue.

Hello, i need to fix some post-migration bugs to check everything and be sure, but for now it looks like the problem of crashes is solved.

So I think i fixed this. Recreating the Base AI pawn and re-parenting all child enemy pawns seemed to have fixed the issue, so the original Base AI Pawn must have been corrupted somehow.

That’s what the general problem is for most users who run into this. The idea is that the conversion causes that to occur but migrating the content doesn’t. I would suggest, even if you don’t expect this to occur again, to start keeping backups from previous versions of the editor whenever you update. There’s no telling what you may run into as this is an ever-changing editor with new features which introduce new bugs.

I’ll definitely keep that in mind then, thanks again Matt!

Sorry this actually is not solved, I thought it was but spoke too soon, It doesn’t matter if I create a brand new pawn and a brand you animation bp it still crashes.

Im grabbing a 4.9 version directly from the server and im gonna see if that works, else I’ll need you guys to take a look at whats going on, wil keep you updated.

After a recent upgrade from 4.10 to 4.12, I’m also seeing this assert triggered. I haven’t completely narrowed down the problem, but it seems to occur as a result of settingPrimaryActorTick.TickInterval or PrimaryComponentTick.TickInterval to non-zero values at runtime.

Matt I tried migrating from 4.9 to 4.12 and it still didnt work for me, this is an extremely urgent issue as we are releasing in 2 months, I’m going to upload the build overnight. Please let me know if you have any other suggestions.

Update – I believe that this crash occurs as a result of setting PrimaryComponentTick.TickInterval to a non-zero value at all, whether at runtime as the result of a tick, or in the constructor of the components’ containing actor, using code like this:

	for (UActorComponent* ActorComponent : GetComponents())
	{
		ActorComponent->PrimaryComponentTick.TickInterval = 0.1f;
	}

Hey, yeah I actually changed a couple of BP’s that had a tick rate of 0.1 and 0.08 to 0.0 and im not experiencing the crash at all for now. usualy it crashes instantly. I think this may have finally solved it. However this indeed is a major bug that needs to get fixed. Im still going to upload my build for Epic to use as a test case.

That’s good to hear; I don’t think disabling the use of a feature quite counts as a solution. :slight_smile:

Update on the TickInterval crash situation:

It looks like that the problem arises when a TickFunction with a TickInterval is a prerequisite to another TickFunction.

In that case, the prerequisite function is added to the TickFunctionsToReschedule list twice, once as a result of the recursive call to Prereq->QueueTickFunctionParallel() and then again a second time in the later call to QueueTickFunctionParallel() from the lambda in FTickTaskManager::StartFrame().

Any advice? I’m wary of messing with this stuff given how deep it is. As a test I tried adding a member FThreadSafeBool bInReschduleList; to FTickFunction and making AtomicSet() checks/call to that member before it’s added to TickFunctionsToReschedule (and when it’s removed), but that didn’t work out because FThreadSafeBool can’t have a copy constructor and some of FTickFunction’s children are required to have children. (And I’m not sure that that would have been a good idea even if it did work.)

Nice find, hopefully someone at Epic can better figure out how to fix this.I really like having different tick intervals for optimization.

Are you using custom tick intervals by any chances? I’m experiencing the same problem with 4.11 or 4.12 (4.10 works fine).
I’ve been able to find the source of crashes - they happen when any of my actors uses non-default tick values. When I reset tick intervals to default, I can migrate to 4.12 no problem. As soon as I set my previous custom values (or any value) in those blueprints, my level crashes during play and next time I launch my project related blueprints crash immediately on opening.