[Crash] Checking in with Lock Read-only Levels enabled

So if you have Lock Read-only Levels checked. Often, you can get the editor to crash when submitting a the map file you currently have open. As soon as the map file get’s the lock set, the editor comes down.

const bool LevelLocked = !FLevelUtils::IsLevelLocked(Actor->GetLevel()); Seems like a funny variable, should probably be const bool LevelUnLocked;.

else
{
	for (FSelectionIterator It(GetSelectedActorIterator()); It; ++It)
	{
		AActor* Actor = static_cast<AActor*>(*It);
		checkSlow(Actor->IsA(AActor::StaticClass()));

		if (Actor->GetWorld() == GWorld)
		{
			const bool IsTemplate = Actor->IsTemplate();
			const bool LevelLocked = !FLevelUtils::IsLevelLocked(Actor->GetLevel());
			check(IsTemplate || LevelLocked); <---!!! This :(

			SingleActor = Actor;
		}

Hi ,

I am not familiar with the option you’re referring to. Where is the option to change ‘Lock Read-Only Levels’ and which code file is the code that you posted contained in? I’ll need these to reproduce the crash so that I can look into reporting it.

Right click in the empty space of the levels tab->Lock->Lock Read-only Levels

I was able to find that option but I cannot get the crash to occur. What do you mean by ‘submitting a the map file’? I’ve tried having 2 maps, saving both of them, loading them both, making them visible/invisible, changing the order, renaming them, manually locking/unlocking each one.

  • open the map
  • enable lock read-only levels
  • submit the map to perforce
  • alternatively you could probably set the read only flag on the file in windows, that would probably behave similarly

I’ve reproduced the crash and it seems to be fixed in a future build already but I’ve put a bug in for it just in case. For your reference, the bug number is UE-15771. I hope this issue isn’t present in 4.8 Preview 3 but I can’t make any guarantees.

Have a nice day,