I fixed this on my system by changing a line in my /etc/armbian/firefox.conf
from this:
pref("browser.cache.memory.capacity", "-1");
to this:
pref("browser.cache.memory.capacity", -1);
What I did was used strace on firefox to a file, grepped the file for .cfg, found a link to firefox.conf, commented out lines by binary halving until I found the right line,
and then futzed the line until firefox would start without the error.