Steps to reproduce the c[0] bug: D312361246
This will do it:
1. Open or create a document with citations.
2. With the document open, stop and restart Zotero.
3. Select a citation and open it for editing with the Classic popup.
4. Show the editor. Citation will appear in the editor. Press Cancel.
5. Refresh citations.
6. Boom.
The Debug ID above covers those steps. For further exploration:
7. Save the document and stop the word processor.
8. Reopen the document.
9. Click Refresh.
10. Boom.
11. Restart Zotero.
12. In the document, refresh citations.
13. All systems normal, the document works again.
The trigger, in this case at least, is at Step 3. When the Classic editor is opened before any other actions are taken, the
1. Open or create a document with citations.
2. With the document open, stop and restart Zotero.
3. Select a citation and open it for editing with the Classic popup.
4. Show the editor. Citation will appear in the editor. Press Cancel.
5. Refresh citations.
6. Boom.
The Debug ID above covers those steps. For further exploration:
7. Save the document and stop the word processor.
8. Reopen the document.
9. Click Refresh.
10. Boom.
11. Restart Zotero.
12. In the document, refresh citations.
13. All systems normal, the document works again.
The trigger, in this case at least, is at Step 3. When the Classic editor is opened before any other actions are taken, the
citations
array used to declare the context of the preview is still empty. This drains the processor registry, and subsequent operations that assume the processor has been fully initialized will fail.
1. Open or create a document with citations in the Cell style.
2. With the document open, stop and restart Zotero.
3. Select a citation and open it for editing with the Quick Format dialog.
4. Add a citation bubble to the Quick Format dialog, and press the escape key (Esc) to cancel the dialog (without adding the item to the citation).
5. Open another citation, and attempt to add the item to it, hitting Enter to complete the insert.
6. Boom.
Both tests were done in LibreOffice under Linux with Track Changes disabled, using Zotero 5.0.65, off the shelf with no modifications.
(1)(+0001008): citationsPre=[["Q43HSBCq",0],["LaXf285q",0],["IN8UWros",0],["1MJXLBtg",0]]
(1)(+0000000): citationsPost=[["1MJXLBtg",0]]
You see the problem. The processor is being told that the document contains five citations, two of which have identical IDs. I flagged the cause of this a couple of times previously, but maybe I didn't explain myself clearly enough. There is a string that needs to be converted to an integer here. The next processor release will throw an error when it receives irrational context inputs, so it would be a good idea to fix this soon.