Can't reproduce and I'm just not willing to play guess today. Post the code that did that. The fact that shrapnel is not yet defined when this update function is won't cause problems. shrapnel is either a local that is assigned a valid element ID eventually or nil, in which case partCreate just fails.
You didn't define your element properties, right? In that case, I'm guessing it just used values from https://github.com/ThePowderToy/The-Powder-Toy/blob/master/src/simulation/elements/Element.cpp
Where colour is set as pink (0xFF00FF) and name as "".