Currently wisps mod has Init.state_tick() running on first nth_tick handler when loading it into a new/existing game for the first time.
Two new forces are added there (for peaceful/aggressive wisps), and I think issue is that script.on_nth_tick(60) runs update_queue_force() on all forces in the game, one of which apparently isn't initialized in global.researchQ table.
I see that it's supposed to be initialized in defines.events.on_force_created event handler, which is a bit puzzling, as it's explicitly documented as "Called when a new force is created using game.create_force()", and that's how all forces are created in wisps mod, don't think there's even any other way.
Adding simple print() to when create_force() is called, as well as defines.events.on_force_created handler and update_queue_force, I'm getting this sequence:
---------- wisp_force_init: wisp
---------- wisp_force_init: wisp_attack
---------- update_queue_force: player
---------- update_queue_force last_row: player
...
---------- update_queue_force: wisp
---------- update_queue_force last_row: wisp
I.e. handler for that event simply does not get invoked when create_force() is called in that wisp_force_init function.
Afaict both of these wisp_force_init calls are done in on_init handler too, which seems perfectly valid.
So I'd suggest adding something like if not global.researchQ[force.name] then global.researchQ[force.name] = {} end
to update_queue_force or into that nth_tick handler somewhere before update_queue.lua:229 line runs as a workaround.
And guess I'll report that bug somewhere on official forums.
I've changed init sequence in wisps mod quite a bit since this thread was opened (mostly to fix potential multiplayer desync issues due to using locals), but don't think this particular init bit changed, so not sure what you mean about data lifecycle.