Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#5733 closed defect (needsinfo)

Assertion failed: m_ComponentCaches.find(ent) == m_ComponentCaches.end()

Reported by: Arawwn Owned by:
Priority: Should Have Milestone:
Component: Core engine Keywords:
Cc: Patch:

Description

I use with my game the following mods: AutoCIV mod and Milleinum A.D

Assertion failed: "m_ComponentCaches.find(ent) == m_ComponentCaches.end()" Location: ComponentManager.cpp:826 (CComponentManager::AllocateEntityHandle)

Call stack:

CComponentManager::AllocateEntityHandle (componentmanager.cpp:826)

this = (unavailable) ent = 1 (0x00000001)

CComponentManager::AddEntity (componentmanager.cpp:871)

this = (unavailable) templateName = 0x00EFF64C -> (unsupported basic_string<wchar_t,char_traits<wchar_t> >) ent = 1 (0x00000001) handle =

m_Id = 127713920 (0x079CC280) m_ComponentCache = 0x01180000 -> { numInterfaces = 547269070 (0x209EA9CE), interfaces = [1] { 0x010051ED ->

m_EntityHandle =

m_Id = 16777218 (0x01000002) m_ComponentCache = 0x00000001

m_SimContext = 0x12050000 ->

m_ComponentManager = (unavailable - internal error)

m_UnitManager = (unavailable - internal error)

m_Terrain = (unavailable - internal error)

m_SystemEntity =

m_Id = (unavailable - internal error)

m_ComponentCache = (unavailable - internal error)

} }

msg =

m_Cached = (unique_ptr<JS::PersistentRooted<JS::Value>,default_delete<JS::PersistentRooted<JS::Value> > >)

entity = 0 (0x00000000)

it = (unsupported _Tree_const_iterator<_Tree_val<_Tree_simple_types<pair<basic_string<char,char_traits<char> > const ,CParamNode> > > >)

CSimulation2::AddEntity (simulation2.cpp:679)

this = (unavailable) templateName = 0x00EFF64C (see above) preferredId = 1 (0x00000001)

CMapReader::ParseEntities (mapreader.cpp:1376)

this = (unavailable) rq =

mContext = 0x21264348 -> (JSContext)

entities = (unsupported vector<Entity >) LINE_1352_ =

m_t0 = 655.39 (0x40847B1FBD151A04) m_description = 0x00A44664 -> "ParseEntities"

currEnt =

templateName = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) entityID = 1 (0x0001) playerID = 0 (0x0000) position =

X =

value = 29429354 (0x01C10E6A)

Y =

value = 0 (0x00000000)

Z =

value = 11295933 (0x00AC5CBD)

rotation =

X =

value = 0 (0x00000000)

Y =

value = 4294745327 (0xFFFC9CEF)

Z =

value = 0 (0x00000000)

MemFunThunk<CGame> (loaderthunks.h:60)

param = 0x3A2BCD40 formal = 0.01 (0x3F847AE147AE147B)

LDR_ProgressiveLoad (loader.cpp:228)

time_budget = 0.01 (0x3F847AE147AE147B) description = 0x00EFF7CC -> [8] { 63498, 126 ('~'), 31042, 65534, 0, 0, 35451, 48274 } max_chars = 100 (0x00000064) progress_percent = 0x00EFF784 -> 0 (0x00000000) ret = 4607182418800017408 (0x3FF0000000000000) elapsed_time = 655.39 (0x40847B1FBCF0522D)

ProgressiveLoad (main.cpp:266)

description = [100]

63498 126 ('~') 31042 65534 0 0 35451 48274 31519 16516 63656 239 ...

profile2 =

m_Name = 0x00A21C3C -> "progressive load"

progress_percent = 0 (0x00000000) e = 0x00EFF7D0 ->

(exception) m_msg = 0x40847B1F -> [8] { 0, 0, 0, 0, 0, 0, 0, 0 }

Frame (main.cpp:364)

realTimeSinceLastFrame = 0.005463 (0x3BB3031A) time = 655.39 (0x40847B1FBAB32C84) profile2 =

m_Name = 0x00A21CD8 -> "frame"

profile2 =

m_Name = 0x40847B1F (see above)

RunGameOrAtlas (main.cpp:634)

argc = 1 (0x00000001) argv = 0x02CC0008 -> 0x02CC0028 -> "E:\Jeux\0 A.D\binaries\system\pyrogenesis.exe" replayFile =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 47 ('/')

modsToInstall = (unsupported vector<Path >) scriptEngine =

(Singleton<ScriptEngine>) m_Runtimes = (unsupported list<JSRuntime const * >)

args =

m_Args = (unsupported vector<pair<CStr8,CStr8> >) m_Arg0 =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 92 ('\')

m_ArgsWithoutName = (unsupported vector<CStr8 >)

res = 3.13185e-010 (0x3DF5859C43F03174) modPath =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 60713

paths =

m_root =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 600

m_rdata =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 48876

m_gameData =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 0

m_userData =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 1

m_config =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 5

m_cache =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 80 ('P')

m_logs =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 44686

replay =

m_Stream = 0x3DF5859C -> (basic_istream<char,char_traits<char> >)

mod =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 0

zip =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 16416

mods = (unsupported vector<CStr8 >) paths =

m_root =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 65503

m_rdata =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 0

m_gameData =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 63916

m_userData =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 47155

m_config =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 0

m_cache =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 11120

m_logs =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 0

builder =

m_VFS = (shared_ptr<IVFS>) m_Files = (unsupported vector<Path >) m_TempDir =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 80 ('P')

m_NumBaseMods = 2010754702 (0x77D9AE8E)

installedMods = (unsupported vector<CStr8 >) installer =

m_VFS = (shared_ptr<IVFS>) m_ModsDir =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 42728

m_TempDir =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 3056

m_CacheDir =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 2

m_InstalledMods = (unsupported vector<CStr8 >)

paths =

m_root =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 65503

m_rdata =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 0

m_gameData =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 63916

m_userData =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 47155

m_config =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 0

m_cache =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 11120

m_logs =

path = (unsupported basic_string<wchar_t,char_traits<wchar_t> >) separator = 0

SDL_main (main.cpp:680)

argc = 1 (0x00000001) argv = 0x02CC0008 (see above)

main_utf8 (sdl_windows_main.c:126)

argc = 1 (0x00000001) argv = 0x02CC0008 (see above)

wmain (sdl_windows_main.c:151)

argc = 1 (0x00000001) wargv = 0x01189670 -> 0x01189678 -> 69 (0x0045) wenvp = 0x01184000 -> 39424 (0x9A00) argv = 0x02CC0008 (see above) retval = 0 (0x00000000) i = 1 (0x00000001)

CallStartupWithinTryBlock (wseh.cpp:364)

ret = 9824080 (0x0095E750)

RtlGetAppContainerNamedObjectPath (:0)

RtlGetAppContainerNamedObjectPath (:0)

errno = 0 (No error reported here) OS error = 0 (no error code was set)

AND

Much to our regret we must report the program has encountered an error.

Please let us know at http://trac.wildfiregames.com/ and attach the crashlog.txt and crashlog.dmp files.

Details: unhandled exception (Breakpoint)

Location: unknown:0 (?)

Call stack:

(error while dumping stack: No stack frames found) errno = 13 (Insufficient access rights to open file) OS error = 0 (no error code was set)

Change History (3)

comment:1 by Silier, 4 years ago

Resolution: needsinfo
Status: newclosed

Hello, if it does not happen without mods, we cannot do anything, so please let us know if you get this without these two mods.
If it is mod related issue, please report it to the mod authors.
Best place would be at related forum threads:
https://wildfiregames.com/forum/index.php?/topic/24649-autociv-mod-0ad-enhancer/
https://wildfiregames.com/forum/index.php?/forum/297-1000-ad/

comment:2 by elexis, 4 years ago

Milestone: Backlog
Summary: 2 windows of errorsAssertion failed: m_ComponentCaches.find(ent) == m_ComponentCaches.end()

if it does not happen without mods, we cannot do anything If it is mod related issue

It could be that there is an error in the pyrogenesis engine that can be triggered by mods, the engine is supposed to not crash if one passes wrong user input (templates). If there is a bug in the engine, it could possibly be triggered in the future by the 0ad public mod too.

Assuming a23b code:

Assertion failed: "m_ComponentCaches.find(ent) == m_ComponentCaches.end()" Location: ComponentManager?.cpp:826

That's in

CEntityHandle CComponentManager::AllocateEntityHandle(entity_id_t ent)
	{
		// Interface IDs start at 1, and SEntityComponentCache is defined with a 1-sized array,
		// so we need space for an extra m_InterfaceIdsByName.size() items
		SEntityComponentCache* cache = (SEntityComponentCache*)calloc(1,
			sizeof(SEntityComponentCache) + sizeof(IComponent*) * m_InterfaceIdsByName.size());
		ENSURE(cache != NULL);
		cache->numInterfaces = m_InterfaceIdsByName.size() + 1;
	
		ENSURE(m_ComponentCaches.find(ent) == m_ComponentCaches.end());
		m_ComponentCaches[ent] = cache;
	
		return CEntityHandle(ent, cache);
	}

This ENSURE was changed in r22300. It says

Destroying INVALID_ENTITY is valid

Which could one give the idea that perhaps an INVALID_ENTITY was destroyed by the mod, or an entity twice or so.

If Arawwn uploads a replay one could check what exactly happened (otherwise one has to speculate and infer and possibly can't find out).

comment:3 by Arawwn, 4 years ago

Hi thanks for your answers! I have reinstall the game, check if an error appeared in a match, nope, and with the 2 mods activated, none errors, I don't no if this is my installation who failed, or reload of mods with a new installation! If I have some troubles, I post here, thanks again for your quick answers!

Note: See TracTickets for help on using tickets.