I am getting a large or big value from the webservice. I am using sax parser to parse the value and add it to an arraylist. From the arraylist I am adding to tablelayout with scrollview at the I am getting an out of memory error in android. Can anybody tell me what I need to do to solve the issue? Is there any way to increase the heap size or free heap memory? Can anybody tell me which parser is the best for parsing large xml files?
I have nearly 7000 to 10000 record like article details title
Any help would be appreciated
my stack trace :
II/dalvikvm-heap( 992): Clamp target GC heap from 16.810MB to 16.000MB
D/dalvikvm( 992): GC freed 4148 objects / 272832 bytes in 386ms
I/dalvikvm-heap( 992): Forcing collection of SoftReferences for 8704-byte alloc
ation
I/dalvikvm-heap( 992): Clamp target GC heap from 16.810MB to 16.000MB
D/dalvikvm( 992): GC freed 0 objects / 0 bytes in 353ms
E/dalvikvm-heap( 992): Out of memory on a 8704-byte allocation.
I/dalvikvm( 992): "main" prio=5 tid=3 RUNNABLE
I/dalvikvm( 992): | group="main" sCount=0 dsCount=0 s=N obj=0x4001b268 self=0
xbd00
I/dalvikvm( 992): | sysTid=992 nice=0 sched=0/0 cgrp=default handle=-13440013
84
I/dalvikvm( 992): at android.view.ViewGroup.addInArray(ViewGroup.java:~1918)
I/dalvikvm( 992): at android.view.ViewGroup.addViewInner(ViewGroup.java:1879)
I/dalvikvm( 992): at android.view.ViewGroup.addView(ViewGroup.java:1756)
I/dalvikvm( 992): at android.widget.TableLayout.addView(TableLayout.java:418)
I/dalvikvm( 992): at android.view.ViewGroup.addView(ViewGroup.java:1713)
I/dalvikvm( 992): at android.widget.TableLayout.addView(TableLayout.java:400)
I/dalvikvm( 992): at android.view.ViewGroup.addView(ViewGroup.java:1693)
I/dalvikvm( 992): at android.widget.TableLayout.addView(TableLayout.java:391)
I/dalvikvm( 992): at com.inquest.HomeSearchArticle$HomeSearchTask.onPostExecu
te(HomeSearchArticle.java:199)
I/dalvikvm( 992): at com.inquest.HomeSearchArticle$HomeSearchTask.onPostExecu
te(HomeSearchArticle.java:1)
I/dalvikvm( 992): at android.os.AsyncTask.finish(AsyncTask.java:417)
I/dalvikvm( 992): at android.os.AsyncTask.access$300(AsyncTask.java:127)
I/dalvikvm( 992): at android.os.AsyncTask$InternalHandler.handleMessage(Async
Task.java:429)
I/dalvikvm( 992): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 992): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 992): at android.app.ActivityThread.main(ActivityThread.java:4363
)
I/dalvikvm( 992): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm( 992): at java.lang.reflect.Method.invoke(Method.java:521)
I/dalvikvm( 992): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.r
un(ZygoteInit.java:860)
I/dalvikvm( 992): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
618)
I/dalvikvm( 992): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 992):
I/System.out( 992): ######out of memory error is###java.lang.OutOfMemoryError
I/dalvikvm-heap( 992): Clamp target GC heap from 17.270MB to 16.000MB
D/dalvikvm( 992): GC freed 8418 objects / 744936 bytes in 468ms
I/dalvikvm-heap( 992): Clamp target GC heap from 17.471MB to 16.000MB
D/dalvikvm( 992): GC freed 8605 objects / 481136 bytes in 428ms
I/dalvikvm-heap( 992): Clamp target GC heap from 17.583MB to 16.000MB
D/dalvikvm( 992): GC freed 5050 objects / 297248 bytes in 413ms
I/dalvikvm-heap( 992): Clamp target GC heap from 17.595MB to 16.000MB
D/dalvikvm( 992): GC freed 1927 objects / 77160 bytes in 515ms
I/dalvikvm-heap( 992): Forcing collection of SoftReferences for 1028-byte alloc
ation
I/dalvikvm-heap( 992): Clamp target GC heap from 17.594MB to 16.000MB
D/dalvikvm( 992): GC freed 79 objects / 1264 bytes in 495ms
E/dalvikvm-heap( 992): Out of memory on a 1028-byte allocation.
I/dalvikvm( 992): "main" prio=5 tid=3 RUNNABLE
I/dalvikvm( 992): | group="main" sCount=0 dsCount=0 s=N obj=0x4001b268 self=0
xbd00
I/dalvikvm( 992): | sysTid=992 nice=0 sched=0/0 cgrp=default handle=-13440013
84
I/dalvikvm( 992): at android.text.StaticLayout.generate(StaticLayout.java:~13
8)
I/dalvikvm( 992): at android.text.StaticLayout.<init>(StaticLayout.java:97)
I/dalvikvm( 992): at android.text.StaticLayout.<init>(StaticLayout.java:54)
I/dalvikvm( 992): at android.text.StaticLayout.<init>(StaticLayout.java:45)
I/dalvikvm( 992): at android.widget.TextView.makeNewLayout(TextView.java:4914
)
I/dalvikvm( 992): at android.widget.TextView.onMeasure(TextView.java:5176)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.widget.TableRow.getColumnsWidths(TableRow.java:3
08)
I/dalvikvm( 992): at android.widget.TableLayout.findLargestCells(TableLayout.
java:497)
I/dalvikvm( 992): at android.widget.TableLayout.measureVertical(TableLayout.j
ava:462)
I/dalvikvm( 992): at android.widget.TableLayout.onMeasure(TableLayout.java:42
8)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.widget.ScrollView.measureChildWithMargins(Scroll
View.java:893)
I/dalvikvm( 992): at android.widget.FrameLayout.onMeasure(FrameLayout.java:24
5)
I/dalvikvm( 992): at android.widget.ScrollView.onMeasure(ScrollView.java:276)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.widget.RelativeLayout.measureChildHorizontal(Rel
ativeLayout.java:569)
I/dalvikvm( 992): at android.widget.RelativeLayout.onMeasure(RelativeLayout.j
ava:361)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewGroup.measureChildWithMargins(ViewGroup
.java:3023)
I/dalvikvm( 992): at android.widget.FrameLayout.onMeasure(FrameLayout.java:24
5)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewGroup.measureChildWithMargins(ViewGroup
.java:3023)
I/dalvikvm( 992): at android.widget.FrameLayout.onMeasure(FrameLayout.java:24
5)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewGroup.measureChildWithMargins(ViewGroup
.java:3023)
I/dalvikvm( 992): at android.widget.FrameLayout.onMeasure(FrameLayout.java:24
5)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewGroup.measureChildWithMargins(ViewGroup
.java:3023)
I/dalvikvm( 992): at android.widget.FrameLayout.onMeasure(FrameLayout.java:24
5)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewGroup.measureChildWithMargins(ViewGroup
.java:3023)
I/dalvikvm( 992): at android.widget.FrameLayout.onMeasure(FrameLayout.java:24
5)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.widget.RelativeLayout.measureChildHorizontal(Rel
ativeLayout.java:569)
I/dalvikvm( 992): at android.widget.RelativeLayout.onMeasure(RelativeLayout.j
ava:361)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewGroup.measureChildWithMargins(ViewGroup
.java:3023)
I/dalvikvm( 992): at android.widget.FrameLayout.onMeasure(FrameLayout.java:24
5)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewGroup.measureChildWithMargins(ViewGroup
.java:3023)
I/dalvikvm( 992): at android.widget.LinearLayout.measureChildBeforeLayout(Lin
earLayout.java:888)
I/dalvikvm( 992): at android.widget.LinearLayout.measureHorizontal(LinearLayo
ut.java:619)
I/dalvikvm( 992): at android.widget.LinearLayout.onMeasure(LinearLayout.java:
280)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewGroup.measureChildWithMargins(ViewGroup
.java:3023)
I/dalvikvm( 992): at android.widget.FrameLayout.onMeasure(FrameLayout.java:24
5)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewGroup.measureChildWithMargins(ViewGroup
.java:3023)
I/dalvikvm( 992): at android.widget.FrameLayout.onMeasure(FrameLayout.java:24
5)
I/dalvikvm( 992): at android.view.View.measure(View.java:7964)
I/dalvikvm( 992): at android.view.ViewRoot.performTraversals(ViewRoot.java:76
3)
I/dalvikvm( 992): at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
I/dalvikvm( 992): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 992): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 992): at android.app.ActivityThread.main(ActivityThread.java:4363
)
I/dalvikvm( 992): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm( 992): at java.lang.reflect.Method.invoke(Method.java:521)
I/dalvikvm( 992): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.r
un(ZygoteInit.java:860)
I/dalvikvm( 992): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
618)
I/dalvikvm( 992): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 992):
D/AndroidRuntime( 992): Shutting down VM
W/dalvikvm( 992): threadid=3: thread exiting with uncaught exception (group=0x4
001b188)
E/AndroidRuntime( 992): Uncaught handler: thread main exiting due to uncaught e
xception
I/dalvikvm-heap( 992): Clamp target GC heap from 17.609MB to 16.000MB
D/dalvikvm( 992): GC freed 289 objects / 10728 bytes in 407ms
I/dalvikvm-heap( 992): Forcing collection of SoftReferences for 938-byte alloca
tion
I/dalvikvm-heap( 992): Clamp target GC heap from 17.609MB to 16.000MB
D/dalvikvm( 992): GC freed 0 objects / 0 bytes in 402ms
E/dalvikvm-heap( 992): Out of memory on a 938-byte allocation.
I/dalvikvm( 992): "main" prio=5 tid=3 RUNNABLE
I/dalvikvm( 992): | group="main" sCount=0 dsCount=0 s=N obj=0x4001b268 self=0
xbd00
I/dalvikvm( 992): | sysTid=992 nice=0 sched=0/0 cgrp=default handle=-13440013
84
I/dalvikvm( 992): at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractSt
ringBuilder.java:~97)
I/dalvikvm( 992): at java.lang.AbstractStringBuilder.append0(AbstractStringBu
ilder.java:131)
I/dalvikvm( 992): at java.lang.StringBuffer.append(StringBuffer.java:273)
I/dalvikvm( 992): at java.io.StringWriter.write(StringWriter.java:138)
I/dalvikvm( 992): at java.io.PrintWriter.doWrite(PrintWriter.java:711)
I/dalvikvm( 992): at java.io.PrintWriter.write(PrintWriter.java:686)
I/dalvikvm( 992): at java.io.PrintWriter.write(PrintWriter.java:661)
I/dalvikvm( 992): at java.io.PrintWriter.write(PrintWriter.java:729)
I/dalvikvm( 992): at java.io.PrintWriter.print(PrintWriter.java:492)
I/dalvikvm( 992): at java.io.PrintWriter.println(PrintWriter.java:623)
I/dalvikvm( 992): at java.lang.Throwable.printStackTrace(Throwable.java:316)
I/dalvikvm( 992): at android.util.Log.getStackTraceString(Log.java:234)
I/dalvikvm( 992): at com.android.internal.os.RuntimeInit.crash(RuntimeInit.ja
va:315)
I/dalvikvm( 992): at com.android.internal.os.RuntimeInit$UncaughtHandler.unca
ughtException(RuntimeInit.java:76)
I/dalvikvm( 992): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java
:887)
I/dalvikvm( 992): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java
:884)
I/dalvikvm( 992): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 992):
I/dalvikvm-heap( 992): Clamp target GC heap from 17.614MB to 16.000MB
D/dalvikvm( 992): GC freed 64 objects / 5424 bytes in 447ms
I/dalvikvm-heap( 992): Forcing collection of SoftReferences for 754-byte alloca
tion
I/dalvikvm-heap( 992): Clamp target GC heap from 17.614MB to 16.000MB
D/dalvikvm( 992): GC freed 0 objects / 0 bytes in 440ms
E/dalvikvm-heap( 992): Out of memory on a 754-byte allocation.
I/dalvikvm( 992): "main" prio=5 tid=3 RUNNABLE
I/dalvikvm( 992): | group="main" sCount=0 dsCount=0 s=N obj=0x4001b268 self=0
xbd00
I/dalvikvm( 992): | sysTid=992 nice=0 sched=0/0 cgrp=default handle=-13440013
84
I/dalvikvm( 992): at java.lang.AbstractStringBuilder.enlargeBuffer(AbstractSt
ringBuilder.java:~97)
I/dalvikvm( 992): at java.lang.AbstractStringBuilder.append0(AbstractStringBu
ilder.java:131)
I/dalvikvm( 992): at java.lang.StringBuffer.append(StringBuffer.java:273)
I/dalvikvm( 992): at java.io.StringWriter.write(StringWriter.java:138)
I/dalvikvm( 992): at java.io.PrintWriter.doWrite(PrintWriter.java:711)
I/dalvikvm( 992): at java.io.PrintWriter.write(PrintWriter.java:686)
I/dalvikvm( 992): at java.io.PrintWriter.write(PrintWriter.java:661)
I/dalvikvm( 992): at java.io.PrintWriter.write(PrintWriter.java:729)
I/dalvikvm( 992): at java.io.PrintWriter.print(PrintWriter.java:492)
I/dalvikvm( 992): at java.io.PrintWriter.println(PrintWriter.java:623)
I/dalvikvm( 992): at java.lang.Throwable.printStackTrace(Throwable.java:316)
I/dalvikvm( 992): at android.util.Log.getStackTraceString(Log.java:234)
I/dalvikvm( 992): at com.android.internal.os.RuntimeInit.crash(RuntimeInit.ja
va:323)
I/dalvikvm( 992): at com.android.internal.os.RuntimeInit$UncaughtHandler.unca
ughtException(RuntimeInit.java:76)
I/dalvikvm( 992): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java
:887)
I/dalvikvm( 992): at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java
:884)
I/dalvikvm( 992): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 992):
I/Process ( 60): Sending signal. PID: 992 SIG: 3
I/dalvikvm( 992): threadid=7: reacting to signal 3
I/dalvikvm( 992): Wrote stack trace to '/data/anr/traces.txt'
D/dalvikvm( 60): GC freed 13970 objects / 689880 bytes in 201ms
Thanks
I'm facing a similar problem, although for a different application. Please see my post:
Problem with downloading multiple files using AsyncTask
Related
I have created a test scene in Unity which has only one cube and a directional lightening. When installed in AVD just the name of app is display and shows up nothing...
I could not figure out what is the error.. or what is making my application to stop running
AVD setting that is used are
Target: 4.0.3 API Level 15
Skin: HVGA
RAM: 512 VM: 32
Internal Storage: 200MB
SDCARD:2GB
I/AndroidRuntime( 474): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 549):
D/AndroidRuntime( 549): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<
D/AndroidRuntime( 549): CheckJNI is ON
D/AndroidRuntime( 549): Calling main entry com.android.commands.am.Am
I/ActivityManager( 77): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity} from pid 549
D/PermissionCache( 36): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (22624 us)
W/WindowManager( 77): Failure taking screenshot for (130x195) to layer 21005
D/AndroidRuntime( 549): Shutting down VM
D/dalvikvm( 549): GC_CONCURRENT freed 99K, 77% free 480K/2048K, paused 0ms+1ms
I/AndroidRuntime( 549): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager( 77): Start proc com.asdasd.cd for activity com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity: pid=559 uid=10041 gids={}
W/NetworkManagementSocketTagger( 77): setKernelCountSet(10041, 1) failed with errno -2
I/dalvikvm( 77): Jit: resizing JitTable from 4096 to 8192
I/ARMAssembler( 36): generated scanline__00000077:03515104_00009002_00000000 [127 ipp] (149 ins) at [0x413fba80:0x413fbcd4] in 869530 ns
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 559): Trying to load lib /mnt/asec/com.asdasd.cd-2/lib/libmain.so 0x41023f78
D/dalvikvm( 559): Added shared lib /mnt/asec/com.asdasd.cd-2/lib/libmain.so 0x41023f78
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
W/ActivityManager( 77): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 77): Activity idle timeout for ActivityRecord{411e1ab0 com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity}
D/dalvikvm( 77): GC_CONCURRENT freed 294K, 11% free 8687K/9671K, paused 5ms+7ms
D/dalvikvm( 160): GC_CONCURRENT freed 436K, 8% free 6992K/7559K, paused 4ms+4ms
On Installing on Android the app so similar behavior and generates same similar log
I/ActivityManager( 289): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity bnds=[12,433][125,592]} from pid 546
I/ActivityManager( 289): Start proc com.asdasd.cd for activity com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity: pid=4268 uid=10130 gids={}
W/ResourceType( 289): Skipping entry 0x7f040010 in package table 0 because it is not complex!
W/ResourceType( 289): Skipping entry 0x7f04003d in package table 0 because it is not complex!
D/dalvikvm( 4268): Trying to load lib /mnt/asec/com.asdasd.cd-1/lib/libmain.so 0x2bde3080
D/dalvikvm( 4268): Added shared lib /mnt/asec/com.asdasd.cd-1/lib/libmain.so 0x2bde3080
D/SurfaceFlinger( 136): Release buffer at 0xcddd0
W/ActivityManager( 289): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 289): Activity idle timeout for ActivityRecord{2c57c1e8 com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity}
For gaming better to use genymotion dont use AVD that doesn't support EGL rendering and in android 4.4 use dalvik instead of ART ...
Hope you get my point.
Finally my app is working..!:D Problem is solved by updating and applying latest patch unity 4.6.6p1.. which removes the bug from older version .Hope this will help someone having a similar problem
I'm new to QT Programming
Here's what I did,
I export photo from photoshop to QT
after that I create new QT QUICK PROJECT ( ANDROID )
and open QT DESIGNER FILE which I exported earlier from photoshop
run through ministro,
but my this error occurred
>
Starting remote process ...
D/dalvikvm( 2148): Not late-enabling CheckJNI (already on)
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 2148): GC_FOR_ALLOC freed 45K, 3% free 9074K/9347K, paused 133ms
I/dalvikvm-heap( 2148): Grow heap (frag case) to 10.393MB for 1536016-byte allocation
I/dalvikvm( 2148): threadid=3: reacting to signal 3
D/dalvikvm( 2148): GC_CONCURRENT freed <1K, 3% free 10573K/10887K, paused 6ms+134ms
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 2148): GC_FOR_ALLOC freed 0K, 3% free 10573K/10887K, paused 49ms
I/dalvikvm-heap( 2148): Grow heap (frag case) to 13.688MB for 3456016-byte allocation
I/dalvikvm( 2148): threadid=3: reacting to signal 3
D/dalvikvm( 2148): GC_CONCURRENT freed 0K, 3% free 13948K/14279K, paused 8ms+7ms
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
D/gralloc_goldfish( 2148): Emulator without GPU emulation detected.
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 2148): DexOpt: --- BEGIN 'QtIndustrius-14.jar' (bootstrap=0) ---
D/dalvikvm( 2148): DexOpt: --- END 'QtIndustrius-14.jar' (success) ---
D/dalvikvm( 2148): DEX prep '/data/data/org.kde.necessitas.ministro/files/qt/jar/QtIndustrius-14.jar': unzip in 159ms, rewrite 749ms
D/dalvikvm( 2148): Trying to load lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so 0x412a98f0
D/dalvikvm( 2148): Added shared lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so 0x412a98f0
D/dalvikvm( 2148): No JNI_OnLoad found in /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so 0x412a98f0, skipping init
D/dalvikvm( 2148): Trying to load lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so 0x412a98f0
D/dalvikvm( 2148): Added shared lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so 0x412a98f0
D/dalvikvm( 2148): No JNI_OnLoad found in /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so 0x412a98f0, skipping init
D/dalvikvm( 2148): Trying to load lib /data/data/org.kde.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-9.so 0x412a98f0
D/dalvikvm( 2148): Added shared lib /data/data/org.kde.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-9.so 0x412a98f0
I/Qt ( 2148): qt start
D/dalvikvm( 2148): Trying to load lib /data/data/org.kde.necessitas.example.HOME/lib/libHOME.so 0x412a98f0
W/System.err( 2148): java.lang.reflect.InvocationTargetException
W/System.err( 2148): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 2148): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err( 2148): at org.kde.necessitas.origo.QtActivity.loadApplication(QtActivity.java:144)
W/System.err( 2148): at org.kde.necessitas.origo.QtActivity.access$200(QtActivity.java:77)
W/System.err( 2148): at org.kde.necessitas.origo.QtActivity$3$1$1.run(QtActivity.java:201)
W/System.err( 2148): at android.os.Handler.handleCallback(Handler.java:605)
W/System.err( 2148): at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err( 2148): at android.os.Looper.loop(Looper.java:137)
W/System.err( 2148): at android.app.ActivityThread.main(ActivityThread.java:4424)
W/System.err( 2148): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 2148): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err( 2148): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
W/System.err( 2148): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
W/System.err( 2148): at dalvik.system.NativeStart.main(Native Method)
W/System.err( 2148): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]: 36 could not load needed library 'libQtDeclarative.so' for 'libHOME.so' (load_library[1091]: Library 'libQtDeclarative.so' not found)
W/System.err( 2148): at java.lang.Runtime.load(Runtime.java:340)
W/System.err( 2148): at java.lang.System.load(System.java:521)
W/System.err( 2148): at org.kde.necessitas.industrius.QtNative.loadBundledLibraries(QtNative.java:125)
W/System.err( 2148): at org.kde.necessitas.industrius.QtActivityDelegate.loadApplication(QtActivityDelegate.java:245)
W/System.err( 2148): ... 14 more
> Blockquote
and I think It is because of this
36 could not load needed library 'libQtDeclarative.so' for 'libHOME.so' (load_library[1091]: Library 'libQtDeclarative.so' not found)
I Use
ARMV5
Android Emulator
Someone help me please.
Thank you!
A couple questions:
Did you select Qt Quick Application in Necessitas? Looking at the output it seems as if its not packaging the Declarative module with the application.
What you can try is going into the run settings tab, extending the dropdowns and navigating to the package area. make sure QDeclarative is included. it should do this by default, but without knowing exactly how it was setup, its hard to guess why it did.
Key point, in the 'Package Configuration' area of the run settings, you will see a tab called libraries. Make sure QDeclarative is included.
Also, make sure the declarative module is declared in the .pro file
Hope this helps
In logcat I found these messages, my application runs correctly (No error/ No exception/ and correct result), but why these messages appears in log cat. I closed all cursors. And one more thing, Application goes a little bit slow to displaying activity( Which activity is listed in my logcat message), I think it takes that time to generate these log messages. What is solution for this.
I/ActivityManager( 63): Starting activity: Intent { cmp=com.pankaj.myapp/.SelectedContactActivity (has extras) }
D/dalvikvm( 251): GC freed 2584 objects / 174064 bytes in 139ms
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d2c688 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d2bf58 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d2b5a8 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d29af0 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d293c0 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d28a28 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d26f70 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d26808 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d25e60 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d24310 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d23be0 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d23238 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d21780 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d21028 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d20688 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d1ebd0 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d1e480 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d1dae0 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d1bfa0 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d1b760 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 251): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 251): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor#43d1ac40 on contacts_tags that has not been deactivated or closed
I/dalvikvm( 251): at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
I/dalvikvm( 251): at dalvik.system.NativeStart.run(Native Method)
I/ActivityManager( 63): Displayed activity com.pankaj.myapp/.SelectedContactActivity: 2245 ms (total 2245 ms)
Caller Activity is using List View, And after clicking of list item "SelectedContactActivity" activity calls.
In caller Activity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.contacts_list_item);
SimpleAdapter contactAdapter = getAdapter(); // This method returns SimpleAdapter object
// Bind to our new adapter.
setListAdapter(contactAdapter);
}
protected void onListItemClick(ListView l, View view, int position, long id) {
super.onListItemClick(l, view, position, id);
Intent intent = new Intent().setClass(this, AddModifyTag.class);
intent.putExtra("_id",contactInfo.get("_id"));
intent.putExtra("name", contactInfo.get("name"));
intent.putExtra("number", contactInfo.get("number"));
intent.putExtra("position", position);
this.startActivityForResult(intent, EDIT_CONTACT_TAGS);
}
On called Activity
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
......
......
Cursor tags;
db.open();
tags = db.getContactTags(contactID);
startManagingCursor(tags);
.......
.......
db.close();
}
I think you are getting this error because you did not close the Cursor in onStop() or onDestroy(). Try to close the Cursor. You can also use startManagingCursor() for you Cursor which will help you to close the Cursor by Android.
I have an application which displays a series of custom views in a LinearLayout. The LinearLayout is in a ScrollView. The custom views draw a picture, when their onDraw method is called. Generally this works fine. But occasionally the application crashes on a drawPicture() call. When it crashes, no exception seems to be thrown, but I do get this message in logcat: "Wrote stack trace to 'data/anr/traces.txt'".
The contents of traces.txt is below:
DALVIK THREADS:
"main" prio=5 tid=3 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x2aac2250 self=0x84d00
| sysTid=412 nice=0 sched=0/0 cgrp=unknown handle=2130112448
at android.graphics.Canvas.native_drawPicture(Native Method)
at android.graphics.Canvas.drawPicture(Canvas.java:1404)
at com.MyView.onDraw(PDFPageView.java:100)
at android.view.View.draw(View.java:6534)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at android.view.ViewGroup.drawChild(ViewGroup.java:1531)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.ViewGroup.drawChild(ViewGroup.java:1529)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1258)
at android.view.View.draw(View.java:6537)
at android.widget.FrameLayout.draw(FrameLayout.java:352)
at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1849)
at android.view.ViewRoot.draw(ViewRoot.java:1349)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1114)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4325)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)
"AsyncTask #1" prio=5 tid=17 WAIT
| group="main" sCount=1 dsCount=0 s=N obj=0x2e4262b0 self=0x351ab8
| sysTid=420 nice=10 sched=0/0 cgrp=unknown handle=3480528
at java.lang.Object.wait(Native Method)
- waiting on <0x195468> (a java.lang.VMThread)
at java.lang.Thread.parkFor(Thread.java:1535)
at java.lang.LangAccessImpl.parkFor(LangAccessImpl.java:48)
at sun.misc.Unsafe.park(Unsafe.java:317)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:131)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1996)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:359)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1001)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
at java.lang.Thread.run(Thread.java:1096)
"Binder Thread #3" prio=5 tid=15 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x2e3e9cc0 self=0x191798
| sysTid=419 nice=0 sched=0/0 cgrp=unknown handle=1738736
at dalvik.system.NativeStart.run(Native Method)
"Binder Thread #2" prio=5 tid=13 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x2e3e9c00 self=0x1a7510
| sysTid=418 nice=0 sched=0/0 cgrp=unknown handle=1792360
at dalvik.system.NativeStart.run(Native Method)
"Binder Thread #1" prio=5 tid=11 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x2e3e9b40 self=0x1aae60
| sysTid=417 nice=0 sched=0/0 cgrp=unknown handle=1738512
at dalvik.system.NativeStart.run(Native Method)
"JDWP" daemon prio=5 tid=9 VMWAIT
| group="system" sCount=1 dsCount=0 s=N obj=0x2e3e82a0 self=0x1b82a0
| sysTid=416 nice=0 sched=0/0 cgrp=unknown handle=1792208
at dalvik.system.NativeStart.run(Native Method)
"Signal Catcher" daemon prio=5 tid=7 RUNNABLE
| group="system" sCount=0 dsCount=0 s=N obj=0x2e3e81e8 self=0x1b9420
| sysTid=415 nice=0 sched=0/0 cgrp=unknown handle=1791968
at dalvik.system.NativeStart.run(Native Method)
"HeapWorker" daemon prio=5 tid=5 VMWAIT
| group="system" sCount=1 dsCount=0 s=N obj=0x2d68c4c8 self=0x1b9968
| sysTid=413 nice=0 sched=0/0 cgrp=unknown handle=1792792
at dalvik.system.NativeStart.run(Native Method)
This is the logcat output:
W/WindowManager( 53): Key dispatching timed out sending to com.mypackage/com.mypackage.MyActivity
W/WindowManager( 53): Dispatch state: {{KeyEvent{action=1 code=82 repeat=0 met
a=0 scancode=229 mFlags=8} to Window{4387d7f8 Keyguard paused=false} # 129122478
0532 lw=Window{4387d7f8 Keyguard paused=false} lb=android.view.ViewRoot$W#4387d4
08 fin=false gfw=true ed=true tts=0 wf=false fp=false mcf=Window{4392eb90 com.mypackage
s/com.mypackage.MyActivity paused=false}}}
W/WindowManager( 53): Current state: {{null to Window{4392eb90 com.mypackage
s/com.mypackage.MyActivity paused=false} # 1291225159009 lw=Window{4
392eb90 com.mypackage/com.mypackage.MyActivity paused=false} lb=an
droid.os.BinderProxy#4392e9b8 fin=false gfw=true ed=true tts=0 wf=false fp=false
mcf=Window{4392eb90
com.mypackage/com.mypackage.MyActivity paused
=false}}}
I/ActivityManager( 53): ANR in process: com.mypackage
(last in com.mypackage)
I/ActivityManager( 53): Annotation: keyDispatchingTimedOut
I/ActivityManager( 53): CPU usage:
I/ActivityManager( 53): Load: 0.71 / 0.81 / 0.44
I/ActivityManager( 53): CPU usage from 19028ms to 19ms ago:
I/ActivityManager( 53): com.mypackage: 34% = 34% user + 0% kernel / f
aults: 24 minor
I/ActivityManager( 53): system_server: 2% = 1% user + 0% kernel / faults: 8
minor
I/ActivityManager( 53): com.android.phone: 0% = 0% user + 0% kernel
I/ActivityManager( 53): adbd: 0% = 0% user + 0% kernel / faults: 72 minor
I/ActivityManager( 53): TOTAL: 38% = 36% user + 2% kernel
I/ActivityManager( 53): Removing old ANR trace file from /data/anr/traces.txt
I/Process ( 53): Sending signal. PID: 514 SIG: 3
I/dalvikvm( 514): threadid=7: reacting to signal 3
I/dalvikvm( 514): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 53 SIG: 3
I/dalvikvm( 53): threadid=7: reacting to signal 3
I/dalvikvm( 53): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 96 SIG: 3
I/dalvikvm( 96): threadid=7: reacting to signal 3
I/dalvikvm( 96): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 223 SIG: 3
I/dalvikvm( 223): threadid=7: reacting to signal 3
I/dalvikvm( 223): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 140 SIG: 3
I/dalvikvm( 140): threadid=7: reacting to signal 3
I/dalvikvm( 140): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 120 SIG: 3
I/dalvikvm( 120): threadid=7: reacting to signal 3
I/dalvikvm( 120): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 172 SIG: 3
I/dalvikvm( 172): threadid=7: reacting to signal 3
I/dalvikvm( 172): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 175 SIG: 3
I/dalvikvm( 175): threadid=7: reacting to signal 3
I/dalvikvm( 175): Wrote stack trace to '/data/anr/traces.txt'
I/Process ( 53): Sending signal. PID: 94 SIG: 3
I/dalvikvm( 94): threadid=7: reacting to signal 3
I/dalvikvm( 94): Wrote stack trace to '/data/anr/traces.txt'
W/WindowManager( 53): No window to dispatch pointer action 1
W/WindowManager( 53): No window to dispatch pointer action 1
W/WindowManager( 53): No window to dispatch pointer action 0
W/WindowManager( 53): No window to dispatch pointer action 1
D/dalvikvm( 53): GC freed 12498 objects / 629776 bytes in 174ms
This is not a crash, it's an ANR (Application Not Responding.) It means your application is taking too long to respond to an event (more than 5 seconds.)
This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
i have a problem with a strange out of memory exception that only occurs on some devices (mostly HTC Desire). It happens there every time a user starts a certain activity (no matter how - there are two paths to that activity) and i'm really puzzled as to why (i checked for leaks and couldn't find any)...
The error is either thrown when calling setContentView or shortly after.
This is the code block that throws the error:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(DebugFlags.LOG_MEMORY)
{
MemoryAnalyser.logHeap(this.getClass());
}
setContentView(R.layout.activity_stats);
try
{
monthsAvailable = getMonthTimeStamps();
Spinner xSpin = (Spinner) findViewById(R.id.spinnerTimespan);
m_adapterForSpinner = new ArrayAdapter<CharSequence>(this, android.R.layout.simple_spinner_item);
m_adapterForSpinner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
xSpin.setAdapter(m_adapterForSpinner);
for(Iterator<monthObject> i = monthsAvailable.iterator();i.hasNext();)
{
monthObject xObj = i.next();
String dateString = String.format("%1$te.%1$tm.%1$tY - %2$te.%2$tm.%2$tY", xObj.fromDate, xObj.toDate);
m_adapterForSpinner.add(dateString);
}
xSpin.setSelection(xSpin.getCount()-1);
xSpin.setOnItemSelectedListener(this);
//setupStatData(null, null);
checkStatsAvailable();
//throw(new java.lang.OutOfMemoryError());
}
catch(java.lang.OutOfMemoryError e)
{
MemoryAnalyser.dumpHeap();
MemoryAnalyser.logHeap(this.getClass());
Toast xToast = Toast.makeText(getApplicationContext(), "OutOfMemoryException - bitte Log und Datei com.eventkontor.networkcheck.hprof auf SD-Karte an Entwickler senden", 5000);
xToast.show();
this.finish();
}
if(DebugFlags.LOG_MEMORY)
{
MemoryAnalyser.logHeap(this.getClass());
}
}
as i said - the error is usually thrown when calling setContentView or when calling getMonthTimeStamps()
getMonthTimeStamps is a helper function which creates a list of dates available in the internal database. It creates a couple of (small objects) and returns an ArrayList. Here is the function
private ArrayList<monthObject> getMonthTimeStamps()
{
ArrayList<monthObject> dates = new ArrayList<monthObject>();
Cursor c = getContentResolver().query(CallLogTableMetaData.CONTENT_URI, new String[]{CallLogTableMetaData.CALLOG_DATE}, null, null, CallLogTableMetaData._ID + " asc");
try{
if(c.moveToFirst())
{
SharedPreferences prefs = Utils.getPreferences(this);
int resetDay = prefs.getInt("pref_callog_reset_day", 1);
prefs = null;
long starttime = c.getLong(0);
c.close();
c=null;
Date startDate = new Date(starttime);
GregorianCalendar today = new GregorianCalendar();
GregorianCalendar xCal = new GregorianCalendar();
xCal.setTime(startDate);
xCal.set(GregorianCalendar.DAY_OF_MONTH, resetDay);
while(xCal.before(today))
{
monthObject xObj = new monthObject();
xObj.setTimestamp(xCal.getTimeInMillis());
xObj.setFromDate(xCal.getTime());
xCal.add(GregorianCalendar.MONTH, 1);
xCal.set(GregorianCalendar.DAY_OF_MONTH, resetDay);
xCal.set(Calendar.HOUR_OF_DAY, 0);
xCal.set(Calendar.MINUTE, 0);
xCal.set(Calendar.SECOND, 0);
xCal.set(Calendar.MILLISECOND, 0);
xObj.setToDate(xCal.getTime());
xObj.setToTimestamp(xCal.getTimeInMillis());
dates.add(xObj);
xObj = null;
}
xCal = null;
today = null;
return dates;
}
else
{
return dates;
}
}
finally{
try
{
c.close();
}
catch(Exception e)
{
}
}
}
I'm not claiming that my code is flawless or perfect, but i really don't understand why this error is thrown. The XML-layout doesn't contain any references to images and not very complicated (textview, spinner, tablelayout).
Here is the error log i received from one user:
I/ActivityManager(16789): Starting activity: Intent { cmp=com.eventkontor.networkcheck/.StatActivity }
D/dalvikvm( 5053): GC freed 8267 objects / 556152 bytes in 45ms
D/dalvikvm( 5053): GC freed 1716 objects / 371240 bytes in 45ms
D/dalvikvm( 5053): GC freed 15 objects / 62936 bytes in 56ms
D/dalvikvm( 5053): GC freed 4 objects / 233856 bytes in 77ms
D/dalvikvm( 5053): GC freed 14 objects / 544 bytes in 83ms
W/ActivityManager(16789): Launch timeout has expired, giving up wake lock!
W/ActivityManager(16789): Activity idle timeout for HistoryRecord{46a4b878 com.eventkontor.networkcheck/.StatActivity}
D/dalvikvm( 5053): GC freed 3 objects / 210456 bytes in 107ms
D/dalvikvm( 5053): GC freed 3 objects / 315656 bytes in 118ms
D/dalvikvm( 5210): GC freed 7752 objects / 904320 bytes in 1116ms
D/dalvikvm( 5053): GC freed 2 objects / 48 bytes in 136ms
D/dalvikvm( 5053): GC freed 3 objects / 473448 bytes in 155ms
D/dalvikvm( 641): GC freed 4397 objects / 781024 bytes in 1246ms
D/dalvikvm( 5053): GC freed 2 objects / 48 bytes in 175ms
D/dalvikvm( 5053): GC freed 2 objects / 56 bytes in 203ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.522MB to 24.000MB
D/dalvikvm( 5053): GC freed 3 objects / 710120 bytes in 207ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 2 objects / 56 bytes in 220ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.012MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 16-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 238ms
I/dalvikvm-heap( 5053): Forcing collection of SoftReferences for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 220ms
E/dalvikvm-heap( 5053): Out of memory on a 24-byte allocation.
I/dalvikvm( 5053): "HeapWorker" daemon prio=5 tid=5 RUNNABLE
I/dalvikvm( 5053): | group="system" sCount=0 dsCount=0 s=N obj=0x44e0eab8 self=0x14a298
I/dalvikvm( 5053): | sysTid=5054 nice=0 sched=0/0 cgrp=default handle=1351480
I/dalvikvm( 5053): at com.android.internal.os.BinderInternal$GcWatcher.finalize(BinderInternal.java:~48)
I/dalvikvm( 5053): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 5053):
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=22204KB, Bitmap Size=1806KB
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 291ms
I/dalvikvm-heap( 5053): Forcing collection of SoftReferences for 40-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 220ms
E/dalvikvm-heap( 5053): Out of memory on a 40-byte allocation.
I/dalvikvm( 5053): "main" prio=5 tid=3 RUNNABLE
I/dalvikvm( 5053): | group="main" sCount=0 dsCount=0 s=N obj=0x4001b470 self=0xbdd0
I/dalvikvm( 5053): | sysTid=5053 nice=0 sched=0/0 cgrp=default handle=-1343993180
I/dalvikvm( 5053): at com.eventkontor.networkcheck.StatActivity.getMonthTimeStamps(StatActivity.java:~270)
I/dalvikvm( 5053): at com.eventkontor.networkcheck.StatActivity.onCreate(StatActivity.java:119)
I/dalvikvm( 5053): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
I/dalvikvm( 5053): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
I/dalvikvm( 5053): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
I/dalvikvm( 5053): at android.app.ActivityThread.access$2200(ActivityThread.java:126)
I/dalvikvm( 5053): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
I/dalvikvm( 5053): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 5053): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 5053): at android.app.ActivityThread.main(ActivityThread.java:4595)
I/dalvikvm( 5053): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm( 5053): at java.lang.reflect.Method.invoke(Method.java:521)
I/dalvikvm( 5053): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
I/dalvikvm( 5053): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I/dalvikvm( 5053): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 5053):
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=22204KB, Bitmap Size=1806KB
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 231ms
I/dalvikvm-heap( 5053): Forcing collection of SoftReferences for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 220ms
E/dalvikvm-heap( 5053): Out of memory on a 24-byte allocation.
I/dalvikvm( 5053): "HeapWorker" daemon prio=5 tid=5 RUNNABLE
I/dalvikvm( 5053): | group="system" sCount=0 dsCount=0 s=N obj=0x44e0eab8 self=0x14a298
I/dalvikvm( 5053): | sysTid=5054 nice=0 sched=0/0 cgrp=default handle=1351480
I/dalvikvm( 5053): at com.android.internal.os.BinderInternal$GcWatcher.finalize(BinderInternal.java:~48)
I/dalvikvm( 5053): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 5053):
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=22204KB, Bitmap Size=1806KB
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
I/dalvikvm( 5053): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 5053): Ljava/lang/OutOfMemoryError;: [memory exhausted]
I/dalvikvm( 5053): at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 237ms
I/dalvikvm-heap( 5053): Forcing collection of SoftReferences for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 1 objects / 16 bytes in 220ms
E/dalvikvm-heap( 5053): Out of memory on a 24-byte allocation.
I/dalvikvm( 5053): "main" prio=5 tid=3 RUNNABLE
I/dalvikvm( 5053): | group="main" sCount=0 dsCount=0 s=N obj=0x4001b470 self=0xbdd0
I/dalvikvm( 5053): | sysTid=5053 nice=0 sched=0/0 cgrp=default handle=-1343993180
I/dalvikvm( 5053): at com.eventkontor.networkcheck.StatActivity.getMonthTimeStamps(StatActivity.java:~270)
I/dalvikvm( 5053): at com.eventkontor.networkcheck.StatActivity.onCreate(StatActivity.java:119)
I/dalvikvm( 5053): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
I/dalvikvm( 5053): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
I/dalvikvm( 5053): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
I/dalvikvm( 5053): at android.app.ActivityThread.access$2200(ActivityThread.java:126)
I/dalvikvm( 5053): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
I/dalvikvm( 5053): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 5053): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 5053): at android.app.ActivityThread.main(ActivityThread.java:4595)
I/dalvikvm( 5053): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm( 5053): at java.lang.reflect.Method.invoke(Method.java:521)
I/dalvikvm( 5053): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
I/dalvikvm( 5053): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I/dalvikvm( 5053): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 5053):
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=22204KB, Bitmap Size=1806KB
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 11 objects / 728 bytes in 221ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 221ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 136-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 219ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 220ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 54-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 4 objects / 272 bytes in 221ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 240ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 68-byte allocation
D/dalvikvm( 5053): GC freed 589340 objects / 19930400 bytes in 180ms
I/dalvikvm( 5053): hprof: dumping VM heap to "/sdcard/com.eventkontor.networkcheck.hprof-hptemp".
I/dalvikvm( 5053): hprof: dumping heap strings to "/sdcard/com.eventkontor.networkcheck.hprof".
I/dalvikvm( 5053): hprof: heap dump completed, temp file removed
D/dalvikvm( 5053): GC freed 8 objects / 616 bytes in 1056ms
D/NetworkCheck( 5053): debug. =================================
D/NetworkCheck( 5053): debug.heap native: allocated 5,81MB of 6,94MB (0,61MB free) in [com.eventkontor.networkcheck.StatActivity]
D/NetworkCheck( 5053): debug.memory: allocated: 22,00MB of 24,00MB (19,00MB free)
D/dalvikvm( 5053): GC freed 148 objects / 7608 bytes in 34ms
D/dalvikvm( 5053): GC freed 5 objects / 264 bytes in 33ms
E/dalvikvm-heap( 5053): 32980-byte external allocation too large for this process.
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=2743KB, Bitmap Size=1806KB
E/ ( 5053): VM won't let us allocate 32980 bytes
D/skia ( 5053): --- decoder->decode returned false
D/AndroidRuntime( 5053): Shutting down VM
W/dalvikvm( 5053): threadid=3: thread exiting with uncaught exception (group=0x4001b390)
D/UNHANDLED_EXCEPTION( 5053): Writing unhandled exception to: /data/data/com.eventkontor.networkcheck/files/1.5-55980.stacktrace
I/global ( 5053): Default buffer size used in BufferedWriter constructor. It would be better to be explicit if an 8k-char buffer is required.
D/UNHANDLED_EXCEPTION( 5053): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.eventkontor.networkcheck/com.eventkontor.networkcheck.StatActivity}: android.view.InflateException: Binary XML file line #21: Error inflating class <unknown>
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.access$2200(ActivityThread.java:126)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
D/UNHANDLED_EXCEPTION( 5053): at android.os.Handler.dispatchMessage(Handler.java:99)
D/UNHANDLED_EXCEPTION( 5053): at android.os.Looper.loop(Looper.java:123)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.main(ActivityThread.java:4595)
D/UNHANDLED_EXCEPTION( 5053): at java.lang.reflect.Method.invokeNative(Native Method)
D/UNHANDLED_EXCEPTION( 5053): at java.lang.reflect.Method.invoke(Method.java:521)
D/UNHANDLED_EXCEPTION( 5053): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
D/UNHANDLED_EXCEPTION( 5053): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
D/UNHANDLED_EXCEPTION( 5053): at dalvik.system.NativeStart.main(Native Method)
D/UNHANDLED_EXCEPTION( 5053): Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class <unknown>
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
D/UNHANDLED_EXCEPTION( 5053): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
D/UNHANDLED_EXCEPTION( 5053): at android.widget.Toast.makeText(Toast.java:235)
D/UNHANDLED_EXCEPTION( 5053): at com.eventkontor.networkcheck.StatActivity.onCreate(StatActivity.java:140)
D/UNHANDLED_EXCEPTION( 5053): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
D/UNHANDLED_EXCEPTION( 5053): ... 11 more
D/UNHANDLED_EXCEPTION( 5053): Caused by: java.lang.reflect.InvocationTargetException
D/UNHANDLED_EXCEPTION( 5053): at android.widget.LinearLayout.<init>(LinearLayout.java:92)
D/UNHANDLED_EXCEPTION( 5053): at java.lang.reflect.Constructor.constructNative(Native Method)
D/UNHANDLED_EXCEPTION( 5053): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
D/UNHANDLED_EXCEPTION( 5053): ... 20 more
D/UNHANDLED_EXCEPTION( 5053): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:464)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:340)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
D/UNHANDLED_EXCEPTION( 5053): at android.content.res.Resources.loadDrawable(Resources.java:1705)
D/UNHANDLED_EXCEPTION( 5053): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
D/UNHANDLED_EXCEPTION( 5053): at android.view.View.<init>(View.java:1850)
D/UNHANDLED_EXCEPTION( 5053): at android.view.View.<init>(View.java:1799)
D/UNHANDLED_EXCEPTION( 5053): at android.view.ViewGroup.<init>(ViewGroup.java:296)
D/UNHANDLED_EXCEPTION( 5053): ... 24 more
Thanks
Andreas
It was an infinite loop caused by GregorianCalendar not incrementing the date. Still investigating the issue, but this one has been resolved.
Just reading the stacktrace you problem seems to be of you trying to load some bitmap. That is stated as a root cause Are you loading bunch of images? That exception prevents inflating of your layout. You need ether cache or reduce size of your images.
Look and debug through these
D/UNHANDLED_EXCEPTION( 5053): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:464)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:340)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
D/UNHANDLED_EXCEPTION( 5053): at android.content.res.Resources.loadDrawable(Resources.java:1705)
D/UNHANDLED_EXCEPTION( 5053): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
D/UNHANDLED_EXCEPTION( 5053): at android.view.View.<init>(View.java:1850)
D/UNHANDLED_EXCEPTION( 5053): at android.view.View.<init>(View.java:1799)
D/UNHANDLED_EXCEPTION( 5053): at android.view.ViewGroup.<init>(ViewGroup.java:296)
Have you looked at related questions? Here's a relevant SO search. A few of these point back to this answer on using the BitmapFactory class. This approach down-samples each of the images to reduce their impact on memory. Hope it helps.