我有一个可以在android 6.0上正常运行的项目,但是当我在android 8.0上运行它时,它会压碎方法:
try
{
mSession = new Session(mContext, api_key, session_id); // Crush Here!
}
catch (Exception e)
{
e.printStackTrace(); // Never Gets to the catch! why ??!
}
并在其中,方法如下:
this.init(cacertFile, context, hwdecoding, apiKey, sessionId, model, apiLevel);
在“ Session.class”文件中。
我授予了对设备内部存储设备进行读写的权限。
可能是什么问题?
以下是我收集的一些数据可能会有所帮助:
* * * Crush on the "new Session(...)" method:
=============================================
private void sessionConnect(String api_key, String session_id, String token)
{
if (mSession == null)
{
try
{
mSession = new Session(mContext, api_key, session_id); // Crush Here!
}
catch (Exception e)
{
e.printStackTrace(); // Never Gets to the catch! Why ???
}
mSession.setSessionListener(this);
mSession.setConnectionListener(this);
mSession.setSignalListener(this);
mSession.connect(token);
}
}
* * * Debug params just before the crush:
=========================================
this = {OpenTokStreamer@5445}
api_key = "45276332"
session_id = "1_MX40NTI3NjMzMn5-MTU0MTY2MzEwNjMwMH5mbVZiWGdYN0tETVNWeEZkOE9KVmRKYzd-fg"
token = "T1==cGFydG5lcl9pZD00NTI3NjMzMiZzaWc9MGQ3ZThlYjFmYzcyZGUzMGY1NDBkM2NjNGMwZDQ2YTIzOWUwMmZiZTpzZXNzaW9uX2lkPTFfTVg0ME5USTNOak16TW41LU1UVTBNVFkyTXpFd05qTXdNSDVtYlZaaVdHZFlOMHRFVFZOV2VFWmtPRTlLVm1SS1l6ZC1mZyZjcmVhdGVfdGltZT0xNTQxNjkxMjcyJm5vbmNlPTAuNTkwMzE0MjA5NDYxMjEyMiZyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT0xNTQxNzc3Njcy"
mSession = null
mContext = {Application@5449}
mActivityLifecycleCallbacks = {ArrayList@5453} size = 0
mAssistCallbacks = null
mComponentCallbacks = {ArrayList@5454} size = 0
mFlipfont = 0
mLoadedApk = {LoadedApk@5455}
mBase = {ContextImpl@5456}
shadow$_klass_ = {Class@1873} "class android.app.Application"
shadow$_monitor_ = -2030428451
---------------------------------------------------------------------------------
* * * If I do Step-Into, then I can see that it crush on the method:
====================================================================
this.init(cacertFile, context, hwdecoding, apiKey, sessionId, model, apiLevel);
* * * Debug params just before the crush:
=========================================
this = {Session@5445}
context = {Application@5441}
apiKey = "45276332"
sessionId = "1_MX40NTI3NjMzMn5-MTU0MTY2MzEwNjMwMH5mbVZiWGdYN0tETVNWeEZkOE9KVmRKYzd-fg"
sessionOptions = {Session$DefaultSessionOptions@5449}
cacertFile = "/data/user/0/com.myVideoApp/cache/.ca-cert.pem"
hwdecoding = false
model = 0
apiLevel = 26
---------------------------------------------------------------------------------
* * * Logcat a little before and after the Fatal crush:
=======================================================
(Search "beginning of crash")
2018-11-08 17:38:40.389 9757-9803/com.myVideoApp D/InitIP: D05 384
2018-11-08 17:38:40.389 9757-9803/com.myVideoApp D/InitIP: D06 288
2018-11-08 17:38:40.392 9757-9793/com.myVideoApp D/RenderScript: [RS-DIAG] Launching CPU script : slot(0)
2018-11-08 17:38:40.420 9757-9793/com.myVideoApp D/RenderScript: [RS-DIAG] Invoking CPU script : slot(0)
2018-11-08 17:38:40.421 9757-9793/com.myVideoApp D/RenderScript: [RS-DIAG] Launching CPU script : slot(0)
2018-11-08 17:38:40.428 9757-9803/com.myVideoApp D/onRawReceived: C05
2018-11-08 17:38:40.503 9757-9803/com.myVideoApp D/onRawReceived: C02
2018-11-08 17:38:40.503 9757-9803/com.myVideoApp D/onRawReceived: C03 221696
2018-11-08 17:38:40.503 9757-9803/com.myVideoApp D/InitIP: D05 384
2018-11-08 17:38:40.503 9757-9803/com.myVideoApp D/InitIP: D06 288
2018-11-08 17:38:40.509 9757-9793/com.myVideoApp D/RenderScript: [RS-DIAG] Launching CPU script : slot(0)
2018-11-08 17:38:40.558 9757-9793/com.myVideoApp D/RenderScript: [RS-DIAG] Invoking CPU script : slot(0)
2018-11-08 17:38:40.558 9757-9793/com.myVideoApp D/RenderScript: [RS-DIAG] Launching CPU script : slot(0)
2018-11-08 17:38:40.568 9757-9803/com.myVideoApp D/onRawReceived: C05
2018-11-08 17:38:40.597 9757-9757/com.myVideoApp D/opentok-session: HW decoding enabled? : false
2018-11-08 17:38:40.598 9757-9757/com.myVideoApp D/opentok-audiodevicemanager: AUDIO_DEVICE creating default device
2018-11-08 17:38:40.616 9757-9803/com.myVideoApp D/onRawReceived: C02
2018-11-08 17:38:40.616 9757-9803/com.myVideoApp D/onRawReceived: C03 221696
2018-11-08 17:38:40.617 9757-9803/com.myVideoApp D/InitIP: D05 384
2018-11-08 17:38:40.617 9757-9803/com.myVideoApp D/InitIP: D06 288
2018-11-08 17:38:40.619 9757-9793/com.myVideoApp D/RenderScript: [RS-DIAG] Launching CPU script : slot(0)
2018-11-08 17:38:40.640 3650-4374/? D/ActivityManager: The following uid has registered to recieve broadcast for proxy related updates 10180
2018-11-08 17:38:40.640 9757-9793/com.myVideoApp D/RenderScript: [RS-DIAG] Invoking CPU script : slot(0)
--------- beginning of system
2018-11-08 17:38:40.640 3650-4374/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.sendBroadcast:971 com.android.server.am.ActivityManagerService.requestKnoxVpnToSendProxyBroadcast:29479 com.android.server.am.ActivityManagerService.registerReceiver:23200 android.app.IActivityManager$Stub.onTransact:176 com.android.server.am.ActivityManagerService.onTransact:3862
2018-11-08 17:38:40.641 9757-9793/com.myVideoApp D/RenderScript: [RS-DIAG] Launching CPU script : slot(0)
2018-11-08 17:38:40.643 3650-3650/? D/KnoxVpnEngineService: Vpn Receiver : com.samsung.android.knox.intent.action.VPN_PROXY_BROADCAST_INTERNAL
2018-11-08 17:38:40.643 9757-9757/com.myVideoApp D/JVM: JVM::Initialize@[tid=9757]
2018-11-08 17:38:40.643 9757-9757/com.myVideoApp D/JVM: JVM::JVM@[tid=9757]
2018-11-08 17:38:40.643 3650-3813/? I/KnoxVpnEngineService: vpn handle : Message received
2018-11-08 17:38:40.644 9757-9757/com.myVideoApp D/opentok: *********************** ANDROID SDK android-2.9.0 ********************************
2018-11-08 17:38:40.644 9757-9757/com.myVideoApp D/opentok: **** Lib built on Aug 30 2016 at 01:09:53
2018-11-08 17:38:40.644 9757-9757/com.myVideoApp D/opentok: **** OpenTok Android SDK : fd74797c714c9b83f48c623283a0cd2d6a83e27e
2018-11-08 17:38:40.644 9757-9757/com.myVideoApp D/opentok: **** OpenTok OTKIT : bde819521d6220c6f04ff831d93d5d9271d96227
2018-11-08 17:38:40.644 9757-9757/com.myVideoApp D/opentok: **** WEBRTC REVISION : 52-001 -ca7fe7ea0257ae5e4318549abbe7c0f79063865e-Release-02349d7ac3b59c7017d28f86b599f60fa4f1f498
2018-11-08 17:38:40.645 9757-9757/com.myVideoApp D/opentok: **** Copyright 2016 TokBox, Inc.
2018-11-08 17:38:40.645 9757-9757/com.myVideoApp D/opentok: **** Licensed under the Apache License, Version 2.0
2018-11-08 17:38:40.645 9757-9757/com.myVideoApp D/opentok: ************************************************************************
2018-11-08 17:38:40.646 3271-3271/? E/audit: type=1400 audit(1541691520.638:161): avc: denied { read } for pid=9757 comm="com.myVideoApp" name="stat" dev="proc" ino=4026534927 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:proc_stat:s0 tclass=file permissive=0 SEPF_SM-G930F_8.0.0_0011 audit_filtered
--------- beginning of crash
2018-11-08 17:38:40.648 9757-9757/com.myVideoApp A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc in tid 9757 (com.myVideoApp)
2018-11-08 17:38:40.648 9757-9803/com.myVideoApp D/onRawReceived: C05
2018-11-08 17:38:40.734 3271-3271/? E/audit: type=1400 audit(1541691520.728:162): avc: denied { search } for pid=9918 comm="crash_dump32" name="com.myVideoApp" dev="dm-1" ino=460366 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0 SEPF_SM-G930F_8.0.0_0011 audit_filtered
2018-11-08 17:38:40.735 3271-3271/? I/chatty: uid=1999(audit) /system/bin/auditd identical 1 line
2018-11-08 17:38:40.736 3271-3271/? E/audit: type=1400 audit(1541691520.728:164): avc: denied { search } for pid=9918 comm="crash_dump32" name="com.myVideoApp" dev="dm-1" ino=460366 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0 SEPF_SM-G930F_8.0.0_0011 audit_filtered
2018-11-08 17:38:40.775 9918-9918/? I/crash_dump32: obtaining output fd from tombstoned
2018-11-08 17:38:40.777 3326-3326/? I//system/bin/tombstoned: received crash request for pid 9757
2018-11-08 17:38:40.780 9918-9918/? I/crash_dump32: performing dump of process 9757 (target tid = 9757)
2018-11-08 17:38:40.782 9918-9918/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2018-11-08 17:38:40.782 9918-9918/? A/DEBUG: Build fingerprint: 'samsung/heroltexx/herolte:8.0.0/R16NW/G930FXXU2ERGE:user/release-keys'
2018-11-08 17:38:40.782 9918-9918/? A/DEBUG: Revision: '8'
2018-11-08 17:38:40.782 9918-9918/? A/DEBUG: ABI: 'arm'
2018-11-08 17:38:40.782 9918-9918/? A/DEBUG: pid: 9757, tid: 9757, name: com.myVideoApp >>> com.myVideoApp <<<
2018-11-08 17:38:40.782 9918-9918/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc
2018-11-08 17:38:40.782 9918-9918/? A/DEBUG: Cause: null pointer dereference
2018-11-08 17:38:40.782 9918-9918/? A/DEBUG: r0 00000000 r1 059c7d66 r2 00000004 r3 00000000
2018-11-08 17:38:40.782 9918-9918/? A/DEBUG: r4 00000000 r5 ffb0c598 r6 cc06e1a8 r7 ffb0ca88
2018-11-08 17:38:40.783 9918-9918/? A/DEBUG: r8 cbf25fd8 r9 cc06e1a8 sl f0ef1220 fp f060400c
2018-11-08 17:38:40.783 9918-9918/? A/DEBUG: ip cc04ab68 sp ffb0c530 lr cbb7a64c pc f0eac098 cpsr 600f0030
2018-11-08 17:38:40.785 9918-9918/? A/DEBUG: backtrace:
2018-11-08 17:38:40.785 9918-9918/? A/DEBUG: #00 pc 00052098 /system/lib/libc.so (fclose+3)
2018-11-08 17:38:40.785 9918-9918/? A/DEBUG: #01 pc 0005b648 /data/app/com.myVideoApp-9RMYld3ULGhDFy081B9XSw==/lib/arm/libopentok.so
2018-11-08 17:38:40.785 9918-9918/? A/DEBUG: #02 pc 0005d19c /data/app/com.myVideoApp-9RMYld3ULGhDFy081B9XSw==/lib/arm/libopentok.so (Java_com_opentok_android_Session_init+4452)
2018-11-08 17:38:40.786 9918-9918/? A/DEBUG: #03 pc 00030e25 /data/app/com.myVideoApp-9RMYld3ULGhDFy081B9XSw==/oat/arm/base.odex (offset 0x22000)
2018-11-08 17:38:41.421 3326-3326/? E//system/bin/tombstoned: Tombstone written to: /data/tombstones//tombstone_09
2018-11-08 17:38:41.432 3650-9919/? W/ActivityManager: crash : com.myVideoApp,0
2018-11-08 17:38:41.433 3650-9919/? W/ActivityManager: Force finishing activity com.myVideoApp/.MainActivity
2018-11-08 17:38:41.433 3650-9919/? W/MultiScreenManagerService: moveTaskBackToDisplayIfNeeded(): root activity or app is null, task=TaskRecord{2f01a69d0 #43 A=com.myVideoApp U=0 StackId=1 sz=1}, rootActivity=null
2018-11-08 17:38:41.433 3650-3650/? D/MdnieScenarioControlService: Listener Real Multi Window State : true
2018-11-08 17:38:41.437 3650-3675/? I/BootReceiver: Copying /data/tombstones/tombstone_09 to DropBox (SYSTEM_TOMBSTONE)
2018-11-08 17:38:41.443 3650-3670/? I/ActivityManager: Showing crash dialog for package com.myVideoApp u0
2018-11-08 17:38:41.465 3650-3670/? D/ScrollView: initGoToTop
2018-11-08 17:38:41.529 3650-3669/? D/CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 2600000 uid : 1000 pid : 3650 pkgName : AMS_APP_HOME@CPU_MIN@9
2018-11-08 17:38:41.531 3650-3669/? D/ActivityManagerPerformance: AMP_acquire() HOME
2018-11-08 17:38:41.532 3190-3190/? E/lowmemorykiller: Error writing /proc/9757/oom_score_adj; errno=22
2018-11-08 17:38:41.535 3650-3668/? E/memtrack: Couldn't load memtrack module
2018-11-08 17:38:41.535 3650-3668/? W/android.os.Debug: failed to get memory consumption info: -1
2018-11-08 17:38:41.535 9428-9428/? I/DMT-SMReceiver: Received : com.samsung.android.sm.ACTION_ERROR
2018-11-08 17:38:41.536 9428-9428/? W/ContextImpl: Calling a method in the system process without a qualified user: android.app.ContextImpl.startService:1483 android.content.ContextWrapper.startService:663 android.content.ContextWrapper.startService:663 com.samsung.android.sm.common.SmartManagerReceiver.a:240 com.samsung.android.sm.common.SmartManagerReceiver.onReceive:119
2018-11-08 17:38:41.537 3650-3670/? E/PhoneWindow_APM :: isCalledPackage return false
2018-11-08 17:38:41.538 4046-4059/? D/SystemServicesProxy: updateOverviewLastStackActiveTimeAsync: newTime=1541691521433
2018-11-08 17:38:41.538 3650-4374/? D/SecContentProvider: query(), uri = 17 selection = isSettingsChangesAllowed
2018-11-08 17:38:41.540 3650-4374/? D/SecContentProvider: called from android.uid.systemui:10040
2018-11-08 17:38:41.540 3650-3676/? V/MARsPolicyManager: handelAlertToastWindowStarted pkgName = android, userId = 0
2018-11-08 17:38:41.541 4046-4199/? D/SystemServicesProxy: updateOverviewLastStackActiveTimeAsync: done.
2018-11-08 17:38:41.542 3650-3670/? D/InputDispatcher: Focus left window: 9757
2018-11-08 17:38:41.542 3650-3670/? D/InputDispatcher: Focus entered window: 3650
2018-11-08 17:38:41.542 3650-3670/? V/WindowManager: rotationForOrientationLw(orient=-1, last=0); user=0 sensorRotation=-1 mLidState=-1 mDockMode=0 mHdmiPlugged=false
2018-11-08 17:38:41.542 3650-3670/? D/ViewRootImpl@e7a2b50[myVideoApp]: setView = DecorView@143876f[myVideoApp] TM=true MM=false
2018-11-08 17:38:41.542 3650-3670/? W/Looper: Dispatch took 103ms on android.ui, h=Handler (com.android.server.am.ActivityManagerService$UiHandler) {b74cc31} cb=null msg=1
2018-11-08 17:38:41.544 3650-6788/? D/GamePkgDataHelper: getGamePkgDataIncServer(). com.sec.android.app.launcher
2018-11-08 17:38:41.545 4317-4330/? D/ForegroundUtils: could not check pending caller
2018-11-08 17:38:41.545 3650-6788/? D/GameManagerService: identifyGamePackage. com.sec.android.app.launcher
2018-11-08 17:38:41.545 3650-6788/? D/GamePkgDataHelper: getGamePkgData(). com.sec.android.app.launcher
2018-11-08 17:38:41.546 3650-6788/? D/GameManagerService: identifyGamePackage. com.sec.android.app.launcher
2018-11-08 17:38:41.546 3650-6788/? D/GamePkgDataHelper: getGamePkgData(). com.sec.android.app.launcher
2018-11-08 17:38:41.547 3650-6788/? D/TelephonyManager: getAllCellInfo : Caller (PID / UID / TID): 3650 / 1000 / 6788
2018-11-08 17:38:41.551 3650-3670/? D/ViewRootImpl@e7a2b50[myVideoApp]: dispatchAttachedToWindow
2018-11-08 17:38:41.552 3650-3670/? V/WindowManager: Relayout Window{3170149 u0 Application Error: com.myVideoApp}: viewVisibility=0 req=1015x442 WM.LayoutParams{(0,0)(wrapxwrap) gr=#11 sim=#120 ty=2003 fl=#1820002 pfl=0x110 fmt=-3 wanim=0x10302ec surfaceInsets=Rect(6, 6 - 6, 6) needsMenuKey=2 colorMode=0 naviIconColor=0}
2018-11-08 17:38:41.554 3191-3191/? I/SurfaceFlinger: id=233 createSurf (1027x454),1 flag=4, Application Error: com.myVideoApp#0
2018-11-08 17:38:41.555 3650-3670/? V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0
2018-11-08 17:38:41.557 3650-3670/? D/ViewRootImpl@e7a2b50[myVideoApp]: Relayout returned: old=[0,0][0,0] new=[32,775][1047,1217] result=0x7 surface={valid=true 506706321408} changed=true
2018-11-08 17:38:41.557 3650-4031/? I/OpenGLRenderer: Initialized EGL, version 1.4
2018-11-08 17:38:41.557 3650-4031/? D/OpenGLRenderer: Swap behavior 2
2018-11-08 17:38:41.560 3650-3670/? D/WindowManager: set systemUiVisibility : systemUiFlags= 0x408 fullscreenStackSysUiFlags= 0x0
2018-11-08 17:38:41.560 3650-3670/? D/ViewRootImpl@e7a2b50[myVideoApp]: MSG_WINDOW_FOCUS_CHANGED 1
2018-11-08 17:38:41.560 9428-9922/? V/CrashedAppLogging: isMasterSwitchOff : false
答案 0 :(得分:0)
此处是TokBox开发人员的传播者。
您似乎正在使用不受支持的OpenTok Android SDK版本。请升级到最新的(v2.15.0)OpenTok Android SDK。
要了解有关受支持的客户端SDK的更多信息,请查看以下链接: