Page 1 of 1

Weird exception when creating new entity

Posted: Sat Oct 07, 2017 6:56 pm
by fido9dido
I created new entity in C++ and I have this error
I commented my Code and this error appear when I register my component in the editor!!
I created 2 other components and they are working fine and they are the same code

Note My Code compiler but editor crash and this error shows
Exception thrown: read access violation. pData was 0xFFFFFFFFFFFFFFF4.

this where the code breaks in CryString.h

Code: Select all

template<class T> inline void CryStringT<T >::_FreeData(StrHeader* pData) { if (pData->nRefCount >= 0) // Not empty string.
When I comment the follow code it works-

Code: Select all

void CGeomComponent::Register(Schematyc::IEnvRegistrar& registrar) { Schematyc::CEnvRegistrationScope scope = registrar.Scope(IEntity::GetEntityScopeGUID()); { Schematyc::CEnvRegistrationScope componentScope = scope.Register(SCHEMATYC_MAKE_ENV_COMPONENT(CGeomComponent)); { } } } CRY_STATIC_AUTO_REGISTER_FUNCTION(&CGeomComponent::Register)

Re: Weird exception when creating new entity

Posted: Mon Oct 09, 2017 7:15 am
by cry-alex

would it be possible to post the whole code of the component here ? I can't spot something wrong in the code you posted. Thanks.