Tushar Thakur
Tushar Thakur

Reputation: 986

My Application freezes

I am developing an android application for fingerprint reader, my operations include verifying user fingerprint(continuously), and registering new fingerprints(getting fingerprints from web API). I am using Morpho MSO 1300 fingerprint reader.

when I run my application I am constantly getting following logcat messages

01-02 11:19:48.910 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:49.350 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 295K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:49.770 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:50.210 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 295K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:50.630 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:51.070 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:51.570 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 295K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:52.070 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:52.570 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 295K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:53.000 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:53.500 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 295K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:53.930 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:54.360 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 295K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:54.800 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3633K/4540K, paused 14ms, total 14ms 01-02 11:19:55.300 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 336K, 20% free 3652K/4540K, paused 14ms, total 14ms 01-02 11:19:55.730 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 301K, 20% free 3644K/4540K, paused 14ms, total 14ms 01-02 11:19:56.150 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 295K, 20% free 3644K/4540K, paused 15ms, total 15ms 01-02 11:19:56.600 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3644K/4540K, paused 14ms, total 14ms 01-02 11:19:57.010 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3644K/4540K, paused 14ms, total 14ms 01-02 11:19:57.440 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 295K, 20% free 3644K/4540K, paused 14ms, total 14ms 01-02 11:19:57.880 5286-11417/com.cms.attendance D/dalvikvm: GC_FOR_ALLOC freed 293K, 20% free 3644K/4540K, paused 14ms, total 14ms 01-02 11:19:58.030 24732-24776/com.baidu.video.pad:download V/P2PBase: [11:19:58:040][P2PBase] dns : media.p2sp.baidu.com resolve failed. wait 3

As I increase data in my application, say I get 1000 users from web API and I try to process them and register them in fingerprint reader and sqlite database eventually my application freezes.

Any help will be appreciated.

Upvotes: 0

Views: 111

Answers (1)

Leśniakiewicz
Leśniakiewicz

Reputation: 904

This log means that Garbage collector just released the memory. You are making a lot of allocations and this is the reason why GC have to work frequently.

I recommend You to use Android Profiler (Android Studio 3.0) and try to overcome this problem: https://developer.android.com/studio/profile/memory-profiler.html or past your code so that we can think about it together.

Upvotes: 0

Related Questions