A factory is not a matter replicator. It can’t turn energy into matter or make atoms. It can spin together molecules OUT of atoms. It pipes in water (hydrogen and oxygen) from a hose and can get oxygen and nitrogen from the air, but when it runs out of carbon, it’s just out of carbon and now it can’t print rice (it doesn’t get carbon from CO2, I don’t think that math works out).

↓ Transcript
Panel 1: The factory "ping"s that it's done. Maida opens the lid and takes out a steaming bowl of basic vegetable curry rice.
Panel 2: She hands the bowl to her mum sitting on the couch. Maida's mum: "Curry rice again."
Panel 3: Maida puts the other, empty bowl into the factory.
Panel 4: Maida's mum: "I think you're over-estimating the generosity of the average Mangalan. They took your father from us. Two thirds of the population was happy to let us all choke to death."
Panel 5: The factory makes a discouraging noise and Maida hits it frustratedly. Maida: "Grr!"
Panel 6: She spins the factory around on its counter to get at the back of it.
Panel 7: She takes out an empty, clear glass cylinder. Maida: "Now both factories are out of carbon. Great."