Comments (29)
I think you are thinking of this. I am referring to this library. IIRC, it has solved similar issues in the past (4K images on low-spec devices that would crash without using Glide because of buffer allocs/RAM overloads). Read the README there: the library's goal is quite related to this (at least, it addresses this issue). Glide is the officially recommended library for image loading, see #67 . Part of my refactor is fixing things like this. I see Picasso - an inactive and old alternative to Glide - as a dependency on this project. Part of my question is if the app currently uses Picasso to load the images, or asks the native ImageView to just load the whole image. If the latter, I would not be surprised. Even if the former, the difference in Picasso and Glide's caching methods (one of their key differences) would solve this problem precisely.
from familygem.
I resized all the photos to max 1280p, and the OOM error remains. So it's not even the media size - as long as any media is attached, the app tries to allocate a huge buffer.
10-27 22:30:43.010 19702 19711 I art : Background partial concurrent mark sweep GC freed 43129(2MB) AllocSpace objects, 21(2MB) LOS objects, 31% free, 34MB/50MB, paused 7.150ms total 105.155ms
10-27 22:30:43.060 19702 19716 E OpenGLRenderer: GL error: Out of memory!
10-27 22:30:43.060 19702 19716 F OpenGLRenderer: Could not allocate texture for layer (fbo=1 6776x5375)
10-27 22:30:43.060 19702 19716 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 19716 (RenderThread)
10-27 22:30:43.120 554 554 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-27 22:30:43.120 554 554 F DEBUG : Build fingerprint: 'samsung/trltexx/trlte:6.0.1/MMB29M/N910FXXS1DQA1:user/release-keys'
10-27 22:30:43.120 554 554 F DEBUG : Revision: '0'
10-27 22:30:43.120 554 554 F DEBUG : ABI: 'arm'
10-27 22:30:43.120 554 554 F DEBUG : pid: 19702, tid: 19716, name: RenderThread >>> app.familygem <<<
10-27 22:30:43.120 554 554 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
10-27 22:30:43.150 554 554 F DEBUG : Abort message: 'Could not allocate texture for layer (fbo=1 6776x5375)'
10-27 22:30:43.150 554 554 F DEBUG : r0 00000000 r1 00004d04 r2 00000006 r3 ae1fc978
10-27 22:30:43.150 554 554 F DEBUG : r4 ae1fc980 r5 ae1fc930 r6 00000019 r7 0000010c
10-27 22:30:43.150 554 554 F DEBUG : r8 00000001 r9 00000000 sl b6da3ec0 fp 00001900
10-27 22:30:43.150 554 554 F DEBUG : ip 00000006 sp ae1fbfe0 lr b6d68c01 pc b6d6aff0 cpsr 400f0010
10-27 22:30:43.170 554 554 F DEBUG :
10-27 22:30:43.170 554 554 F DEBUG : backtrace:
10-27 22:30:43.170 554 554 F DEBUG : #00 pc 00041ff0 /system/lib/libc.so (tgkill+12)
10-27 22:30:43.170 554 554 F DEBUG : #01 pc 0003fbfd /system/lib/libc.so (pthread_kill+32)
10-27 22:30:43.170 554 554 F DEBUG : #02 pc 0001c397 /system/lib/libc.so (raise+10)
10-27 22:30:43.170 554 554 F DEBUG : #03 pc 00019615 /system/lib/libc.so (__libc_android_abort+34)
10-27 22:30:43.170 554 554 F DEBUG : #04 pc 00017568 /system/lib/libc.so (abort+4)
10-27 22:30:43.170 554 554 F DEBUG : #05 pc 0000841f /system/lib/libcutils.so (__android_log_assert+86)
10-27 22:30:43.170 554 554 F DEBUG : #06 pc 0003eb9b /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #07 pc 00056af1 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #08 pc 00056c2f /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #09 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #10 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #11 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #12 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #13 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #14 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #15 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #16 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #17 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #18 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #19 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #20 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #21 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #22 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #23 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #24 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #25 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #26 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #27 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #28 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #29 pc 0005702d /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #30 pc 00056c27 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #31 pc 00056f1d /system/lib/libhwui.so (_ZN7android10uirenderer10RenderNode11prepareTreeERNS0_8TreeInfoE+60)
10-27 22:30:43.170 554 554 F DEBUG : #32 pc 00084101 /system/lib/libandroid_runtime.so
10-27 22:30:43.170 554 554 F DEBUG : #33 pc 0001dee9 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #34 pc 0001eea1 /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #35 pc 0001efcb /system/lib/libhwui.so
10-27 22:30:43.170 554 554 F DEBUG : #36 pc 00022271 /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+80)
10-27 22:30:43.170 554 554 F DEBUG : #37 pc 00010075 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
10-27 22:30:43.170 554 554 F DEBUG : #38 pc 00062f93 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+70)
10-27 22:30:43.170 554 554 F DEBUG : #39 pc 0003f4ff /system/lib/libc.so (_ZL15__pthread_startPv+30)
10-27 22:30:43.170 554 554 F DEBUG : #40 pc 00019c97 /system/lib/libc.so (__start_thread+6)
10-27 22:30:43.790 554 554 F DEBUG :
10-27 22:30:43.790 554 554 F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
10-27 22:30:43.790 554 554 E DEBUG : AM write failed: Broken pipe
10-27 22:30:43.790 2052 2504 I BootReceiver: Copying /data/tombstones/tombstone_01 to DropBox (SYSTEM_TOMBSTONE)
from familygem.
I will look into this. I don't believe the app currently uses Glide, which I believe would fix this issue as well as increase performance. Thank you for the logcat! Can you share some logcat earlier? Not sure which activity that is from, nor what the stacktrace is (if there is one) and where the offending code is.
from familygem.
I don't believe the app currently uses Glide, which I believe would fix this issue as well as increase performance.
Glide was a proprietary API developed for first 3D accelerators. Later OpenGL standard was developed from it, evolved into dynamic pipeline (OpenGL 4), and then OpenGL ES (essentials) which is used by mobile devices. The thread which receives SIGABORT has a name which suggests that OpenGL is in use.
Can you share some logcat earlier? Not sure which activity that is from
Yeah, I didn't captured that. Will get back to it.
The activity which got activated at the moment of crash was supposed to display details about a person. It does display the details if I tap on a person without any media (photo) attached.
nor what the stacktrace is
The logcat above does include stack trace of the crashed thread. Though looking at the names of libraries it goes through, it's internal Android GUI thread which does the rendering. The application thread which sends commands to the rendering thread probably is in unrelated place when the crash occurs.
What would help here is details on memory use - when OpenGL frame buffer objects (FBOs) are allocated and freed. I'm pretty sure there is a way to track that (as it sounds like quite basic debug), but I never did such things.
The application creates video buffers which exceed size of the screen. Maybe it defines an internal workspace which is larger than the screen? Maybe it does that before releasing a previous workspace?
Definitely the app won't work with low RAM devices unless that is addressed (fixed if there is a bug, or implemented in a different way if this is just how things currently work).
from familygem.
If you are curios, see here about loading large bitmaps efficiently in Android.
from familygem.
Getting that stacktrace would be quite helpful. This is a dense function (assuming it is the code at fault).
from familygem.
Thanks for the explanation.
Continuing the debug - I might have misinterpreted something:
When I tap a person within the app, it doesn't immediately show details of the person - it selects the person first.
Selecting a person switches the tree view to be centered around that person.
I think this is where the problem occurs - I cannot select many of the people, as they have too many connections.
So it is not the "person details" activity that crashes, it's the chart.
Can we make sure that previous chart buffer is freed before the new one is allocated?
Here's a logcat
, captured since the moment of opening the tree:
10-31 12:31:44.805 1597 2740 D InputReader: Input event(9): value=1 when=7601674500000
10-31 12:31:44.805 1597 2740 D InputReader: Input event(9): value=1 when=7601674500000
10-31 12:31:44.805 1597 2740 I InputReader: Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.544 ] when=7601674500000
10-31 12:31:44.805 1597 2740 D InputReader: lastThreadEndTime = 7586733922612, currentThreadStartTime = 7586733925372, diff = 0
10-31 12:31:44.805 1597 2739 I InputDispatcher: Delivering touch to (2880): action: 0x4, toolType: 1
10-31 12:31:44.805 1597 2739 I InputDispatcher: Delivering touch to (26985): action: 0x0, toolType: 1
10-31 12:31:44.805 26985 26985 D ViewRootImpl: ViewPostImeInputStage processPointer 0
10-31 12:31:44.825 572 1108 D Sensorhubs: readContextData: 1, 1, 7, -1
10-31 12:31:44.825 1597 2730 D SensorHubManager: onGetSensorHubDataLocked: library(4) = 1, 1, 7, -1
10-31 12:31:44.825 1597 2729 D CAE : onGetSensorHubData(SensorHubParserProvider.java:92) - onGetSensorHubData Event [event buffer len :4], AP_WAKEUP
10-31 12:31:44.825 1597 2729 I CAE : parse(SensorHubParserProvider.java:188) - buffer size = 4
10-31 12:31:44.825 1597 2729 I CAE : parse(SensorHubParserProvider.java:199) - 1, 1, 7, -1,
10-31 12:31:44.825 1597 2729 D CAE : display(ContextProvider.java:375) - ================= AUTO_ROTATION =================
10-31 12:31:44.825 1597 2729 I CAE : display(ContextProvider.java:391) - Angle=[-1]
10-31 12:31:44.825 1597 2732 D SContextService: updateSContext() : event = Auto Rotation
10-31 12:31:44.825 1597 1597 D WindowOrientationListener: ignoring, touching
10-31 12:31:44.825 1597 1597 V WindowOrientationListener: OrientationSensorJudge.onSContextChanged, Rotation: -1
10-31 12:31:44.875 2880 2880 D KeyguardUpdateMonitor: received broadcast android.intent.action.BATTERY_CHANGED
10-31 12:31:44.875 2880 2880 I PERF : received broadcast android.intent.action.BATTERY_CHANGED
10-31 12:31:44.875 1597 1597 I MotionRecognitionService: Plugged
10-31 12:31:44.875 1597 1597 D MotionRecognitionService: cableConnection= 1
10-31 12:31:44.875 1597 1597 D MotionRecognitionService: setPowerConnected | current backoffstate = 1024 , state =1024
10-31 12:31:44.875 1597 1597 D MotionRecognitionService: skip setTransmitPower.
10-31 12:31:44.885 2880 2880 D KeyguardUpdateMonitor: handleBatteryUpdate
10-31 12:31:44.895 1597 2740 D InputReader: Input event(9): value=0 when=7601768270000
10-31 12:31:44.895 1597 2740 D InputReader: Input event(9): value=0 when=7601768270000
10-31 12:31:44.895 1597 2740 I InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=7601768270000
10-31 12:31:44.895 1597 2739 I InputDispatcher: Delivering touch to (26985): action: 0x1, toolType: 1
10-31 12:31:44.895 26985 26985 D ViewRootImpl: ViewPostImeInputStage processPointer 1
10-31 12:31:45.005 572 1108 D Sensorhubs: readContextData: 1, 1, 7, 0
10-31 12:31:45.005 1597 2730 D SensorHubManager: onGetSensorHubDataLocked: library(4) = 1, 1, 7, 0
10-31 12:31:45.005 1597 2729 D CAE : onGetSensorHubData(SensorHubParserProvider.java:92) - onGetSensorHubData Event [event buffer len :4], AP_WAKEUP
10-31 12:31:45.005 1597 2729 I CAE : parse(SensorHubParserProvider.java:188) - buffer size = 4
10-31 12:31:45.005 1597 2729 I CAE : parse(SensorHubParserProvider.java:199) - 1, 1, 7, 0,
10-31 12:31:45.005 1597 2729 D CAE : display(ContextProvider.java:375) - ================= AUTO_ROTATION =================
10-31 12:31:45.005 1597 2729 I CAE : display(ContextProvider.java:391) - Angle=[0]
10-31 12:31:45.005 1597 2732 D SContextService: updateSContext() : event = Auto Rotation
10-31 12:31:45.015 1597 1597 V WindowOrientationListener: OrientationSensorJudge.onSContextChanged, Rotation: -1
10-31 12:31:45.015 1597 6166 D SSRM:n : SIOP:: AP = 320, PST = 313 (W:14), CUR = 676, LCD = 69
10-31 12:31:46.165 557 2356 E NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
10-31 12:31:46.825 26985 26985 W System.err: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
10-31 12:31:46.825 26985 26985 W System.err: SLF4J: Defaulting to no-operation (NOP) logger implementation
10-31 12:31:46.825 26985 26985 W System.err: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
10-31 12:31:47.425 1597 3366 E Watchdog: !@Sync 251 [10-31 12:31:47.441]
10-31 12:31:47.865 26985 26994 I art : Background partial concurrent mark sweep GC freed 270991(17MB) AllocSpace objects, 0(0B) LOS objects, 19% free, 64MB/80MB, paused 719us total 130.343ms
10-31 12:31:49.325 26985 26985 I Timeline: Timeline: Activity_launch_request id:app.familygem time:7606193
10-31 12:31:49.325 1597 2492 D GameManagerService: identifyGamePackage. app.familygem
10-31 12:31:49.325 1597 2492 D MultiWindowPolicy: Gamemode - return 0, when calling identifyForegroundApp(app.familygem)
10-31 12:31:49.325 1597 2492 D CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1958400 uid : 1000 pid : 1597 pkgName : ACTIVITY_RESUME_BOOSTER@10
10-31 12:31:49.335 1597 2492 D ActivityManager: mDVFSHelper.acquire()
10-31 12:31:49.335 1597 2492 V WindowManager: addAppToken: AppWindowToken{ba8a999 token=Token{74302e0 ActivityRecord{16b68e3 u0 app.familygem/.Principal t23}}} to stack=1 task=23 at 1
10-31 12:31:49.345 1597 2492 D InputDispatcher: Focused application set to: xxxx
10-31 12:31:49.345 1597 2492 D InputDispatcher: Focus left window: 26985
10-31 12:31:49.345 26985 26985 I Choreographer: Skipped 266 frames! The application may be doing too much work on its main thread.
10-31 12:31:49.355 1597 2520 D PointerIcon: setMouseIconStyle1 pointerType: 1001 iconType:101 flag:0 pid:1597 uid:1000
10-31 12:31:49.355 1597 2520 D PointerIcon: setMouseCustomIcon IconType is same.101
10-31 12:31:49.355 1597 2520 D PointerIcon: setHoveringSpenIconStyle1 pointerType: 10001 iconType:1 flag:0 pid:1597 uid:1000
10-31 12:31:49.355 1597 2520 D PointerIcon: setHoveringSpenCustomIcon IconType is same.1
10-31 12:31:49.365 1597 1597 D GameManagerService: NotifyRunnable. pkg: app.familygem, type: 4, isMinimized: false, isTunableApp: false
10-31 12:31:49.365 1597 1597 D GameManagerService: unexpected mPrevNotiType: -1
10-31 12:31:49.485 26985 26985 D TextView: setTypeface with style : 0
10-31 12:31:49.495 26985 26985 D TextView: setTypeface with style : 0
10-31 12:31:50.375 3172 3172 D Recents : onTaskStackChanged
10-31 12:31:50.815 26985 26994 I art : Background partial concurrent mark sweep GC freed 1078691(39MB) AllocSpace objects, 1(18MB) LOS objects, 39% free, 24MB/40MB, paused 1.171ms total 128.738ms
10-31 12:31:51.285 26985 26985 D SecWifiDisplayUtil: Metadata value : none
10-31 12:31:51.285 26985 26985 D ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{19737ff I.E...... R.....ID 0,0-0,0}
10-31 12:31:51.285 1597 4293 D ISSUE_DEBUG: InputChannelName : c7086a app.familygem/app.familygem.Principal
10-31 12:31:51.285 1597 2493 D ActivityManager: post active user change for 0 fullscreen true isFloatingActivity() false isHomeActivity() false
10-31 12:31:51.285 1597 2493 D KnoxTimeoutHandler: postActiveUserChange [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-31 12:31:51.285 1597 1597 D KnoxTimeoutHandler: handleActiveUserChange [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-31 12:31:51.285 26985 26985 I Choreographer: Skipped 114 frames! The application may be doing too much work on its main thread.
10-31 12:31:51.295 1597 1597 I KnoxTimeoutHandler: Shared devices show user statefalse
10-31 12:31:51.435 504 504 I SurfaceFlinger: id=123 createSurf (1x1),1 flag=404, Qrincipal
10-31 12:31:51.435 1597 2503 D StatusBarManagerService: manageDisableList userId=0 what=0x0 pkg=Window{c7086a u0 d0 app.familygem/app.familygem.Principal}
10-31 12:31:51.435 2880 2880 D PhoneStatusBar: setSystemUiVisibility vis=8700 mask=ffffffff oldVal=8600 newVal=8700 diff=100
10-31 12:31:51.445 1597 3228 D InputDispatcher: Focus entered window: 26985
10-31 12:31:51.455 1597 2520 D PointerIcon: setMouseIconStyle1 pointerType: 1001 iconType:101 flag:0 pid:1597 uid:1000
10-31 12:31:51.455 1597 2520 D PointerIcon: setMouseCustomIcon IconType is same.101
10-31 12:31:51.455 1597 2520 D PointerIcon: setHoveringSpenIconStyle1 pointerType: 10001 iconType:1 flag:0 pid:1597 uid:1000
10-31 12:31:51.455 1597 2520 D PointerIcon: setHoveringSpenCustomIcon IconType is same.1
10-31 12:31:51.475 26985 26985 D TextView: setTypeface with style : 0
10-31 12:31:51.505 26985 26985 D TextView: setTypeface with style : 0
10-31 12:31:51.585 26985 26985 W DisplayListCanvas: DisplayListCanvas is started on unbinded RenderNode (without mOwningView)
10-31 12:31:51.595 1597 3580 V WindowStateAnimator: Finishing drawing window Window{c7086a u0 d0 app.familygem/app.familygem.Principal}: mDrawState=DRAW_PENDING
10-31 12:31:51.595 26985 26985 D ViewRootImpl: MSG_RESIZED_REPORT: ci=Rect(0, 96 - 0, 0) vi=Rect(0, 96 - 0, 0) or=1
10-31 12:31:51.605 1597 4379 D InputMethodManagerService: windowGainedFocus mCurrentFocusedUserId - 0 and mSecureKeypadEnabled-false
10-31 12:31:51.615 504 504 D libEGL : eglInitialize EGLDisplay = 0xbe84635c
10-31 12:31:51.615 1597 2520 D KnoxTimeoutHandler: notifyActivityDrawn [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-31 12:31:51.615 1597 1597 D KnoxTimeoutHandler: activityDrawn [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-31 12:31:51.615 1597 1597 I KnoxTimeoutHandler: SD activityfalse
10-31 12:31:51.615 1597 2520 I ActivityManager: Displayed app.familygem/.Principal: +2s262ms
10-31 12:31:51.625 5276 5276 D SamsungIME: onStartInput: No inputType, No imeOption, isInputViewShown = false, isExtractViewShown = false, isShowInputRequested = false, isConfigChanged = false
10-31 12:31:51.725 1597 2493 V WindowStateAnimator: Finishing drawing window Window{c7086a u0 d0 app.familygem/app.familygem.Principal}: mDrawState=HAS_DRAWN
10-31 12:31:51.725 504 504 D libEGL : eglInitialize EGLDisplay = 0xbe84635c
10-31 12:31:51.735 504 783 D libEGL : eglTerminate EGLDisplay = 0xb694164c
10-31 12:31:51.735 504 783 D libEGL : eglTerminate EGLDisplay = 0xb694164c
10-31 12:31:51.745 26985 26985 I Timeline: Timeline: Activity_idle id: android.os.BinderProxy@923cbd2 time:7608616
10-31 12:31:51.745 1597 2520 D WindowAnimator: Skip setting animation background if there is an exiting window only.
10-31 12:31:52.095 1597 2520 D WindowAnimator: Skip setting animation background if there is an exiting window only.
10-31 12:31:52.115 1597 2520 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1958400 uid : 1000 pid : 1597 tag : ACTIVITY_RESUME_BOOSTER@10
10-31 12:31:52.115 1597 2520 D ActivityManager: mDVFSHelper.release()
10-31 12:31:52.115 1597 2520 I Timeline: Timeline: Activity_windows_visible id: ActivityRecord{16b68e3 u0 app.familygem/.Principal t23} time:7608988
10-31 12:31:52.125 504 5231 I SurfaceFlinger: id=122 Removed Blberi (3/8)
10-31 12:31:52.125 504 3521 I SurfaceFlinger: id=122 Removed Blberi (-2/8)
10-31 12:31:52.135 504 504 D libEGL : eglTerminate EGLDisplay = 0xbe8463bc
10-31 12:31:52.165 1597 2520 D KnoxTimeoutHandler: notifyActivityDrawn [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-31 12:31:52.165 1597 2502 D CustomFrequencyManagerService: acquireDVFSLockLocked : type : DVFS_MIN_LIMIT frequency : 1958400 uid : 1000 pid : 1597 pkgName : ACTIVITY_RESUME_BOOSTER@16
10-31 12:31:52.165 1597 1597 D KnoxTimeoutHandler: activityDrawn [MsgParam] userId: 0 fullscreen is true showWhenlocked is false
10-31 12:31:52.165 1597 1597 I KnoxTimeoutHandler: SD activityfalse
10-31 12:31:52.345 26985 26985 V ActivityThread: updateVisibility : ActivityRecord{6782cb9 token=android.os.BinderProxy@e0a4584 {app.familygem/app.familygem.Alberi}} show : false
10-31 12:31:52.345 504 504 D libEGL : eglInitialize EGLDisplay = 0xbe84635c
10-31 12:31:52.475 1597 1597 D CustomFrequencyManagerService: releaseDVFSLockLocked : Getting Lock type frm List : DVFS_MIN_LIMIT frequency : 1958400 uid : 1000 pid : 1597 tag : ACTIVITY_RESUME_BOOSTER@16
10-31 12:31:53.235 1597 2740 D InputReader: Input event(9): value=1 when=7610096329000
10-31 12:31:53.235 1597 2740 D InputReader: Input event(9): value=1 when=7610096329000
10-31 12:31:53.235 1597 2740 I InputReader: Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.545 ] when=7610096329000
10-31 12:31:53.235 1597 2739 I InputDispatcher: Delivering touch to (2880): action: 0x4, toolType: 1
10-31 12:31:53.235 1597 2739 I InputDispatcher: Delivering touch to (26985): action: 0x0, toolType: 1
10-31 12:31:53.235 1597 2740 D InputReader: lastThreadEndTime = 7604300144689, currentThreadStartTime = 7604300147866, diff = 0
10-31 12:31:53.235 26985 26985 D ViewRootImpl: ViewPostImeInputStage processPointer 0
10-31 12:31:53.295 1597 2740 D InputReader: Input event(9): value=0 when=7610166012000
10-31 12:31:53.295 1597 2740 D InputReader: Input event(9): value=0 when=7610166012000
10-31 12:31:53.295 1597 2740 I InputReader: Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=] when=7610166012000
10-31 12:31:53.295 1597 2739 I InputDispatcher: Delivering touch to (26985): action: 0x1, toolType: 1
10-31 12:31:53.295 26985 26985 D ViewRootImpl: ViewPostImeInputStage processPointer 1
10-31 12:31:53.975 26985 26999 E OpenGLRenderer: GL error: Out of memory!
10-31 12:31:53.975 26985 26999 F OpenGLRenderer: Could not allocate texture for layer (fbo=1 7139x5648)
10-31 12:31:53.975 26985 26999 F libc : Fatal signal 6 (SIGABRT), code -6 in tid 26999 (RenderThread)
10-31 12:31:54.035 558 558 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-31 12:31:54.035 558 558 F DEBUG : Build fingerprint: 'samsung/trltexx/trlte:6.0.1/MMB29M/N910FXXS1DQA1:user/release-keys'
10-31 12:31:54.035 558 558 F DEBUG : Revision: '0'
10-31 12:31:54.035 558 558 F DEBUG : ABI: 'arm'
10-31 12:31:54.045 558 558 F DEBUG : pid: 26985, tid: 26999, name: RenderThread >>> app.familygem <<<
10-31 12:31:54.045 558 558 F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
10-31 12:31:54.085 558 558 F DEBUG : Abort message: 'Could not allocate texture for layer (fbo=1 7139x5648)'
10-31 12:31:54.085 558 558 F DEBUG : r0 00000000 r1 00006977 r2 00000006 r3 ae17c978
10-31 12:31:54.085 558 558 F DEBUG : r4 ae17c980 r5 ae17c930 r6 00000019 r7 0000010c
10-31 12:31:54.085 558 558 F DEBUG : r8 00000001 r9 00000000 sl b6d1dec0 fp 000006ec
10-31 12:31:54.085 558 558 F DEBUG : ip 00000006 sp ae17bfe0 lr b6ce2c01 pc b6ce4ff0 cpsr 400f0010
10-31 12:31:54.115 558 558 F DEBUG :
10-31 12:31:54.115 558 558 F DEBUG : backtrace:
10-31 12:31:54.115 558 558 F DEBUG : #00 pc 00041ff0 /system/lib/libc.so (tgkill+12)
10-31 12:31:54.115 558 558 F DEBUG : #01 pc 0003fbfd /system/lib/libc.so (pthread_kill+32)
10-31 12:31:54.115 558 558 F DEBUG : #02 pc 0001c397 /system/lib/libc.so (raise+10)
10-31 12:31:54.115 558 558 F DEBUG : #03 pc 00019615 /system/lib/libc.so (__libc_android_abort+34)
10-31 12:31:54.115 558 558 F DEBUG : #04 pc 00017568 /system/lib/libc.so (abort+4)
10-31 12:31:54.115 558 558 F DEBUG : #05 pc 0000841f /system/lib/libcutils.so (__android_log_assert+86)
10-31 12:31:54.115 558 558 F DEBUG : #06 pc 0003eb9b /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #07 pc 00056af1 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #08 pc 00056c2f /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #09 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #10 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #11 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #12 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #13 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #14 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #15 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #16 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #17 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #18 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #19 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #20 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #21 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #22 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #23 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #24 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #25 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #26 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #27 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #28 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #29 pc 0005702d /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #30 pc 00056c27 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #31 pc 00056f1d /system/lib/libhwui.so (_ZN7android10uirenderer10RenderNode11prepareTreeERNS0_8TreeInfoE+60)
10-31 12:31:54.115 558 558 F DEBUG : #32 pc 00084101 /system/lib/libandroid_runtime.so
10-31 12:31:54.115 558 558 F DEBUG : #33 pc 0001dee9 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #34 pc 0001eea1 /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #35 pc 0001efcb /system/lib/libhwui.so
10-31 12:31:54.115 558 558 F DEBUG : #36 pc 00022271 /system/lib/libhwui.so (_ZN7android10uirenderer12renderthread12RenderThread10threadLoopEv+80)
10-31 12:31:54.115 558 558 F DEBUG : #37 pc 00010075 /system/lib/libutils.so (_ZN7android6Thread11_threadLoopEPv+112)
10-31 12:31:54.115 558 558 F DEBUG : #38 pc 00062f93 /system/lib/libandroid_runtime.so (_ZN7android14AndroidRuntime15javaThreadShellEPv+70)
10-31 12:31:54.115 558 558 F DEBUG : #39 pc 0003f4ff /system/lib/libc.so (_ZL15__pthread_startPv+30)
10-31 12:31:54.115 558 558 F DEBUG : #40 pc 00019c97 /system/lib/libc.so (__start_thread+6)
10-31 12:31:54.715 558 558 F DEBUG :
10-31 12:31:54.715 558 558 F DEBUG : Tombstone written to: /data/tombstones/tombstone_03
10-31 12:31:54.715 558 558 E DEBUG : AM write failed: Broken pipe
10-31 12:31:54.725 558 558 E : ro.product_ship = true
10-31 12:31:54.725 558 558 E : ro.debug_level = 0x4f4c
10-31 12:31:54.725 558 558 E : sys.mobilecare.preload = false
10-31 12:31:54.725 1597 2517 I BootReceiver: Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
10-31 12:31:54.725 4107 4107 E audit : type=1701 msg=audit(1667215914.725:874): auid=4294967295 uid=10036 gid=10036 ses=4294967295 subj=u:r:untrusted_app:s0:c512,c768 pid=26999 comm="RenderThread" reason="memory violation" sig=6
So the scenario above is:
- Tap the tree on list, to Open the tree
- The tree opens
- Tap on a person which has more connections
- The app is supposed to select that person, but instead it crashes
The logcat does include stack trace. We can't get Java stack trace, because Java is not crashing. Java gets force-terminated after OpenGLRenderer
thread causes UNIX signal SIGABORT. The SIGABORT signal terminates a process on OS level, Java VM isn't even informed what happened.
from familygem.
Also, is there a limit of persons displayed?
My full tree actually has 33k people. I narrowed it down to less that 1000 for the app (as with full 33k, the app crashes while loading GEDCOM).
If the app doesn't limit people displayed, then it will always have issues with large trees. The limit could be changeable in options.
from familygem.
My full tree actually has 33k people.
This is a very good reason to move to a full-fledged SQLite db (#67). Right now it uses JSON files.
from familygem.
The logcat does include stack trace. We can't get Java stack trace, because Java is not crashing. Java gets force-terminated after OpenGLRenderer thread causes UNIX signal SIGABORT. The SIGABORT signal terminates a process on OS level, Java VM isn't even informed what happened.
Quite a nasty situation. The app needs to do more logging.
from familygem.
Can you post your gedcom here? 33k and 1000. Hope there is no privacy concern.
from familygem.
I could anonymize my database.
But I think the project should have internal tests, and for that it needs internal GEDCOM trees generator.
Will think about creating that.
from familygem.
True, for automated testing. Though, I am not in the mood to write a test for that; testing on Android is complicated, and dramatically lengthens already long build times. If you send me an annonymized version, I will be able to at least do manual testing.
from familygem.
I don't see even an automated build system.
But even for manual testing, would be nice to be be able to generate large databases.
I will prepare a script for that.
from familygem.
Android uses Gradle. This project uses fastlane for deployment, which supports running tests before deployment.
from familygem.
Whatever you make should probably use the GEDCOM libraries this project uses, so automated tests can be created without new dependencies, and to ensure consistency (that results from tests indicate real-world performance).
from familygem.
Here's some early code.
I assume any test data will be generated before starting an android emulator for testing, so I used Python.
Right now it only generates a single branch, but the core functionality is there.
Names are taken from statistics published by polish gov.
I will probably put that into separate github repo for now, can be integrated later when it is really required.
gedcom-generator-alpha1.7z.txt
from familygem.
Quite a piece of work! Thank you! Though, as I mentioned before, I would want it to be part of the automated test and build system, and that means the test has to be written in Java or Kotlin. We can't automate a test running a Python script using Gradle.
from familygem.
Also, importing the outputted GEDCOM into Gramps gave the following errors:
Error: family 'F0000' (input as @F00000@) father 'I0000' (input as 'I00000') does not refer back to the family. Reference added.
Error: family 'F0000' (input as @F00000@) child 'I0001' (input as 'I00001') does not refer back to the family. Reference added.
(repeated many times)
from familygem.
I don't see even an automated build system.
@mefistotelis I tried to introduce one #49, but the maintainer doesn't understand the benefit
#48 (comment)
from familygem.
I would want it to be part of the automated test and build system
@shmueldabomb441 same here: I already tried to introduce one #48 (comment)
from familygem.
@mefistotelis Kotlin is probably most similar to python. Based on your repos it doesn't look like you have much experience with Java, so I would recommend looking up some syntax cheat sheet for Kotlin. I assume it will be an easier transition for you, and I plan on translating the app to Kotlin anyway (Android studio has a button for it which does most of the work).
from familygem.
I got an idea for how to easily write a test for importing big trees. We should determine a threshold for how long it should take to import a tree of a certain size, and if it takes longer, then fail. And, have a callback to update the UI, and if the callback takes too long, then it means the UI isn't responding fast enough, so fail. This is really relevant to optimizing the import process and finding the bottlenecks. I wonder what a reasonable threshold is for how long it should take. Importing a 1M person tree can't be instant on any hardware.
from familygem.
@mefistotelis according to a comment on the Family Gem play store entry, @michelesalvador said there is no (theoretical) limit. Though, hardware can be a bottleneck. This suggests that the solution is importing and reading/displaying the tree stream-wise, chunks at a time.
from familygem.
@mefistotelis this is the line with the error message in Gramps. Not exactly sure I understand why the error is being caused and what the GEDCOM should look like.
from familygem.
Not exactly sure I understand why the error is being caused and what the GEDCOM should look like.
I know what the problem is. The message is quite clear - there should be redundant references in people. Easy to fix.
from familygem.
I tried adding "2 FAMS @F{:5d}@".format(gperson.families[0])
(or something like that), but it didn't resolve the error.
from familygem.
Thank you everybody for your precious interest on Family Gem.
The app uses Picasso to load images everywhere. So no direct load of large images in any ImageView.
Also, is there a limit of persons displayed?
The diagram has a vertical limit of 100 generations above and 100 below. Those numbers can be set on diagram settings.
But there is no horizontal limit on siblings, cousins, descendants, uncles... so the displayed diagram could become immense.
I agree that this SIGABRT crash is not caused by opening the person profile, but trying to display a huge diagram.
It seems similar to the SIGSEGV crash #76.
Fastlane is not used for the deployment of Family Gem. It was introduced by #26, essentially only to provide the app descriptions to IzzyOnDroid.
At the moment I have a "manual" workflow to deploy the app. It's the only I know. 🤷🏻♂️
@mefistotelis This gedcom generator is really a nice job!
As you said, the error are the missing references 1 FAMS
or 1 FAMC
inside the person towards the family:
0 @I00000@ INDI
1 NAME Adam /Bugiel/
1 FAMS @F00000@
0 @I00001@ INDI
1 NAME Kalina /Bugiel/
1 FAMC @F00000@
0 @F00000@ FAM
1 HUSB @I00000@
1 CHIL @I00001@
It seems that there are tools to use Python on Android. Probably Chaquopy is the right one.
Don't know anything else. I installed Python tonight for the first time.
I confirm that there is no limit on the number of records that can be imported from a GEDCOM file or created inside the app.
We should determine a threshold for how long it should take to import a tree of a certain size, and if it takes longer, then fail.
I suppose that the general approach should be: if the system goes out of memory then fail. There is already something like this on reading the JSON.
Import of a GEDCOM file is done by the FamilySearch ModelParser, that I'm afraid is not able to return a limited number of records.
from familygem.
Ok my generator does allowed me to achieve reproduction.
Steps:
- Un-7zip the attached file, open the GEDCOM file from inside the archive in FamilyGem
test_out-generated-2000-people-tree.7z.txt
-
Go to people list, use the search to find I01005 Marcel Marchlewicz.
-
Long press the name above in search results, select "diagram"
-
Crash will occur
Why that specific person - well, I was clicking over the generated tree and this is the one which crashed the app first. There are almost certainly others, but most people when selected generate diagrams of acceptable sizes.
For the generator tool - I continued developing it in Python. It is here:
https://github.com/mefistotelis/random-family-tree-generator
Why continuing in Python - it shouldn't be that hard to re-implement in another language it that's really necessary, but also I worked near many CI systems for many projects, and the last time I've seen one which didn't supported Python was like 9 years ago. Though I must admit I didn't worked on Android for years as well.
Not sure if the best approach for fixing this issue would be to expose vertical and horizontal limit of persons, or just one total number which can't be exceeded.
The one total would be easier to configure for users, as well as easier to implement within the app.
Ie. there could be internal conditions which set the config option based on the amount of RAM available, or there could be a FAQ which explains which value to change in case of crashes with large trees.
from familygem.
Related Issues (20)
- App crashed during edit HOT 2
- Diagram UI bug: horrible Bond overlap HOT 3
- SIGSEGV crash on drawing large diagram paths on API <= 22
- Why use Set over List?
- Code clarification
- Some Suggestions on the functionalities
- [SUGGESTION] Eastern name order
- Only 648 persons out of 1750 in GEDCOM file imported HOT 1
- Feature request: How are two people related?
- Syncronization with webdav storage
- Minor string issue in Trees display
- [Enhancement] Open GED files HOT 1
- Invalid Dates in GEDCOM HOT 1
- Mariage in the facts tab HOT 1
- non-free component in latest release HOT 3
- help / wiki expansion HOT 2
- Birthday notification for tree creator HOT 1
- Gratitude & changes HOT 1
- Get Error Message When Trying to Import File
- Workaround issues
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 familygem.