The First gives no error but if change the code to the last it gives a Java Error.
I am confused.
B4X:
'===========> this gives NO ERROR
For i=1 To All_lst_xRotateKnobs.Size-1
Private ToAdd As xRotateKnobsCollectionType_NEW = All_lst_xRotateKnobs.Get(i)
testlist.Add(ToAdd)
Next
ObjBytes = ser.ConvertObjectToBytes(testlist)
'===========>' this does give JAVA ERROR object should first be initialized (list)
ObjBytes = ser.ConvertObjectToBytes(All_lst_xRotateKnobs)
Because of your question I looked at the logs and realized I had a bug somewhere that did not initialize a list that was part of the first element . I corrected that and now it passes.
To answer your question 3. The first element should be skipped by design. (I know that in the failing code it is included but that will be handled when reloading ).