Issue Basics
- ObjectBox version : 2.2.0
- Reproducibility: occasionally without visible pattern
Description
I received the crash when i put an entity in the box.
I can't reproduce the crash, but i received a lot of exception issues because of the crash in my error tracing reports.
The data.mdb file is a dozen of MB, so i don't think the objectbox capacity is not enough.
Stacks Traces

syncDataToDB method is invoked very frequently, almost once per second. I don't know if there were some causes.
Code
private void syncDataToDB(String courseId,
String courseName, String coachName,
boolean isPkMode, String redName, String blueName,
TrainingCourse.TrainingUser trainingUser) {
DBCourseData dbCourseData = mDBCourseDataByCIdQuery.setParameter(DBCourseData_.courseId, courseId).findFirst();
if (dbCourseData == null) {
dbCourseData = new DBCourseData();
}
...
mDBCourseDataBox.put(dbCourseData);
DBUserData dbUserData = mDBUserDataByCIdUIdQuery.setParameter(DBUserData_.courseId, courseId).setParameter(DBUserData_.userId, trainingUser.userId).findFirst();
if (dbUserData == null) {
dbUserData = new DBUserData();
}
...
mDBUserDataBox.put(dbUserData); // =====> Line: 1170
}
The DBUserData entity was defined like this.
@Entity
public class DBUserData {
@Id
public long id;
public String courseId;
public String userId;
public boolean newUserDialogShown;
public boolean oldUserDialogShown;
public boolean birthDayDialogShown;
public boolean newRecordDialogShown;
public int score;
public float cal;
public float ck;
public int highestHR;
public String userIcon;
public String username;
public int sex;
// pk mode
public boolean isRed;
public int trainingNum;
public int victoryNum;
public int defeatNum;
public int drawNum;
}
Hope you will get my points.
Thanks a lot.
Issue Basics
Description
I received the crash when i put an entity in the box.
I can't reproduce the crash, but i received a lot of exception issues because of the crash in my error tracing reports.
The data.mdb file is a dozen of MB, so i don't think the objectbox capacity is not enough.
Stacks Traces
syncDataToDBmethod is invoked very frequently, almost once per second. I don't know if there were some causes.Code
The
DBUserDataentity was defined like this.Hope you will get my points.
Thanks a lot.