So I have been working on Generic City and for the most part its going well. I have a problem with the map crashing when reloading the map from a loaded state. Say I load into free roam then I want to start a scenario, sometimes the map crashes at loading forest. Sometimes its fine. I have to quit the game and it will load up again. The same sometimes happens if you are changing between scenarios. It will sometimes crash. It like something in the map isn't unloading properly causing the map to crash when it tries to reload again. I have looked in the log and there are a two things that stand out, but I don't know how or if they are the problem or what to do about them. This is something to do with the forest when quitting the map: 2803.96868|E|BNGBase::JsonV2::serializeStreamToFile|Failed writing serialized data: /levels/generic_city//main.forestbrushes4.json No idea what to do about that. I did notice a while ago in the log it said a forest file is out dated please remove the file after updating. It said the filename of the file to remove so I removed it without anything vanishing from the map. Yes main.forestbrushes4.json is in the map still. Are there any other legacy files that are no longer required that could cause the problem? This next one is related the lua file that turns the point lights on at night: 3024.80138|I|GELua.extensions|unable to unload module /levels/generic_city/mainLevel: not loaded The lights do appear to be working, but I'm not good with code, so here is the contents of that file. Code: local M = {} local function setAllLightsEnabled(group, value) for i = 0, group.obj:getCount(), 1 do local id = group.obj:idAt(i) local obj = scenetree.findObjectById(id) if obj and obj.obj:isSubClassOf('LightBase') then obj.obj:setLightEnabled( value ) end end end local lastValue = nil local function onUpdate() local tod = scenetree.tod if not tod then return end local value = false if tod.time > 0.21 and tod.time < 0.77 then value = true end if lastValue == value then return end lastValue = value if scenetree.dynamiclights then setAllLightsEnabled(scenetree.dynamiclights, value ) end end M.onUpdate = onUpdate return M Apart from this random crash when reloading from a loaded state the map seems to be working fine otherwise. Any thoughts?