Extended Research Queue

by sh4dow

A better GUI for managing the research queue. Fork of sonaxaton-research-queue adding compatability with the vanilla research queue.

Utilities
2 years ago
1.0 - 1.1
4.43K

b Crash when another mod completes a research as soon as that research is begun

1 year, 5 months ago

If a mod (True Nukes in this case) has a trigger which it uses to complete the research instantly, then the queue crashes if the research is begun by clicking "begin asap". The queue was in default settings, and the research causing the crash was the atomic bomb research.
It seems to be fixed if I change queue.lua to check:
if(force.research_queue[1] == nil) then
return
end
in line 334 (after checking if mode == 2).
But I've not tested the fix completely.
This was originally reported on T-N here: https://mods.factorio.com/mod/True-Nukes/discussion/648b2307b07b8a4c6b5d2f4d
But I can't fix it in code on that side, I'm pretty sure.

The error is below:
The mod Extended Research Queue (0.5.7) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event factorio-research-queue::on_gui_click (ID 1)
The mod Extended Research Queue (0.5.7) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event factorio-research-queue::on_research_started (ID 17)
factorio-research-queue/scripts/rqtech.lua:21: attempt to index local 'tech' (a nil value)
stack traceback:
factorio-research-queue/scripts/rqtech.lua:21: in function 'new'
factorio-research-queue/scripts/queue.lua:335: in function <factorio-research-queue/scripts/queue.lua:318>
(...tail calls...)
factorio-research-queue/scripts/gui/actions.lua:812: in function 'on_research_started'
factorio-research-queue/control.lua:274: in function <factorio-research-queue/control.lua:271>
[C]: in function 'newindex'
__factorio-research-queue
/scripts/queue.lua:262: in function 'set_queue'
factorio-research-queue/scripts/queue.lua:433: in function <factorio-research-queue/scripts/queue.lua:318>
(...tail calls...)
factorio-research-queue/scripts/gui/event_handlers.lua:22: in function '?'
factorio-research-queue/scripts/gui/index.lua:10: in function 'handle_event'
factorio-research-queue/control.lua:297: in function <factorio-research-queue/control.lua:292>
stack traceback:
[C]: in function 'newindex'
__factorio-research-queue
/scripts/queue.lua:262: in function 'set_queue'
factorio-research-queue/scripts/queue.lua:433: in function <factorio-research-queue/scripts/queue.lua:318>
(...tail calls...)
factorio-research-queue/scripts/gui/event_handlers.lua:22: in function '?'
factorio-research-queue/scripts/gui/index.lua:10: in function 'handle_event'
factorio-research-queue/control.lua:297: in function <factorio-research-queue/control.lua:292>

New response