Praises Be to 4.2
Now in 4.2 I get exact crash information!
Thanks Epic!
[2014.06.09-04.39.01:395] 66]LogWindows: === Critical error: ===
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0xffffffff
[2014.06.09-04.39.01:395] 66]LogWindows: Rendering thread exception:
Fatal error!
FGeneratedMeshSceneProxy::DrawDynamicElements() 0xd6c77f80 + 23 bytes [File=c:\users\rama\documents\unreal projects\victorygame\source\victorygame\private\dynamicmesh\victorymeshcompbase.cpp:148] [in C:\Users\Rama\Documents\Unreal Projects\VictoryGame\Binaries\Win64\UE4Editor-VictoryGame.dll]
FTranslucentPrimSet::RenderPrimitive() 0xdbdcbd0e + 14 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\renderer\private ranslucentrendering.cpp:511] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-Renderer.dll]
FDeferredShadingSceneRenderer::RenderTranslucency() 0xdbdcc601 + 289 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\renderer\private ranslucentrendering.cpp:614] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-Renderer.dll]
FDeferredShadingSceneRenderer::Render() 0xdbc37591 + 8 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\renderer\private\deferredshadingrenderer.cpp:734] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-Renderer.dll]
RenderViewFamily_RenderThread() 0xdbd2a1f9 + 0 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\renderer\private\scenerendering.cpp:919] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-Renderer.dll]
TGraphTask<`FRendererModule::BeginRenderingViewFamily'::`11'::EURCMacro_FDrawSceneCommand>::ExecuteTask() 0xdbcfab80 + 0 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\core\public\async askgraphinterfaces.h:635] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-Renderer.dll]
FTaskThread::ProcessTasks() 0xe2546142 + 0 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\core\private\async askgraph.cpp:321] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-Core.dll]
FTaskThread::ProcessTasksUntilQuit() 0xe25462fd + 0 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\core\private\async askgraph.cpp:173] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-Core.dll]
RenderingThreadMain() 0xe3486229 + 0 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\rendercore\private\renderingthread.cpp:236] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-RenderCore.dll]
FRenderingThread::Run() 0xe34866a9 + 0 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\rendercore\private\renderingthread.cpp:319] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-RenderCore.dll]
FRunnableThreadWin::Run() 0xe27ac809 + 0 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:75] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-Core.dll]
FRunnableThreadWin::GuardedRun() 0xe27a6571 + 8 bytes [File=e:\victoryue4\unrealengine-4.2\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:25] [in E:\VictoryUE4\UnrealEngine-4.2\Engine\Binaries\Win64\UE4Editor-Core.dll]
Address = 0x776b652d (filename not found) [in C:\Windows\system32\kernel32.dll]
Address = 0x777ec521 (filename not found) [in C:\Windows\SYSTEM32
tdll.dll]
Address = 0x777ec521 (filename not found) [in C:\Windows\SYSTEM32
tdll.dll]
That line looks like this:
FMaterialRenderProxy* MaterialProxy = NULL;
if(bWireframe)
{
MaterialProxy = &WireframeMaterialInstance;
}
else
{
MaterialProxy = Material->GetRenderProxy(IsSelected()); //<- Crash
}
That Material was expected to have been during the initialization like so
// Grab material
Material = Component->GetMaterial(0);
if(Material == NULL)
{
Material = UMaterial::GetDefaultMaterial(MD_Surface);
}
I thought the issue was that Material was null
Crash protection does not catch this, it seems as though Material is valid!
Something else is causing the crash on this line!!!
//CRASH PROTECITON
if(!Material)
{
return;
}
else
{
MaterialProxy = Material->GetRenderProxy(IsSelected()); //crash
}
It Is the Material
Actually it is the Material
If I do an IsValidLowLevel() check, Material does not pass and the function exits, and there is no crash!
There’s also no mesh visible though…
//CRASH PROTECITON
if(!Material || !Material->IsValidLowLevel())
{
return;
}
else
{
MaterialProxy = Material->GetRenderProxy(IsSelected()); //never gets here
}
**Invalid Material Crash Protection**
I made it official now, and it is firing off constantly!
The material is clearly invalid!
```
//CRASH PROTECITON
if(!Material || !Material->IsValidLowLevel())
{
UE_LOG(Victory,Error,TEXT("UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!"));
return;
}
else
{
MaterialProxy = Material->GetRenderProxy(IsSelected());
}
```
Something is Really Wrong
I tried 3 different materials that I know are valid, as I use them elsewhere in my game code during runtime, and I am getting the materials via static constructor helper so I would know if they were not being found (editor gives a CDO error if the materials are not valid when found via static constructor helper)
Now that I added the log errors above for the material, I am also seeing this error
LogUObjectArray:Warning: Other object in slot
full log
[2014.06.09-05.11.03:043][624]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!
[2014.06.09-05.11.03:053][625]LogUObjectArray:Warning: Other object in slot
[2014.06.09-05.11.03:054][625]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!
[2014.06.09-05.11.03:064][626]LogUObjectArray:Warning: Other object in slot
[2014.06.09-05.11.03:065][626]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!
[2014.06.09-05.11.03:075][627]LogUObjectArray:Warning: Other object in slot
[2014.06.09-05.11.03:076][627]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!
[2014.06.09-05.11.03:087][628]LogUObjectArray:Warning: Other object in slot
[2014.06.09-05.11.03:087][628]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!
[2014.06.09-05.11.03:098][629]LogUObjectArray:Warning: Other object in slot
[2014.06.09-05.11.03:099][629]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!
[2014.06.09-05.11.03:115][630]LogUObjectArray:Warning: Other object in slot
[2014.06.09-05.11.03:116][630]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!
[2014.06.09-05.11.03:122][631]LogUObjectArray:Warning: Other object in slot
[2014.06.09-05.11.03:122][631]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!
[2014.06.09-05.11.03:140][632]LogUObjectArray:Warning: Other object in slot
[2014.06.09-05.11.03:150][632]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!
[2014.06.09-05.11.03:151][632]LogUObjectArray:Warning: Other object in slot
[2014.06.09-05.11.03:152][632]Victory:Error: UVictoryMeshCompBase::DrawDynamicElements>> The Material for this Component is not valid!!!