Status Update
Comments
yb...@google.com <yb...@google.com> #2
1. Have you saw crash in real device or only in simulators?
2. Do you use dynamic feature for language ID?
t....@gmail.com <t....@gmail.com> #3
Tested on Android 12 Emulator with custom executor, but cannot repro this issue.
bu...@gmail.com <bu...@gmail.com> #4
-
Second crash in the description is from a real device. Experienced it myself on two different Xiaomi phones, plus lots of crashes from users in the Google Play console.
-
Dynamic features are not used in the application.
As a wild guess, I have downgraded build tools from 31.0.0 to 30.0.3, compileSdk from 31 to 30, and moved all work with Language ID to the service in a separate process (just to be sure that crash can kill secondary process instead of main). This combination is in beta for 2 days by now and I don't see any SIGSEGV crashes.
yb...@google.com <yb...@google.com>
yb...@google.com <yb...@google.com> #5
Hmm, I feel the crash might be something related to separate/secondary process.
I also changed compileSdk and targetSDK to 31 but still cannot repro this issue.
si...@gmail.com <si...@gmail.com> #6
On the contrary, there was no separate process before, when crashes started.
In the new build (with the aforementioned changes) I can see SIGSEGV crash, but only one instead of dozens and it has a bit different backtrace:
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)
liblanguage_id_jni.so (offset 0x11e000)
backtrace:
#00 pc 000000000003c7c0 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 000000000003b960 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 000000000003bb48 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 000000000003bafc /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000036c98 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000032714 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000031cac /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/split_config.arm64_v8a.apk!lib/arm64-v8a/liblanguage_id_jni.so (offset 0x11e000)
#00 pc 0000000000057438 /data/app/azagroup.reedy-mF7zTu2bv_ELlbFArwNgqA==/oat/arm64/base.odex (offset 0x57000)
yb...@google.com <yb...@google.com> #7
FYI, ML Kit launched a new language ID SDK in the latest release, which uses a new language ID model.
Could you try the new SDK version(17.0.0) to check if you can still repro this native crash? Thanks!
da...@google.com <da...@google.com> #8
Thank you, I'll try it and check.
ap...@google.com <ap...@google.com> #9
Hello. I have similar experience.
- I'm using mlkit-language 16.1.1
- I didnot meet this error until using AGP 4.2
- I can get this error since using AGP 7.0
- This error raised on Release build only(minimized by R8)
- This error raised without obfuscation.
Description
Version used: 1.0.0-rc1
Devices/Android versions reproduced on: compile
These are my entity and dao classes.
----------------------------------------------------------------------------------------------------------
@Entity
public class Playlist {
@PrimaryKey(autoGenerate = true) private int id;
private String name;
private String path;
@ColumnInfo(name = "icon_path") private String iconPath;
private int type;
@ColumnInfo(name = "date_created") private long dateCreated;
@ColumnInfo(name = "date_last_opened") private long dateLastOpened;
public int getId() {
return id;
}
public void setId(int id) {
}
public String getName() {
return name;
}
public void setName(String name) {
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
public String getIconPath() {
return iconPath;
}
public void setIconPath(String iconPath) {
this.iconPath = iconPath;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public long getDateCreated() {
return dateCreated;
}
public void setDateCreated(long dateCreated) {
this.dateCreated = dateCreated;
}
public long getDateLastOpened() {
return dateLastOpened;
}
public void setDateLastOpened(long dateLastOpened) {
this.dateLastOpened = dateLastOpened;
}
}
----------------------------------------------------------------------------------------------------------
@Dao
public interface PlaylistDao {
@Query("SELECT * FROM playlist")
List<Playlist> getAll();
@Insert
void insert(Playlist playlist);
@Delete
void delete(Playlist playlist);
}
----------------------------------------------------------------------------------------------------------
I'm getting compile time error that cannot find getter for id and iconPath field.
----------------------------------------------------------------------------------------------------------
Playlist.java:15: error: Cannot find getter for field.
@PrimaryKey(autoGenerate = true) private int id;
^
Playlist.java:18: error: Cannot find getter for field.
@ColumnInfo(name = "icon_path") private String iconPath;
^
----------------------------------------------------------------------------------------------------------
While I looked into generated PlaylistDao implementation class, i saw that 'İ' is used as uppercase of 'i'.
----------------------------------------------------------------------------------------------------------
public List<Playlist> getAll() {
final String _sql = "SELECT * FROM playlist";
final RoomSQLiteQuery _statement = RoomSQLiteQuery.acquire(_sql, 0);
final Cursor _cursor = __db.query(_statement);
try {
final int _cursorIndexOfİd = _cursor.getColumnIndexOrThrow("id");
final int _cursorIndexOfName = _cursor.getColumnIndexOrThrow("name");
final int _cursorIndexOfPath = _cursor.getColumnIndexOrThrow("path");
final int _cursorIndexOfİconPath = _cursor.getColumnIndexOrThrow("icon_path");
final int _cursorIndexOfType = _cursor.getColumnIndexOrThrow("type");
final int _cursorIndexOfDateCreated = _cursor.getColumnIndexOrThrow("date_created");
final int _cursorIndexOfDateLastOpened = _cursor.getColumnIndexOrThrow("date_last_opened");
final List<Playlist> _result = new ArrayList<Playlist>(_cursor.getCount());
while(_cursor.moveToNext()) {
final Playlist _item;
_item = new Playlist();
_
final String _tmpName;
_tmpName = _cursor.getString(_cursorIndexOfName);
_item.setName(_tmpName);
final String _tmpPath;
_tmpPath = _cursor.getString(_cursorIndexOfPath);
_item.setPath(_tmpPath);
_item.iconPath = _cursor.getString(_cursorIndexOfİconPath);
final int _tmpType;
_tmpType = (int) _cursor.getInt(_cursorIndexOfType);
_item.setType(_tmpType);
final long _tmpDateCreated;
_tmpDateCreated = _cursor.getLong(_cursorIndexOfDateCreated);
_item.setDateCreated(_tmpDateCreated);
final long _tmpDateLastOpened;
_tmpDateLastOpened = _cursor.getLong(_cursorIndexOfDateLastOpened);
_item.setDateLastOpened(_tmpDateLastOpened);
_result.add(_item);
}
return _result;
} finally {
_cursor.close();
_statement.release();
}
}
----------------------------------------------------------------------------------------------------------
I'm using Turkish keyboard. I tried changing my keyboard input as English and wrote entity class again. I also tried convert file encoding of playlist class but the problem was not solved.
It only compile without error when i change getters with getİd and getİconPath.