45

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.

Thanks in advance for the help.

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

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.

Ajay
  • 1,255
  • 1
  • 17
  • 30
  • 4
    Yes i also got 4.4.2 update on my note 2 recently. from that day onward getting this error. – codezoner May 28 '14 at 07:24
  • I did one exercise to make a blank activity (as default) in ADT tool and ran on my mobile then again getting the same error. This rules out any error in coding done my me. Also I updated my ADT tool with all latest updates but situation is AS IS. – Ajay Jun 07 '14 at 06:25
  • Encountering this same error on the Galaxy Note 8 (GT-N5110, 4.4.2) - the same exact app on the Note 10 2014 Edition works fine though (SM-P600, 4.4.2). Same app also works fine on Acer A1-840FHD (4.4.2), Nexus 7 (4.4.4). – Kyle Aug 01 '14 at 18:45
  • Same here. Note2, updated to 4.4.2. Fortunately doesn't seem to cause any trouble except that nasty message in logcat. – Czechnology Aug 27 '14 at 18:10
  • 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. – Oliver Hausler Nov 07 '14 at 20:11
  • 1
    [Samsung sux](http://stackoverflow.com/questions/27329140/what-is-the-best-strategy-to-recover-from-an-error-neglecting-the-record-where) – Skynet Dec 11 '14 at 08:43
  • Has no one solved this issue yet !! – Sharp Edge Mar 17 '17 at 20:39

2 Answers2

5

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.

Allocation tracked on Samsung Galaxy Note 2

Sorted by allocation size:

Sorted by allocation size

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.

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

Allocation tracked on Asus Memo Pad 2

Sorted by allocation size:

Sorted by allocation size

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.

--

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

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.

Oliver Hausler
  • 4,900
  • 4
  • 35
  • 70
  • Oh, and I forgot to point out that users won't even realize its there device what failed. They will point at whoever made the app, because "Unfortunately, ..." (you got it!) – Oliver Hausler Apr 12 '15 at 23:34
1

I had the same problem as you. I was using ACRA and it was swallowing the crash and only showing this in the logcat.

The error actually made it back to the server and I was able to debug properly. Possibly disable ACRA while debugging and you will see the proper error.

Behr
  • 1,220
  • 18
  • 24
  • 1
    How can I check whether ACRA is enabled in my tool and disable it. – Ajay Aug 05 '14 at 16:38
  • 1
    You would know if it was enabled. You have to include the library into your project and do a bit of configuring to install ACRA. You would see it on your app's main entry point. You would see something like this: @ReportsCrashes(formKey = "", formUri = "http://www.yourselectedbackend.com/reportpath") public class MyApplication extends Application ... – Behr Aug 05 '14 at 18:08
  • 2
    This has nothing to do with the **cause** of the issue, so is not in any practical sense an answer. What you are basically observing is that if you happen to use ACRA it might *conceal* this message (though even that is a bit surprising). However it is **highly doubtful that it could *cause* it.** The real problem is rather a bug in some vendor builds of Android, whereby high level code got in the habit of piercing the abstraction veil to kick something in internals, and then the internals changed so the target of that blind reach behind the current no longer exists to find. – Chris Stratton Oct 23 '14 at 17:16
  • @Chris Stratton : No, not the cause, but it may help someone who was in my situation who had only this to go off of in the logcat. Just trying to help. – Behr Oct 29 '14 at 04:35