Soooo, this happens when loading a save, or better said on event on_configuration_changed (runtime/control.lua stage):
1169.522 Error AppManagerStates.cpp:1663: The mod Color Coded Pipes (1.5.0) caused a non-recoverable error.
Please report this error to the mod author.
Error while running event color-coded-pipes::on_configuration_changed
Error when running interface function automatic-underground-pipe-connectors.add_undergrounds: automatic-underground-pipe-connectors/control.lua:315: attempt to index local 'pipe_prototype' (a nil value)
stack traceback:
automatic-underground-pipe-connectors/control.lua:315: in function 'validate_lookup'
automatic-underground-pipe-connectors/control.lua:349: in function <automatic-underground-pipe-connectors/control.lua:347>
stack traceback:
[C]: in function 'call'
color-coded-pipes/control.lua:198: in function 'add_automatic_underground_pipe_connector_support'
color-coded-pipes/control.lua:218: in function <color-coded-pipes/control.lua:215>
Why do I report this here? I believe the root cause is planet-rabbasca's compatibility with crushing-industry and you introducing it in data-updates.
Mods involved:
- color-coded-pipes
- automatic-underground-pipe-connectors
- crushing-industry
- planet-rabbasca
So, why does the error happen? As far as I can tell:
1. color-coded-pipes introduces some interaction with automatic-underground-pipe-connectors: https://github.com/jingleheimer-schmidt/color-coded-pipes/blob/2d474730780567bdfdc9a2e247c4e5c86ab6013a/control.lua#L185
2. color-coded-pipes calls automatic-underground-pipe-connectors for all color coded pipes, i.e. for all fluids and colors: https://github.com/jingleheimer-schmidt/color-coded-pipes/blob/2d474730780567bdfdc9a2e247c4e5c86ab6013a/control.lua#L197
3. then, automatic-underground-pipe-connectors accesses the color coded pipe's prototype: https://github.com/sparr/factorio-mod-automatic-underground-pipe-connectors/blob/4d71e4a6d785cc6278f5b90642494f6ebc67e0a6/control.lua#L310
4. which is nil - crash.
So some prototype does not seem to exist. Which prototype? I think it's rabbasca-energetic-concrete-mix-color-coded-pipe, because when I log the input parameters passed to automatic-underground-pipe-connectors's validate_lookup just before the prototype is accessed (works for many color coded pipes, but not for this one), this one is the last it logs and thus I think it crashes there.
If I'm right about all this, I think it's because
1. color-coded-pipes does its thing about adding color-coded pipe variants for all colors and fluids in data-updates stage and assumes that for all colors and fluids, now there exist colored prototypes https://github.com/jingleheimer-schmidt/color-coded-pipes/blob/2d474730780567bdfdc9a2e247c4e5c86ab6013a/data-updates.lua#L532
2. then, afterwards, planet-rabbasca adds crushing-industry compatibility in data-updates stage https://github.com/PizzaPlanner/planet-rabbasca/blob/50dce8dbc8985ec7bd24ef774aeb5b164f6db96f/data-updates.lua#L26
3. but now, all of a sudden, there's a new fluid rabbasca-energetic-concrete-mix which needs color coded prototypes but color-coded-pipes hadn't had a chance to actually register the prototypes, since its work has already been done
4. because color-coded-pipes's data-update is run before planet-rabbasca's data-updates, at least with my combination of mods, interpreted from Factorio's log:
...
24.688 Loading mod crushing-industry 0.4.18 (data-updates.lua)
24.770 Loading mod erm_redarmy 2.0.12 (data-updates.lua)
24.849 Loading mod erm_terran 2.1.9 (data-updates.lua)
24.928 Loading mod fruit 1.52.0 (data-updates.lua)
25.006 Loading mod Paracelsin 1.6.9 (data-updates.lua)
25.083 Loading mod pelagos 0.27.1 (data-updates.lua)
25.198 Loading mod alloy-smelting 0.4.2 (data-updates.lua)
25.280 Loading mod color-coded-pipes 1.5.0 (data-updates.lua)
26.626 Loading mod erm_toss 2.0.14 (data-updates.lua)
26.768 Loading mod erm_zerg 2.0.13 (data-updates.lua)
27.038 Loading mod planet-muluna 2.1.61 (data-updates.lua)
27.491 Loading mod Voidcraft 2.5.1 (data-updates.lua)
27.604 Loading mod castra 0.5.4 (data-updates.lua)
36.640 Loading mod color-coded-pipe-planner 0.2.0 (data-updates.lua)
36.765 Loading mod Factorio-Tiberium 2.0.14 (data-updates.lua)
36.881 Loading mod IridescentIndustry 0.6.1 (data-updates.lua)
37.004 Loading mod metal-and-stars 0.1.17 (data-updates.lua)
37.113 Loading mod planet-rabbasca 0.7.2 (data-updates.lua)
...
So.
1. crushing-industry adds their concrete mix
2. then, color-coded-pipes says "let's make some color-coded stuff for all fluids"
3. then, afterwards, planet-rabbasca adds compatibility for crushing-industry, and introduces the fluid rabbasca-energetic-concrete-mix
=> so color-coded-pipes didn't get a chance to add its rabbasca-energetic-concrete-mix-color-coded-pipe
Then, at runtime, in control.lua, color-coded-pipes thinks that rabbasca-energetic-concrete-mix-color-coded-pipe exists, calls automatic-underground-pipe-connectors, they assume rabbasca-energetic-concrete-mix-color-coded-pipe exists, too, but it doesn't, the prototype is nil, and - crash.
Now I think automatic-underground-pipe-connectors and color-coded-pipes could guard against nonexisting prototypes. But I think their logic is sound, there's no reason why for certain fluids there shouldn't exist their color coded counterparts.
I think all would be fine if your addition of rabbasca-energetic-concrete-mix would happen before color-coded-pipes creates its variants. If I remove planet-rabbasca's compatibility with crushing-industry, my save loads and on event on_configuration_changed works fine.
But that's where I'm lost, I don't even know if it's possible to control this interaction overall. Either planet-rabbasca would have to introduce compatibility with crushing-industry before data-updates stage, which probably introduces a whole set of other issues if it even works at all (I have no clue, I'm not a modder at all), or maybe those mods can somehow force the order they're loaded by setting dependencies (again, no idea if that's even possible).
I believe, from what I've seen, the order in whatever data stage should be
1. crushing-industry (then we have concrete mix)
2. planet-rabbasca (then you can introduce compatibility and add rabbasca-energetic-concrete-mix fluid)
3. color-coded-pipes (then they see all fluids and add their colored prototypes for every one)
?. automatic-underground-pipe-connectors (I think this one's order doesn't matter at all since it's only doing something in control.lua, so is not interested at all in this whole setup stages)
What do you think?
Edit: I told them too, maybe there's other ideas around: https://mods.factorio.com/mod/color-coded-pipes/discussion/6924cb712923ab8332860a0c