暂停GC错误后的And​​r​​oid 4.4.2升级错误、GC、And、oid

2023-09-12 07:18:04 作者:南巷挽清风

最近我的Galaxy Note的2升级到4.4.2版本。我使用这款手机的发展(使用ADT)和生活是很好,但发布此升级暂停气相色谱法的错误开始来了,我无法来解决。在每年的时代UI画面切换的状态在我的ADT工具LogCat中。下面是错误的转储。

Recently my Galaxy Note 2 was upgraded to version 4.4.2. I am using this phone for development (using ADT) and life was fine but post this upgrade "Pause GC" error started coming and I am unable to resolve. It comes every times UI screen change status in my ADT tool LogCat. Below is dump of the error.

在此先感谢您的帮助。

05-13 22:39:22.538: W/dalvikvm(8350): No implementation found for native Ldalvik/system/VMRuntime;.pauseGc:(Ljava/lang/String;)I
05-13 22:39:22.543: E/MyThread(8350): Pause GC
05-13 22:39:22.543: E/MyThread(8350): java.lang.reflect.InvocationTargetException
05-13 22:39:22.543: E/MyThread(8350):   at java.lang.reflect.Method.invokeNative(Native Method)
05-13 22:39:22.543: E/MyThread(8350):   at java.lang.reflect.Method.invoke(Method.java:515)
05-13 22:39:22.543: E/MyThread(8350):   at android.app.MyThread.pauseGC(MyThread.java:5525)
05-13 22:39:22.543: E/MyThread(8350):   at android.app.MyThread.performLaunchActivity(MyThread.java:2324)
05-13 22:39:22.543: E/MyThread(8350):   at android.app.MyThread.handleLaunchActivity(MyThread.java:2471)
05-13 22:39:22.543: E/MyThread(8350):   at android.app.MyThread.access$900(MyThread.java:175)
05-13 22:39:22.543: E/MyThread(8350):   at android.app.MyThread$H.handleMessage(MyThread.java:1308)
05-13 22:39:22.543: E/MyThread(8350):   at android.os.Handler.dispatchMessage(Handler.java:102)
05-13 22:39:22.543: E/MyThread(8350):   at android.os.Looper.loop(Looper.java:146)
05-13 22:39:22.543: E/MyThread(8350):   at android.app.MyThread.main(MyThread.java:5602)
05-13 22:39:22.543: E/MyThread(8350):   at java.lang.reflect.Method.invokeNative(Native Method)
05-13 22:39:22.543: E/MyThread(8350):   at java.lang.reflect.Method.invoke(Method.java:515)
05-13 22:39:22.543: E/MyThread(8350):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
05-13 22:39:22.543: E/MyThread(8350):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
05-13 22:39:22.543: E/MyThread(8350):   at dalvik.system.NativeStart.main(Native Method)
05-13 22:39:22.543: E/MyThread(8350): Caused by: java.lang.UnsatisfiedLinkError: Native method not found: dalvik.system.VMRuntime.pauseGc:(Ljava/lang/String;)I
05-13 22:39:22.543: E/MyThread(8350):   at dalvik.system.VMRuntime.pauseGc(Native Method)
05-13 22:39:22.543: E/MyThread(8350):   ... 15 more

更新: 我已经在code.android.com(启动的问题http://$c$c.google.com/p/android/issues/detail?id=71073).按照他们的三星的错误,所以我已经提出了这个问题,以三星论坛了。

UPDATE: I have initiated the issue at code.android.com (http://code.google.com/p/android/issues/detail?id=71073). As per them its Samsung bug so I have raised the issue to Samsung forum now.

推荐答案

我的注2(GT-N7100)看到这个问题了一段时间后,安卓4.4.2我想使我的上述评论一个合适的回答。

After seeing this issue for some time on my Note 2 (GT-N7100), Android 4.4.2 I wanted to make my above comment a proper answer.

排序方式分配大小:

我用实现WebRTC时Android相机用于跟踪分配,并可以清楚地看出,每次被调用摄像机和视频呈现到GLSurfaceView在一个新的活动,超过2 MB的垃圾被遗留,这是从来没有收集到GC。

I used webrtc to track allocation when the Android camera is used, and it can be clearly seen that every time the camera is invoked and the video is rendered onto GLSurfaceView in a new Activity, more than 2 MB of trash is left over, which is never ever gathered by GC.

要比较,这里是相同的分配跟踪上华硕便条2,安卓4.2.2:

To compare, here is the same allocation tracked on an ASUS Memo Pad 2, Android 4.2.2:

排序方式分配大小:

在换句话说,在一个注2就可以开始约20-30倍的视频实时取景,之前内存已满,设备死机。

In other words, on a Note 2 you can start a video live view about 20-30 times, before memory is full and the device crashes.

在换句话说:三星推出此问题的更新,去年并没有尚未解决它,也不会以任何方式作出反应。三星是否想让我们买了新设备?看起来这一点。

In other words: Samsung introduced this issue with an update last year and did not yet fix it, nor do they react in any way. Does Samsung want to make us buy a new device? Looks like that.

-

这里是我原来的注释为2014年12月11号:

And here is my original comment as of 2014-12-11:

它带来麻烦。这会导致设备需要更多的内存   比需要和崩溃。我们正在开发的许多图像和一个应用程序   视频,并且由于缺少GC它有可能使机器人到达   64MB的限制(注2)和崩溃,而在其他设备上存储   耗要低得多和存储器总是释放使用之后。对于   例如,华硕记事簿具有相同的分辨率消耗约   12MB,什么三星注2采用24MB。三星设备   更快,不过,可能是因为在GC被删去。

It does cause trouble. It causes the device to take much more memory than needed and crash. We are developing an app with many images and videos, and due to the missing GC it is possible to make Android reach the 64MB limit (Note 2) and crash, whereas on other devices memory consumption is much lower and memory is always released after use. For example, an ASUS Memo Pad with the same resolution consumes about 12MB, for what the Samsung Note 2 takes 24MB. The Samsung device is much faster, though, probably because of the GC being omitted.