==4979== Invalid read of size 4 ==4979== at 0x1E3F3C: operator() (DynamicSubscription.h:43) ==4979== by 0x1E3F3C: _M_get_insert_unique_pos (stl_tree.h:1836) ==4979== by 0x1E3F3C: std::pair, bool> std::_Rb_tree, CDynamicSubscription::CompareIComponent, std::allocator >::_M_insert_unique(IComponent* const&) (stl_tree.h:1889) ==4979== by 0x1E387F: insert (stl_set.h:483) ==4979== by 0x1E387F: CDynamicSubscription::Remove(IComponent*) (DynamicSubscription.cpp:31) ==4979== by 0x1D8442: CComponentManager::RemoveComponentDynamicSubscriptions(IComponent*) (ComponentManager.cpp:627) ==4979== by 0x1D8BFD: CComponentManager::FlushDestroyedComponents() (ComponentManager.cpp:932) ==4979== by 0x1A4175: CSimulation2Impl::UpdateComponents(CSimContext&, CFixed, std::vector > const&) (Simulation2.cpp:566) ==4979== by 0x1AC406: CSimulation2Impl::Update(int, std::vector > const&) (Simulation2.cpp:377) ==4979== by 0x1CAA9B: CTurnManager::Update(float, unsigned long) (TurnManager.cpp:163) ==4979== by 0x313F8A: CGame::Update(double, bool) (Game.cpp:401) ==4979== by 0x162077: Frame (main.cpp:336) ==4979== by 0x162077: RunGameOrAtlas(int, char const**) (main.cpp:531) ==4979== by 0x1537B6: main (main.cpp:571) ==4979== Address 0x67be5418 is 8 bytes inside a block of size 88 free'd ==4979== at 0x4C2D2DB: operator delete(void*) (vg_replace_malloc.c:576) ==4979== by 0x1D8C69: CComponentManager::FlushDestroyedComponents() (ComponentManager.cpp:933) ==4979== by 0x1A4175: CSimulation2Impl::UpdateComponents(CSimContext&, CFixed, std::vector > const&) (Simulation2.cpp:566) ==4979== by 0x1AC406: CSimulation2Impl::Update(int, std::vector > const&) (Simulation2.cpp:377) ==4979== by 0x1CAA9B: CTurnManager::Update(float, unsigned long) (TurnManager.cpp:163) ==4979== by 0x313F8A: CGame::Update(double, bool) (Game.cpp:401) ==4979== by 0x162077: Frame (main.cpp:336) ==4979== by 0x162077: RunGameOrAtlas(int, char const**) (main.cpp:531) ==4979== by 0x1537B6: main (main.cpp:571) ==4979== Block was alloc'd at ==4979== at 0x4C2C21F: operator new(unsigned long) (vg_replace_malloc.c:334) ==4979== by 0x29C110: CCmpOverlayRenderer::Allocate(ScriptInterface&, JS::Handle) (CCmpOverlayRenderer.cpp:40) ==4979== by 0x1D4CAE: CComponentManager::ConstructComponent(CEntityHandle, int) (ComponentManager.cpp:778) ==4979== by 0x1D516F: CComponentManager::AddComponent(CEntityHandle, int, CParamNode const&) (ComponentManager.cpp:705) ==4979== by 0x1D52D3: CComponentManager::AddEntity(std::__cxx11::basic_string, std::allocator > const&, unsigned int) (ComponentManager.cpp:883) ==4979== by 0x1E210B: Script_AddEntity (ComponentManager.cpp:474) ==4979== by 0x1E210B: call&), std::__cxx11::basic_string, std::allocator > > (NativeWrapperDefns.h:75) ==4979== by 0x1E210B: bool ScriptInterface::call, std::allocator >, &CComponentManager::Script_AddEntity>(JSContext*, unsigned int, JS::Value*) (NativeWrapperDefns.h:125) ==4979== by 0x571D3A1: CallJSNative (jscntxtinlines.h:226) ==4979== by 0x571D3A1: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:498) ==4979== by 0x5711A7E: Interpret(JSContext*, js::RunState&) (Interpreter.cpp:2602) ==4979== by 0x571D09C: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:448) ==4979== by 0x571D308: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:517) ==4979== by 0x571DD8E: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value const*, JS::MutableHandle) (Interpreter.cpp:554) ==4979== by 0x59A9EF7: js::jit::InvokeFunction(JSContext*, JS::Handle, unsigned int, JS::Value*, JS::Value*) (VMFunctions.cpp:75) ==4979== ==4979== Invalid read of size 8 ==4979== at 0x1E4009: operator() (DynamicSubscription.h:48) ==4979== by 0x1E4009: _M_get_insert_unique_pos (stl_tree.h:1836) ==4979== by 0x1E4009: std::pair, bool> std::_Rb_tree, CDynamicSubscription::CompareIComponent, std::allocator >::_M_insert_unique(IComponent* const&) (stl_tree.h:1889) ==4979== by 0x1E387F: insert (stl_set.h:483) ==4979== by 0x1E387F: CDynamicSubscription::Remove(IComponent*) (DynamicSubscription.cpp:31) ==4979== by 0x1D8442: CComponentManager::RemoveComponentDynamicSubscriptions(IComponent*) (ComponentManager.cpp:627) ==4979== by 0x1D8BFD: CComponentManager::FlushDestroyedComponents() (ComponentManager.cpp:932) ==4979== by 0x1A4175: CSimulation2Impl::UpdateComponents(CSimContext&, CFixed, std::vector > const&) (Simulation2.cpp:566) ==4979== by 0x1AC406: CSimulation2Impl::Update(int, std::vector > const&) (Simulation2.cpp:377) ==4979== by 0x1CAA9B: CTurnManager::Update(float, unsigned long) (TurnManager.cpp:163) ==4979== by 0x313F8A: CGame::Update(double, bool) (Game.cpp:401) ==4979== by 0x162077: Frame (main.cpp:336) ==4979== by 0x162077: RunGameOrAtlas(int, char const**) (main.cpp:531) ==4979== by 0x1537B6: main (main.cpp:571) ==4979== Address 0x67be5410 is 0 bytes inside a block of size 88 free'd ==4979== at 0x4C2D2DB: operator delete(void*) (vg_replace_malloc.c:576) ==4979== by 0x1D8C69: CComponentManager::FlushDestroyedComponents() (ComponentManager.cpp:933) ==4979== by 0x1A4175: CSimulation2Impl::UpdateComponents(CSimContext&, CFixed, std::vector > const&) (Simulation2.cpp:566) ==4979== by 0x1AC406: CSimulation2Impl::Update(int, std::vector > const&) (Simulation2.cpp:377) ==4979== by 0x1CAA9B: CTurnManager::Update(float, unsigned long) (TurnManager.cpp:163) ==4979== by 0x313F8A: CGame::Update(double, bool) (Game.cpp:401) ==4979== by 0x162077: Frame (main.cpp:336) ==4979== by 0x162077: RunGameOrAtlas(int, char const**) (main.cpp:531) ==4979== by 0x1537B6: main (main.cpp:571) ==4979== Block was alloc'd at ==4979== at 0x4C2C21F: operator new(unsigned long) (vg_replace_malloc.c:334) ==4979== by 0x29C110: CCmpOverlayRenderer::Allocate(ScriptInterface&, JS::Handle) (CCmpOverlayRenderer.cpp:40) ==4979== by 0x1D4CAE: CComponentManager::ConstructComponent(CEntityHandle, int) (ComponentManager.cpp:778) ==4979== by 0x1D516F: CComponentManager::AddComponent(CEntityHandle, int, CParamNode const&) (ComponentManager.cpp:705) ==4979== by 0x1D52D3: CComponentManager::AddEntity(std::__cxx11::basic_string, std::allocator > const&, unsigned int) (ComponentManager.cpp:883) ==4979== by 0x1E210B: Script_AddEntity (ComponentManager.cpp:474) ==4979== by 0x1E210B: call&), std::__cxx11::basic_string, std::allocator > > (NativeWrapperDefns.h:75) ==4979== by 0x1E210B: bool ScriptInterface::call, std::allocator >, &CComponentManager::Script_AddEntity>(JSContext*, unsigned int, JS::Value*) (NativeWrapperDefns.h:125) ==4979== by 0x571D3A1: CallJSNative (jscntxtinlines.h:226) ==4979== by 0x571D3A1: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:498) ==4979== by 0x5711A7E: Interpret(JSContext*, js::RunState&) (Interpreter.cpp:2602) ==4979== by 0x571D09C: js::RunScript(JSContext*, js::RunState&) (Interpreter.cpp:448) ==4979== by 0x571D308: js::Invoke(JSContext*, JS::CallArgs, js::MaybeConstruct) (Interpreter.cpp:517) ==4979== by 0x571DD8E: js::Invoke(JSContext*, JS::Value const&, JS::Value const&, unsigned int, JS::Value const*, JS::MutableHandle) (Interpreter.cpp:554) ==4979== by 0x59A9EF7: js::jit::InvokeFunction(JSContext*, JS::Handle, unsigned int, JS::Value*, JS::Value*) (VMFunctions.cpp:75) ==4979==