Comments (12)
were you able to determine the cause? I don't see any reason for this error to come.. Is this occasional or regular error?
from sugar.
Unfortunately, it's not occasional. It's the first source of crashes for my app (21 occurrences today).
Here are the full information about it: http://crashes.to/s/84527a7975b
I made more search about it but I was unable to find where it may come from.
What I don't understand is why there is a mix of valid columns and invalid one.
SHADOWMONITOR (code 1): , while compiling: UPDATE F_GROUP SET SHADOWMONITOR=?,SHADOWKLASS=?,TOTAL=?,GROUP_ID=?,NAME=?,PAGE=?,CURRENT=? WHERE ID = ?
My entity:
public class FGroup extends SugarRecord<FGroup> implements RequestData {
int total;
int current;
String name;
public String groupId;
public int page;
public FGroup() {
super();
}
public FGroup(Context context, String groupId, String name, int page, int current, int total) {
super();
this.name = name;
this.groupId = groupId;
this.current = current;
this.total = total;
}
}
It seems to only occur on "UPDATE" commands but on different entities.
from sugar.
It's because the users had ART activated (read more http://source.android.com/devices/tech/dalvik/art.html ). It implements the base type Object with 2 extra fields:
public class Object {
private transient Class<?> shadow$_klass_;
private transient int shadow$_monitor_;
I made a pull request, but have missed the 2nd field initially.
from sugar.
ah.. that explains.. I did go through your pull request, but couldn't test it coz of lack of ART based device.
We could skip the transient fields.. that should be good enough. right?
from sugar.
@PomepuyN @gaddas Would you be able to test it out.. in SugarRecord.java line no: 360
for (Field field : typeFields) {
if (!field.isAnnotationPresent(Ignore.class) && !Modifier.isStatic(field.getModifiers())&& !Modifier.isTransient(field.getModifiers())) {
toStore.add(field);
}
}
from sugar.
@PomepuyN you can try out the latest 1.3_beta jar.. it has the above change.
from sugar.
The example application is working - I tested without the change (got same error) and without (the error was gone).
from sugar.
Cool.. Thanks
from sugar.
Great!
Thanks a lot @gaddas
@satyan I will include the new jar and let you know if it solved my issue. I think I will be able to release it tomorrow.
from sugar.
Ok.
After two days in production, there are no more crashes.
Once again thanks to @gaddas and @satyan 👍
from sugar.
closing this.. as it looks fixed.
from sugar.
Perhaps it makes sense not to get fields on base class if the base class is Object so that we avoid crashes in future if Google adds other fields?
from sugar.
Related Issues (20)
- Support for user specified ID's being used in the database instead of having them generated automatically.
- Android Studio 3.2.1 DB is no longer created HOT 3
- Is Sugar ORM library affected by the newly found SQLite vulnerability?
- update bug HOT 1
- [QUESTION] Where I can find the CI service?
- OneToMany Annotation
- Missing saveAll() for nested Table
- How read existing DB from assets folder? HOT 1
- Como deletar todos os dados de uma tabela e depois verificar se a tabela está vazia? HOT 1
- No such table with migration HOT 2
- ava.lang.NoSuchMethodException: <init> []
- SugarRecord Read / write separation
- bulk data not inserted completely
- Caused by: android.database.sqlite.SQLiteException: no such table: HOT 5
- *.db file is empty, but in application all the lines are shown.
- RuntimeException on start
- 我使用save来保存数据但是数据当中设置了不可重复字段会对其进行覆盖
- build failed when sync graddle HOT 1
- no such column when select
- Could not resolve project :sugar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sugar.