-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Infinite loop when storing LinearLayout #93
Comments
Why did you want to store |
I had an array of objects that I use, and in order to test a little feature I've put the view inside the object while not considering that this object is used by prefser. Then when debugging I found where exactly this loop happens. |
The intention of prefser is storing simple data structures - not complicated objects or views. In my opinion, storing views doesn't make sense. If you want to remember a specific state of the UI, you should extract part of your code into a simpler class and then store its instance. I'm not surprised that it didn't work. It's incorrect usage of the library. You can provide StackTrace and we can eventually improve error handling or data validation, but we won't handle storing objects from Android SDK or anything like that. |
I did not even intent to suggest that this library should store such data types; it was more about being aware this is happening and maybe you would like to handle the error in a more elegant way. |
Can you provide StackTrace of your error? Then it will be easier to handle it. |
While I know the types of data Prefser can store, I've tried to store a
LinearLayout
data type. The app hangs and does an infinite loop insideGson.java
on line 358:Also the app crashes on storing
View
.Model: Nexus 5, android 6.0.1
The text was updated successfully, but these errors were encountered: