Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

What is causing this crash when encoding lightmaps?

Hi there,

We're under a lot of pressure to get something done asap, but we've run into a nasty issue where Unreal4 is crashing right near the end of a very intensive lighting procedure, apparently during the lightmap encoding process.

While it might be something we did wrong, the engine certainly isn't making it clear what it is and because the crash happens at the end of compiling lighting, this would be an extremely time intensive thing to figure out without help.

Call stack follows:

MachineId:57F60DF5478BDA0901A0509259C63B87 EpicAccountId:2ff5e32898f54806ad9f63e9b229fd65

Unknown exception - code 00000001 (first/second chance not available)

Fatal error: [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\RenderCore\Private\RenderResource.cpp] [Line: 118] A FRenderResource was deleted without being released first!

KERNELBASE + 109229 bytes UE4Editor_Core!FOutputDeviceWindowsError::Serialize() + 292 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95] UE4Editor_Core!FMsg::Logf_VA() + 463 bytes [d:\buildfarm\buildmachine++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:531] UE4Editor_RenderCore!FRenderResource::~FRenderResource() + 121 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\rendercore\private\renderresource.cpp:120] UE4Editor_Engine!FColorVertexBuffer::`vector deleting destructor'() + 127 bytes UE4Editor_Engine!FStaticMeshComponentLODInfo::CleanUp() + 401 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\staticmeshcomponent.cpp:1802] UE4Editor_Engine!TArray::RemoveAt() + 90 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\containers\array.h:1430] UE4Editor_Engine!UStaticMeshComponent::SetLODDataCount() + 123 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\staticmeshrender.cpp:148] UE4Editor_Engine!FStaticMeshStaticLightingTextureMapping::Apply() + 429 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\staticmeshlight.cpp:221] UE4Editor_UnrealEd!FLightmassProcessor::ProcessMapping() + 288 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\lightmass\lightmass.cpp:3666] UE4Editor_UnrealEd!FLightmassProcessor::ProcessAvailableMappings() + 304 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\lightmass\lightmass.cpp:3703] UE4Editor_UnrealEd!FLightmassProcessor::CompleteRun() + 192 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\lightmass\lightmass.cpp:2871] UE4Editor_UnrealEd!FStaticLightingSystem::FinishLightmassProcess() + 883 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\staticlightingsystem\staticlightingsystem.cpp:1908] UE4Editor_UnrealEd!FStaticLightingManager::ProcessLightingData() + 234 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\staticlightingsystem\staticlightingsystem.cpp:118] UE4Editor_UnrealEd!FStaticLightingSystem::UpdateLightingBuild() + 2008 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\staticlightingsystem\staticlightingsystem.cpp:2056] UE4Editor_UnrealEd!UEditorEngine::UpdateBuildLighting() + 100 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\staticlightingsystem\staticlightingsystem.cpp:2150] UE4Editor_UnrealEd!UUnrealEdEngine::Tick() + 177 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\unrealedengine.cpp:388] UE4Editor!FEngineLoop::Tick() + 4179 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launchengineloop.cpp:2257] UE4Editor!GuardedMain() + 1404 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:142] UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:126] UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:202] UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

Product Version: Not Selected
more ▼

asked May 05 '15 at 02:27 AM in Bug Reports

avatar image

1 1 1 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

The assert is happening because FStaticMeshComponentLODInfo is being deleted directly but it has rendering resources, which need to be released first. From looking at the code, this will only happen on a mesh with LODs that has painted vertex colors. There might be some more criteria.

Here's a potential fix - I haven't tested it yet because I haven't repro'ed the crash successfully yet.

In UStaticMeshComponent::SetLODDataCount, add the portion just before the RemoveAt call

     if (MaxSize < (uint32)LODData.Num())
     // FStaticMeshComponentLODInfo can't be deleted directly as it has rendering resources
     for (int32 Index = MaxSize; Index < LODData.Num(); Index++)

     // call destructors
     LODData.RemoveAt(MaxSize, LODData.Num() - MaxSize);

Let me know if that fixes it, and I will check it in here.

more ▼

answered May 06 '15 at 07:39 PM

avatar image

1.9k 31 11 74

avatar image DanielW STAFF May 07 '15 at 06:44 PM

This was the fix, and is now checked in

Change 2541394 by Daniel.Wright@DWRIGHT-G5038-UE4_CODE2 on 2015/05/07 14:39:22 Fix for crash importing lighting with static meshes with LODs that have been vertex painted

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi GreatBird,

Would you be able to upload your Log as well (Project Folder > Saved > Logs)?

I've searched through our bug database but have not found any crashes similar to this one. However, I did find two answerHub post that the users were able to resolve their issue. These may be a help in the interim while I'm looking into this and trying to reproduce.

This user gave more details, which I am trying to reproduce this on my end. https://answers.unrealengine.com/questions/151509/a-frenderresource-was-deleted-without-being-releas.html

The other, while not as much information, the user found that deleting some asset and rebuilding was able to get this resolved in their case. https://answers.unrealengine.com/questions/220217/crushed-after-building-code-line-118.html

These do not solve the underlying issue for the crash though.

Thanks for your help and patience while I look into this.


more ▼

answered May 05 '15 at 04:03 PM

avatar image

Tim Hobson ♦♦ STAFF
48.7k 888 103 880

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question