We have started getting frequent IDE crashes in our codebase, which are still occurring on latest nightly.
I ran IDE in Debug, and it appears to be hitting an assert in BeefIRBuilder.cpp:2601
BF_ASSERT(irValue.mId >= 0);
Inspecting surrounding state, it appears to be hitting the assert when trying to generate IR for the comptime-generated constant Hero.INSTANCE_SIZE, which is emitted as such (in the Hero class type):
const uint32 RSDK_INSTANCE_SIZE = Memory.AlignPOW2((.)typeof(Self).InstanceStride);
For context, Memory.AlignPOW2 is a ConstEval function defined as:
[Comptime(ConstEval = true)]
public static uint32 AlignPOW2(uint32 size)
{
uint32 v = size;
v--;
v |= v >> 1;
v |= v >> 2;
v |= v >> 4;
v |= v >> 8;
v |= v >> 16;
v++;
return v;
}
For additional context, Hero is a class that has a fair bit of extensions.
We have started getting frequent IDE crashes in our codebase, which are still occurring on latest nightly.
I ran IDE in Debug, and it appears to be hitting an assert in
BeefIRBuilder.cpp:2601Inspecting surrounding state, it appears to be hitting the assert when trying to generate IR for the comptime-generated constant
Hero.INSTANCE_SIZE, which is emitted as such (in theHeroclass type):For context,
Memory.AlignPOW2is aConstEvalfunction defined as:For additional context,
Herois a class that has a fair bit of extensions.