Ok thanks,
This is probably this problem explained by Sojamo :
this is probably a concurrency issue. there are 2 threads running, the sketch itself and the ControlFrame.
Without having access to the code of a running example that demonstrates the behaviour you are encountering it is hard for me to tell if this is a controlp5 issue or a sketch issue. However if you modify an array in your main sketch from the controlFrame, a concurrency issue is very likely.
Using a CopyOnWriteArrayList instead of ArrayList might solve that issue.
(ControlFrame issues · Issue #138 · sojamo/controlp5 · GitHub)
And this related issue might help, this is not related to Gson :