Skip to content
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

In one plus mobile phone has a problem, trouble to help solve the next, the mobile phone system 7.0, thanks #4461

Closed
hw-beijing opened this issue Apr 10, 2017 · 20 comments
Assignees
Labels
Milestone

Comments

@hw-beijing
Copy link

FATAL EXCEPTION: main
Process: cn.funtalk.miao, PID: 21507
io.realm.exceptions.RealmError: Unrecoverable error. Invalid argument in /home/cc/repo/realm/realm-java-release/realm/realm-library/src/main/cpp/io_realm_internal_SharedRealm.cpp line 87
at io.realm.internal.SharedRealm.nativeGetSharedRealm(Native Method)
at io.realm.internal.SharedRealm.getInstance(SharedRealm.java:208)
at io.realm.internal.SharedRealm.getInstance(SharedRealm.java:186)
at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:124)
at io.realm.Realm.getDefaultInstance(Realm.java:209)
at cn.funtalk.miao.pojo.DbUtils$dbWhereBuilder.(DbUtils.java:67)
at cn.funtalk.miao.packaging.service.business.StepManager.getCurrentStep(StepManager.java:354)
at cn.funtalk.miao.packaging.service.business.StepManager.(StepManager.java:74)
at cn.funtalk.miao.packaging.service.business.StepManager.init(StepManager.java:89)
at cn.funtalk.miao.packaging.service.CommonService.onBind(CommonService.java:73)
at android.app.ActivityThread.handleBindService(ActivityThread.java:3281)
at android.app.ActivityThread.-wrap3(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1598)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6209)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

@hw-beijing
Copy link
Author

Realm Version 3.1.1

@beeender
Copy link
Contributor

Which oneplus phone it is? What is the ROM version?

@hw-beijing
Copy link
Author

Rom version 7.0

@hw-beijing
Copy link
Author

One plus is a Chinese-made mobile phone, http://www.oneplus.cn/product/oneplus3t
Rom version 7.0
Other mobile phone the same 7.0 ROM version, will not go wrong

@beeender
Copy link
Contributor

So it is a oneplus3t with stock rom (not 3rd party room) with Android 7? Is it using this rom http://www.oneplusbbs.com/thread-3311047-1-1.html

Can you please share you RealmConfiguration?

@hw-beijing
Copy link
Author

Realm.init(_activity);
RealmConfiguration realmConfiguration = new RealmConfiguration.Builder()
.directory(tempFile)
.name(DB_NAME + "miao.realm")
.modules(new MyModules())
.deleteRealmIfMigrationNeeded()
.build();
Realm.setDefaultConfiguration(realmConfiguration);

@Zhuinden
Copy link
Contributor

What's the guarantee that you have access to tempFile in Application first time init?

@hw-beijing
Copy link
Author

File tempFile = context.getExternalFilesDir("realm");
In the phone's storage space to see this directory file

@beeender
Copy link
Contributor

can you help to check what is the tempFile's real path you get on this phone?

@Zhuinden
Copy link
Contributor

Have you obtained runtime permission at this point?

@hw-beijing
Copy link
Author

tempFile's real path android/data/cn,funtalk.miao/files/realm/

This path need any special permissions? The document has been written into, and should have the permissions? I do not have special handling on permissions, my targetSdkVersion is 19

@beeender
Copy link
Contributor

@hw-beijing When the crash happens, is that the first time in your code that trying to open a Realm?

@hw-beijing
Copy link
Author

yes,I removed the custom path and would not crash

@beeender
Copy link
Contributor

@hw-beijing Can you please to run the attached apk file on your oneplus phone and post the crash log here? thanks!
app-debug.apk.zip

beeender added a commit that referenced this issue Apr 11, 2017
- Fix #4461.
- Use release assertion when finding java method.
@beeender beeender self-assigned this Apr 11, 2017
@zaki50 zaki50 closed this as completed in c9380bd Apr 11, 2017
@beeender beeender reopened this Apr 12, 2017
@beeender
Copy link
Contributor

Closed because of i put a wrong PR no. in the commit message.

@hw-beijing
Copy link
Author

04-12 11:30:37.768 471-2619/? E/ANDR-PERF-RESOURCEQS: Failed to apply optimization [4, 0]
04-12 11:30:37.943 14978-14978/io.realm.realmtest A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 14978 (realm.realmtest)

                                                      [ 04-12 11:30:37.943   462:  462 W/         ]
                                                      debuggerd: handling request: pid=14978 uid=10173 gid=10173 tid=14978

04-12 11:30:38.004 14994-14994/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-12 11:30:38.004 14994-14994/? A/DEBUG: Build fingerprint: 'OnePlus/OnePlus3/OnePlus3:7.0/NRD90M/01122125:user/release-keys'
04-12 11:30:38.004 14994-14994/? A/DEBUG: Revision: '0'
04-12 11:30:38.004 14994-14994/? A/DEBUG: ABI: 'arm64'
04-12 11:30:38.004 14994-14994/? A/DEBUG: pid: 14978, tid: 14978, name: realm.realmtest >>> io.realm.realmtest <<<
04-12 11:30:38.004 14994-14994/? A/DEBUG: signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
04-12 11:30:38.004 14994-14994/? A/DEBUG: x0 0000000000000000 x1 0000000000003a82 x2 0000000000000006 x3 0000000000000008
04-12 11:30:38.004 14994-14994/? A/DEBUG: x4 ffffffffffffffff x5 0000000000000000 x6 8000808080808080 x7 736d646c74667160
04-12 11:30:38.004 14994-14994/? A/DEBUG: x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001
04-12 11:30:38.004 14994-14994/? A/DEBUG: x12 ffffffffffffffff x13 ffffffffffffffff x14 0000000000000000 x15 ffffffffffffffff
04-12 11:30:38.004 14994-14994/? A/DEBUG: x16 0000007f7edcded0 x17 0000007f7ed778c0 x18 0000000000000001 x19 0000007f7f48fb40
04-12 11:30:38.004 14994-14994/? A/DEBUG: x20 0000000000000006 x21 0000007f7f48fa98 x22 0000000000000002 x23 0000007f70c85110
04-12 11:30:38.004 14994-14994/? A/DEBUG: x24 0000007fe6003310 x25 0000007fe6003400 x26 0000007fe6003350 x27 0000007fe60034b0
04-12 11:30:38.004 14994-14994/? A/DEBUG: x28 0000007fe60032f8 x29 0000007fe6003120 x30 0000007f7ed74d50
04-12 11:30:38.004 14994-14994/? A/DEBUG: sp 0000007fe6003100 pc 0000007f7ed778c8 pstate 0000000060000000
04-12 11:30:38.009 14994-14994/? A/DEBUG: backtrace:
04-12 11:30:38.009 14994-14994/? A/DEBUG: #00 pc 000000000006b8c8 /system/lib64/libc.so (tgkill+8)
04-12 11:30:38.009 14994-14994/? A/DEBUG: #1 pc 0000000000068d4c /system/lib64/libc.so (pthread_kill+64)
04-12 11:30:38.009 14994-14994/? A/DEBUG: #2 pc 00000000000242b8 /system/lib64/libc.so (raise+24)
04-12 11:30:38.009 14994-14994/? A/DEBUG: #3 pc 000000000001ccd4 /system/lib64/libc.so (abort+52)
04-12 11:30:38.009 14994-14994/? A/DEBUG: #4 pc 0000000000213a74 /data/app/io.realm.realmtest-1/lib/arm64/librealm-jni.so (_ZN9__gnu_cxx27__verbose_terminate_handlerEv+348)
04-12 11:30:38.009 14994-14994/? A/DEBUG: #5 pc 00000000001e7218 /data/app/io.realm.realmtest-1/lib/arm64/librealm-jni.so (_ZN10__cxxabiv111__terminateEPFvvE+8)
04-12 11:30:38.009 14994-14994/? A/DEBUG: #6 pc 00000000001e7284 /data/app/io.realm.realmtest-1/lib/arm64/librealm-jni.so (_ZSt9terminatev+12)
04-12 11:30:38.009 14994-14994/? A/DEBUG: #7 pc 00000000001e7420 /data/app/io.realm.realmtest-1/lib/arm64/librealm-jni.so (__cxa_rethrow+92)
04-12 11:30:38.009 14994-14994/? A/DEBUG: #8 pc 00000000000e7370 /data/app/io.realm.realmtest-1/lib/arm64/librealm-jni.so
04-12 11:30:38.009 14994-14994/? A/DEBUG: #9 pc 00000000000cc850 /data/app/io.realm.realmtest-1/lib/arm64/librealm-jni.so
04-12 11:30:38.009 14994-14994/? A/DEBUG: #10 pc 000000000005b00c /data/app/io.realm.realmtest-1/lib/arm64/librealm-jni.so (Java_io_realm_internal_SharedRealm_nativeGetSharedRealm+400)
04-12 11:30:38.009 14994-14994/? A/DEBUG: #11 pc 000000000038aac0 /data/app/io.realm.realmtest-1/oat/arm64/base.odex (offset 0x345000)
04-12 11:30:38.249 14999-14999/? A/libc: CANNOT LINK EXECUTABLE "/system/bin/sh": can't enable GNU RELRO protection for "": Permission denied
04-12 11:30:38.764 471-2619/? E/ANDR-PERF-OPTSHANDLER: perf_lock_rel: updated /sys/class/scsi_host/host0/../../../clkscale_enable with 1
return value 2

@beeender
Copy link
Contributor

@hw-beijing Which rom are you using? Is it LineageOS rom? We had a same error reported on Xiaomi Mi5 #4174 before.

@hw-beijing
Copy link
Author

H2OS, http://www.h2os.com/

@beeender
Copy link
Contributor

Updates: Since the same problem has happened to Mi5 with LineageOS before, i will flash LineageOS and try it.

@beeender
Copy link
Contributor

beeender commented Apr 17, 2017

mkfifo on external storage fails on AOSP 7.1.1 (reproduced with LineageOS on Mi5) with EINVAL . Will make fix in core side.

@beeender beeender added this to the 3.2 milestone Apr 17, 2017
beeender added a commit that referenced this issue Apr 20, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants