I've recently been having trouble getting TikZ to compile figures. I say recently, because a month ago, I wasn't having any problems. I'm not aware of any file corruption or updates that would have caused a change, and I'm at a loss as to what is causing this problem. (I've tried reinstalling the modules, so the source of the problem is more insidious.)
Here's the problem:
After fixing a problem with the auxlock file used by tikzexternalize (see this question), I am continuing to have trouble with this feature. I should note that if I disable externalization, I am having no trouble at all, except that, for long documents, the compile times become ludicrously long (hence, my desire to use externalize).
The error I receive is that lualatex has segfaulted during the convert-with-system-call, and PDF output has failed to generate.
I should also note that, if I prepare trivial plots, I have no problem. I'm not sure that its practical to create a MWE for this problem, since to some extent, it depends on conflicts specific to my project. (I have for instance, already discovered a conflict between TikZ and enumerate, also mentioned here.)
I recently limped my way through the compile process by creating a minimal script to contain the all the TikZ inputs I'm using and uncommenting them one at a time. You see, it seems that something is wrong with the optimization routine that isn't allowing tikzpictures to be skipped appropriately. If, however, the figure is already compiled and has a pdf, the skipping works as it should. This means that, in order to compile all the figures, I have to comment out all TikZ references after the one being compiled. This is a tedious process for more than a few figures.
Once the figures are compiled, they slide seamlessly into my main document. But since TikZ externalize is successfully integrating externalized images, and TikZ is compiling fine when externalization is invoked, and TikZ externalize even creates images successfully as long as no other TikZ image to be rendered is present, I am truly baffled as to how it fails when an ordinary document with multiple TikZ references is compiled.
I apologize that this question isn't clearer, but the nature of the problem is quite opaque to me. If there are any useful details I can provide, I would be happy to provide them.