You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run in to a couple of problems since we started compiling against the Android API 28 (as all of us have to do latest November). Interesting enough the issues are only present when actually running on an API 28 device.
In particular serializing TreeMap, Date (actually fails in Calendar) and the output of Collections.synchronizedList (OK that maybe was never a good idea and I've removed that) fails with an NPE.
Typical example:
58 08-26 16:15:20.537 I/SaveThread(13297): saving tasks.res
59 08-26 16:15:20.588 E/SaveThread(13297): failed to save tasks.res
60 08-26 16:15:20.588 E/SaveThread(13297): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.lang.reflect.Field.get(java.lang.Object)' on a null object reference
61 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTClazzInfo$FSTFieldInfo.getObjectValue(FSTClazzInfo.java:873)
62 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectFields(FSTObjectOutput.java:660)
63 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput$3.defaultWriteObject(FSTObjectOutput.java:916)
64 08-26 16:15:20.588 E/SaveThread(13297): at java.util.Calendar.writeObject(Calendar.java:3513)
65 08-26 16:15:20.588 E/SaveThread(13297): at java.lang.reflect.Method.invoke(Native Method)
66 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectCompatibleRecursive(FSTObjectOutput.java:566)
67 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectCompatibleRecursive(FSTObjectOutput.java:562)
68 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectCompatible(FSTObjectOutput.java:554)
69 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:450)
70 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:369)
71 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectFields(FSTObjectOutput.java:664)
72 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectCompatibleRecursive(FSTObjectOutput.java:576)
73 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectCompatibleRecursive(FSTObjectOutput.java:562)
74 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectCompatible(FSTObjectOutput.java:554)
75 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:450)
76 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:369)
77 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectFields(FSTObjectOutput.java:664)
78 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.defaultWriteObject(FSTObjectOutput.java:546)
79 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:458)
80 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectInternal(FSTObjectOutput.java:327)
81 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.serializers.FSTArrayListSerializer.writeObject(FSTArrayListSerializer.java:49)
82 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:476)
83 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:369)
84 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectFields(FSTObjectOutput.java:664)
85 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.defaultWriteObject(FSTObjectOutput.java:546)
86 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:458)
87 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:369)
88 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectFields(FSTObjectOutput.java:664)
89 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.defaultWriteObject(FSTObjectOutput.java:546)
90 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:458)
91 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:369)
92 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectFields(FSTObjectOutput.java:664)
93 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.defaultWriteObject(FSTObjectOutput.java:546)
94 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:458)
95 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObjectInternal(FSTObjectOutput.java:327)
96 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObject(FSTObjectOutput.java:294)
97 08-26 16:15:20.588 E/SaveThread(13297): at org.nustaq.serialization.FSTObjectOutput.writeObject(FSTObjectOutput.java:204)
98 08-26 16:15:20.588 E/SaveThread(13297): at de.blau.android.util.SavingHelper$SaveThread.run(SavingHelper.java:134)
99 08-26 16:15:20.588 E/SaveThread(13297): at java.lang.Thread.run(Thread.java:764)
It is noticeable that these are all cases in which FST falls back to the standard Java serialization. I have workarounds for the above cases, but yet another NPE might be lurking just around the corner.
The text was updated successfully, but these errors were encountered:
simonpoole
changed the title
Serialization issues when complied agains and running on Android API/SDK 28
Serialization issues when complied against and running on Android API/SDK 28
Sep 7, 2019
I've run in to a couple of problems since we started compiling against the Android API 28 (as all of us have to do latest November). Interesting enough the issues are only present when actually running on an API 28 device.
In particular serializing TreeMap, Date (actually fails in Calendar) and the output of Collections.synchronizedList (OK that maybe was never a good idea and I've removed that) fails with an NPE.
Typical example:
It is noticeable that these are all cases in which FST falls back to the standard Java serialization. I have workarounds for the above cases, but yet another NPE might be lurking just around the corner.
The text was updated successfully, but these errors were encountered: