Jump to content

Error that occurs intermittently in a specific function.


photo

Recommended Posts

hello.

I understand that the function below creates a new Material.

void CUnigineMaterialManager::Set_Object_Material_Property(Unigine::ObjectPtr object,
	OBJECT_MATERIAL_MASK changeMask,
	Unigine::Math::vec4 property,
	int iSurface
)
{
	return;
	switch (changeMask)
	{
	case OBJECT_MATERIAL_MASK::METALNESS:
		object->setMaterialParameterFloat4("metalness", property, iSurface);
		break;
	case OBJECT_MATERIAL_MASK::ROUGHNESS:
		object->setMaterialParameterFloat4("roughness", property, iSurface);
		break;
	case OBJECT_MATERIAL_MASK::ALBEDO_COLOR:
		object->setMaterialParameterFloat4("albedo_color", property, iSurface);
		break;
	case OBJECT_MATERIAL_MASK::UV_TRANSFORM:
		object->setMaterialParameterFloat4("uv_transform", property, iSurface);
		break;
	case OBJECT_MATERIAL_MASK::MIRROR_ROTATION:
		object->setMaterialParameterFloat4("reflection_pivot_rotation", property, iSurface);
		break;
	case OBJECT_MATERIAL_MASK::EMMISIVECOLOR:
		object->setMaterialParameterFloat4("emission_color", property, iSurface);
		break;
	case OBJECT_MATERIAL_MASK::AUXILIARYCOLOR:
		object->setMaterialParameterFloat4("auxiliary_color", Unigine::Math::vec4(1.0f, 0.0f, 0.0f, 0.5f), iSurface);
		break;
	}
}


However, after creating a new Material, Assertion Fail is displayed, and then an error occurs in Unigine_x64d.dll!Engine::iterate().

---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Assertion failed!

Program: ...VI_Project\KOVIArchiS_x64\Execute\Unigine_x64d.dll
File: D:\BA\work\304c3c27bd7fb59b\source\engine\...\Memory.cpp
Line: 500

Expression: (p->used_map[g] >> i) & 1

For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts

(Press Retry to debug the application - JIT must be enabled)
---------------------------
중단(A)   다시 시도(R)   무시(I)   
---------------------------


ntdll.dll!00007ff9a59cf632()	  없음
ntdll.dll!00007ff9a59d83f2()	  없음
ntdll.dll!00007ff9a59d86da()	  없음
ntdll.dll!00007ff9a59de361()	  없음
ntdll.dll!00007ff9a58f5bf0()	  없음
ntdll.dll!00007ff9a58f47b1()	  없음
ucrtbase.dll!00007ff9a382f05b()	  없음
Unigine_x64d.dll!Memory::deallocate(void * ptr)  679	C++
[인라인 프레임] Unigine_x64d.dll!Unigine::VectorAllocator::deallocate(char *)  25	C++
[인라인 프레임] Unigine_x64d.dll!Unigine::Vector<Unigine::String,short,Unigine::VectorAllocator>::dealloc(char * ptr)  1208	C++
[인라인 프레임] Unigine_x64d.dll!Unigine::Vector<Unigine::String,short,Unigine::VectorAllocator>::{dtor}()  249	C++
[인라인 프레임] Unigine_x64d.dll!Unigine::HashMap<int,Material::DataPass,unsigned int>::{dtor}()  69	C++
Unigine_x64d.dll!Material::~Material()  727	C++
[외부 코드]	
Unigine_x64d.dll!Material::~Material()  693	C++
[외부 코드]	
[인라인 프레임] Unigine_x64d.dll!Object::clearMaterialInherit(int)  759	C++
Unigine_x64d.dll!Object::~Object()  82	C++
[외부 코드]	
Unigine_x64d.dll!Unigine::UnigineBaseObject::processDeleteQueue()  97	C++
Unigine_x64d.dll!Engine::swap()  2911	C++
Unigine_x64d.dll!Engine::iterate()  2453	C++
>	KVXmoduleKitD.dll!kvx::video::CUnigineEngine::Present(kvx::video::U_RENDERING_TYPE renderType)  1604	C++
KVXmoduleKitD.dll!kvx::KVXrenderDeviceGo1(kvx::IKVXDevice * pDevice, int bDonotPresent)  1237	C++
OperatorD.dll!CVROperator::Render(int bPrint, CDC * pPrintDC)  670	C++
OperatorD.dll!OPER_Render(void * oper, int bPrint, CDC * pPrintDC)  734	C++
KoviArchiS64D.exe!CVRView::OnPaint()  749	C++

The reason this is difficult to solve is that it doesn't always happen.
If I comment out the above code, the problem does not occur.

I'm not sure how to approach it.
I am attaching the place where the error occurred, so please tell me when the error occurred.

thank you

Link to comment

KOVIAHN

Have you tried to check if material parameter or even surface id are really exists in this object?

Based only on this small sample code it would be hard to guess what's going on here. If you can replicate this issue on a very simplified test project with only part of your content (or even synthetic cubes) - it would be great. That will allow us to find the root cause of this issue much faster.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Dear silent

I am  analyzing the cause of the termination by referring to the unallocated object (an object that has actually been created but has never been rendered).

I hope this can be fixed, but I'll try to get back to you if the problem reoccurs.

Thank you very much!


 

  • Thanks 1
Link to comment
×
×
  • Create New...