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
ModelCache is an abstract class that is only ever used through static method calls. It has static initiializers and also requires an explicit call to populate the cache. However, since no instance of ModelCache ever exists, it is possible for the VM to unload the class. It then gets reloaded the next time one of the static methods is called, but at this time the cache is re-created, and is empty. This leads to an exception, e.g
com.orm.androrm.NoSuchFieldException: No field named hasNew was found in class ForumThread! Choices are: [date, endpoint, forum, hasNew, lastFetched, mine, nextToRead, nextUpdated, ordinal, postId, posts, subject, synced, totalPosts, unseen, url, watched, mId]
at com.orm.androrm.Model.raiseFieldExecption(Model.java:181)
at com.orm.androrm.Model.getField(Model.java:208)
at com.orm.androrm.Model.getField(Model.java:204)
at com.orm.androrm.QueryBuilder.getFieldInstance(QueryBuilder.java:169)
at com.orm.androrm.QueryBuilder.buildQuery(QueryBuilder.java:101)
at com.orm.androrm.QueryBuilder.buildQuery(QueryBuilder.java:74)
at com.orm.androrm.QuerySet.filter(QuerySet.java:113)
This bug has been observed in production code when the app has been paused for some time.
The text was updated successfully, but these errors were encountered:
I have fixed this in the Androrm fork I have on Github. I'm not sure it can be easily merged back to the original fork since there have been major changes on both forks.
Thanks for the work you have put into this! I won't be able to have a look at it until after the holidays but I will try to integrate it ASAP when I'm back :)
So long, merry Christmas to you and your loved ones!
I have fixed this in the Androrm fork I have on Github. I'm not sure it can be easily merged back to the original fork since there have been major changes on both forks.
—
Reply to this email directly or view it on GitHub.
ModelCache is an abstract class that is only ever used through static method calls. It has static initiializers and also requires an explicit call to populate the cache. However, since no instance of ModelCache ever exists, it is possible for the VM to unload the class. It then gets reloaded the next time one of the static methods is called, but at this time the cache is re-created, and is empty. This leads to an exception, e.g
This bug has been observed in production code when the app has been paused for some time.
The text was updated successfully, but these errors were encountered: