Skip to content

Instantly share code, notes, and snippets.

@hkskoglund
Created October 2, 2018 06:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hkskoglund/cc8269c211806aa6207bd0e7a9f5b467 to your computer and use it in GitHub Desktop.
Save hkskoglund/cc8269c211806aa6207bd0e7a9f5b467 to your computer and use it in GitHub Desktop.
DJI Go Android app 4.3.2 - memory leak when analysing flight/flightlog
10-02 08:04:13.021 20843 20843 E InputEventReceiver: Exception dispatching input event.
10-02 08:04:13.026 20843 20843 D AndroidRuntime: Shutting down VM
10-02 08:04:13.037 20843 20843 E AndroidRuntime: FATAL EXCEPTION: main
10-02 08:04:13.037 20843 20843 E AndroidRuntime: Process: dji.go.v4, PID: 20843
10-02 08:04:13.037 20843 20843 E AndroidRuntime: java.lang.Error: std::bad_alloc
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at com.mapbox.mapboxsdk.style.sources.GeoJsonSource.nativeSetFeatureCollection(Native Method)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at com.mapbox.mapboxsdk.style.sources.GeoJsonSource.setGeoJson(SourceFile:200)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at com.dji.mapkit.mapbox.a.b.a(Unknown Source:75)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at com.dji.mapkit.mapbox.map.c.a(Unknown Source:78)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at dji.gs.c.a.a(Unknown Source:9)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at dji.gs.c.a.b(Unknown Source:73)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at dji.pilot.usercenter.b.c.c(Unknown Source:260)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at dji.pilot2.usercenter.activity.DJIFlightRecordPlayerActivity$3.onProgressChanged(Unknown Source:8)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.widget.SeekBar.onProgressRefresh(SeekBar.java:95)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.widget.ProgressBar.doRefreshProgress(ProgressBar.java:1298)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.widget.ProgressBar.refreshProgress(ProgressBar.java:1353)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.widget.ProgressBar.setProgressInternal(ProgressBar.java:1418)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.widget.AbsSeekBar.trackTouchEvent(AbsSeekBar.java:869)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.widget.AbsSeekBar.onTouchEvent(AbsSeekBar.java:779)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.View.dispatchTouchEvent(View.java:11722)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2961)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2650)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:455)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1828)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.app.Activity.dispatchTouchEvent(Activity.java:3292)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at dji.publics.DJIObject.DJIBaseActivityForVirtualKey.dispatchTouchEvent(Unknown Source:11)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at dji.pilot.publics.objects.DJIBaseActivity.dispatchTouchEvent(Unknown Source:42)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:417)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.View.dispatchPointerEvent(View.java:11961)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4790)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4604)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4142)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4195)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4161)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4288)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4169)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4345)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4142)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4195)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4161)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4169)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4142)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6663)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6637)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6598)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6766)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:186)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:177)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:6737)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:6789)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:778)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:707)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:789)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:98)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.os.Looper.loop(Looper.java:251)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6572)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
10-02 08:04:13.037 20843 20843 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
10-02 08:04:13.041 20843 20843 W libc : pthread_create failed: couldn't allocate 1101824-bytes mapped space: Out of memory
10-02 08:04:13.041 20843 20843 W zygote : Throwing OutOfMemoryError "pthread_create (1072KB stack) failed: Try again"
10-02 08:04:13.063 20843 20854 I zygote : Waiting for a blocking GC HeapTrim
10-02 08:04:13.127 20843 21010 I zygote : Explicit concurrent copying GC freed 108955(3MB) AllocSpace objects, 0(0B) LOS objects, 38% free, 38MB/62MB, paused 706us total 229.037ms
10-02 08:04:13.127 20843 20854 I zygote : WaitForGcToComplete blocked for 64.667ms for cause HeapTrim
10-02 08:04:13.306 20843 21010 E CursorWindow: Could not allocate CursorWindow 'collectDbStats' of size 2097152 due to error -12.
10-02 08:04:13.307 20843 21010 W Binder : Binder call failed.
10-02 08:04:13.307 20843 21010 W Binder : android.database.CursorWindowAllocationException: Cursor window allocation of 2048 kb failed.
10-02 08:04:13.307 20843 21010 W Binder : at android.database.CursorWindow.<init>(CursorWindow.java:108)
10-02 08:04:13.307 20843 21010 W Binder : at android.database.sqlite.SQLiteConnection.collectDbStats(SQLiteConnection.java:1132)
10-02 08:04:13.307 20843 21010 W Binder : at android.database.sqlite.SQLiteConnectionPool.collectDbStats(SQLiteConnectionPool.java:446)
10-02 08:04:13.307 20843 21010 W Binder : at android.database.sqlite.SQLiteDatabase.collectDbStats(SQLiteDatabase.java:2043)
10-02 08:04:13.307 20843 21010 W Binder : at android.database.sqlite.SQLiteDatabase.getDbStats(SQLiteDatabase.java:2035)
10-02 08:04:13.307 20843 21010 W Binder : at android.database.sqlite.SQLiteDebug.getDatabaseInfo(SQLiteDebug.java:153)
10-02 08:04:13.307 20843 21010 W Binder : at android.app.ActivityThread$ApplicationThread.dumpMemInfo(ActivityThread.java:1138)
10-02 08:04:13.307 20843 21010 W Binder : at android.app.ActivityThread$ApplicationThread.dumpMemInfo(ActivityThread.java:1098)
10-02 08:04:13.307 20843 21010 W Binder : at android.app.IApplicationThread$Stub.onTransact(IApplicationThread.java:820)
10-02 08:04:13.307 20843 21010 W Binder : at android.os.Binder.execTransact(Binder.java:674)
@hkskoglund
Copy link
Author

hkskoglund commented Oct 2, 2018

Every 2,0s: adb shell dumpsys meminfo -s $(adb shell pidof -s dji.go.v4)             satellite: Tue Oct  2 08:10:26 2018

Applications Memory Usage (in Kilobytes):
Uptime: 67853617 Realtime: 90902749

** MEMINFO in pid 20843 [dji.go.v4] **

 App Summary
                       Pss(KB)
                        ------
           Java Heap:    37816
         Native Heap:  1749700
                Code:     8064
               Stack:        8
            Graphics:    20656
       Private Other:    23532
              System:    22215

               TOTAL:  1861991       TOTAL SWAP PSS:	 3002

 Objects
               Views:	   997         ViewRootImpl:        3
         AppContexts:        8           Activities:        3
              Assets:        9        AssetManagers:        3
       Local Binders:       44        Proxy Binders:	   35
       Parcel memory:       63         Parcel count:	  411
    Death Recipients:        0      OpenSSL Sockets:	   14
            WebViews:        0

 SQL
    	 MEMORY_USED:     1313
  PAGECACHE_OVERFLOW:	   439          MALLOC_SIZE:	  277

 DATABASES
      pgsz     dbsz   Lookaside(b)          cache  Dbname
         4	 20             38        3/501/2  /data/user/0/dji.go.v4/databases/ThrowalbeLog.db
         4	156             30        2/500/3  /data/user/0/dji.go.v4/databases/com.dji.dji_analytics_a_db
         4	 16             75	 24/502/7  /storage/emulated/0/Mob/comm/dbs/.dh
         4	116            109	38/522/25  /data/user/0/dji.go.v4/databases/dji.db
         4	 20             45        6/502/5  /data/user/0/dji.go.v4/databases/sharesdk.db
         4	168            109	29/513/16  /data/user/0/dji.go.v4/databases/bugly_db_

 Asset Allocations
    zip:/data/app/dji.go.v4-G0zDonOqUl0SxU57J4qJow==/base.apk:/resources.arsc: 10760K
    zip:/data/app/dji.go.v4-G0zDonOqUl0SxU57J4qJow==/base.apk:/assets/fonts/Dji-Demi.ttf: 16K
    zip:/data/app/dji.go.v4-G0zDonOqUl0SxU57J4qJow==/base.apk:/assets/fonts/Dji-Book.ttf: 17K
    zip:/data/app/dji.go.v4-G0zDonOqUl0SxU57J4qJow==/base.apk:/assets/fonts/Dji-icomoon.ttf: 36K
    zip:/data/app/dji.go.v4-G0zDonOqUl0SxU57J4qJow==/base.apk:/assets/fonts/Roboto-BoldItalic.ttf: 162K

`

@hkskoglund
Copy link
Author

`10-02 08:54:49.639 12210 12210 I DJILocationManager: Attempting to get last known location from default providers...
10-02 08:54:49.941 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1244' is in use, cannot remove
10-02 08:54:49.954 12210 12210 D joe-line-layer: layer id=line-layer-1245, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:49.966 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1245' is in use, cannot remove
10-02 08:54:49.975 12210 12210 D joe-line-layer: layer id=line-layer-1246, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:49.992 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1246' is in use, cannot remove
10-02 08:54:49.996 12210 12210 D joe-line-layer: layer id=line-layer-1247, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:50.009 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1247' is in use, cannot remove
10-02 08:54:50.016 12210 12210 D joe-line-layer: layer id=line-layer-1248, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:50.025 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1248' is in use, cannot remove
10-02 08:54:50.032 12210 12210 D joe-line-layer: layer id=line-layer-1249, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:50.042 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1249' is in use, cannot remove
10-02 08:54:50.047 12210 12210 D joe-line-layer: layer id=line-layer-1250, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:50.059 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1250' is in use, cannot remove
10-02 08:54:50.063 12210 12210 D joe-line-layer: layer id=line-layer-1251, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:50.076 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1251' is in use, cannot remove
10-02 08:54:50.081 12210 12210 D joe-line-layer: layer id=line-layer-1252, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:50.094 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1252' is in use, cannot remove
10-02 08:54:50.098 12210 12210 D joe-line-layer: layer id=line-layer-1253, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:50.109 12210 12210 W mbgl    : {dji.go.v4}[General]: Source 'line-source-1253' is in use, cannot remove
10-02 08:54:50.115 12210 12210 D joe-line-layer: layer id=line-layer-1254, zindex=101, cur layer id=line-layer-1, zindex=101
10-02 08:54:50.116 12210 12298 E getNetworkObject: network type:1
10-02 08:54:50.117 12210 12298 E SwUdpService: SwUdpConnect ...result=1
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment