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
While using LoganSquare (v1.3.7) for parsing json strings into java Pojos, some times I get a crash while registering type converter.
Corresponding stack trace is: Caused by java.lang.ArrayIndexOutOfBoundsException: src.length=8 srcPos=0 dst.length=8 dstPos=2 length=8 at java.lang.System.arraycopy(System.java) at com.bluelinelabs.logansquare.util.SimpleArrayMap.put(SimpleArrayMap.java:400) at com.bluelinelabs.logansquare.LoganSquare.registerTypeConverter(LoganSquare.java:350)
Is this issue known or has it been fixed already?
Please do let me know if I can provide some other information.
The text was updated successfully, but these errors were encountered:
a simpler equals() implementation that doesn't check for SimpleArrayMap
a different lock object (SimpleArrayMap.class instead of ArrayMap.class)
The binarySearch() method is in a different place but the implementation looks identical. It may really be a bug in SimpleArrayMap - here's a crash caused by the same bug in the Android support library. But since it happens intermittently I'm inclined to think it's a race condition.
I believe the issue is that LoganSquare.registerTypeConverter() is not thread safe. My app was calling it in multiple places, possibly at the same time from different threads. I noticed that they are stored in TYPE_CONVERTER which is a static final field. Seems bad. I'll try to follow up once my app is fixed to see if the crash reports disappear.
While using LoganSquare (v1.3.7) for parsing json strings into java Pojos, some times I get a crash while registering type converter.
Corresponding stack trace is:
Caused by java.lang.ArrayIndexOutOfBoundsException: src.length=8 srcPos=0 dst.length=8 dstPos=2 length=8 at java.lang.System.arraycopy(System.java) at com.bluelinelabs.logansquare.util.SimpleArrayMap.put(SimpleArrayMap.java:400) at com.bluelinelabs.logansquare.LoganSquare.registerTypeConverter(LoganSquare.java:350)
Is this issue known or has it been fixed already?
Please do let me know if I can provide some other information.
The text was updated successfully, but these errors were encountered: