Android Application crashing on Lg G2 but not on other phones [duplicate] - android
This question already has answers here:
Android - Signal 11, RS CPP error: Blur radius out of 0-25 pixel bound
(3 answers)
Closed 4 years ago.
So, I have an aplication that executes asynk task and on post execute it generates a listview.
After the json is recieved the app crashes on a LG G2 but not on other phones.
My Log cat is giving this report:
10-09 13:45:47.066: E/Entity Response :(16241): [{"id":"440","name":"Amici's East Coast Pizzeria","address":"226 Redwood Shores Pkwy, Redwood City, CA","lat":"37.5205","lng":"-122.252","promotype":"0.10","tipo":"Cabeleireiros","foto":"http:\/\/s1.postimg.org\/526tyzobj\/image.jpg","distance":"62.03","ranking":"6.202501588797353"},{"id":"446","name":"Applewood Pizza 2 Go","address":"1001 El Camino Real, Menlo Park, CA","lat":"37.453","lng":"-122.182","promotype":"0.50","tipo":"Cabeleireiros","foto":"http:\/\/s27.postimg.org\/yth8q6mb7\/image.jpg","distance":"52.89","ranking":"26.442939242734457"},{"id":"453","name":"Giorgio's","address":"1445 Foxworthy Ave, San Jose, CA","lat":"37.2746","lng":"-121.893","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s10.postimg.org\/lk0r9tbsp\/a_A.jpg","distance":"31.97","ranking":"31.973513511004338"},{"id":"447","name":"Pizza Antica","address":"334 Santana Row # 1065, San Jose, CA","lat":"37.3218","lng":"-121.948","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s11.postimg.org\/gt2rkwr8j\/image.jpg","distance":"36.08","ranking":"36.07806101584471"},{"id":"452","name":"Tony & Alba's Pizza & Pasta","address":"3137 Stevens Creek Blvd, San Jose, CA","lat":"37.3233","lng":"-121.952","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s11.postimg.org\/gt2rkwr8j\/image.jpg","distance":"36.20","ranking":"36.199980176527895"},{"id":"449","name":"House of Pizza","address":"527 S Almaden Ave, San Jose, CA","lat":"37.3264","lng":"-121.888","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s29.postimg.org\/9yarz4nmv\/image.jpg","distance":"37.63","ranking":"37.62658687732519"},{"id":"450","name":"Amici's East Coast Pizzeria","address":"225 W Santa Clara St, San Jose, CA","lat":"37.3347","lng":"-121.894","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s1.postimg.org\/526tyzobj\/image.jpg","distance":"38.38","ranking":"38.38406330985574"},{"id":"309","name":"Round Table Pizza: Sunnyvale-Mary-Central Expy","address":"415 N Mary Ave, Sunnyvale, CA","lat":"37.39","lng":"-122.042","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s1.postimg.org\/526tyzobj\/image.jpg","distance":"43.53","ranking":"43.52522799537428"},{"id":"303","name":"Frankie Johnnie & Luigo Too","address":"939 W El Camino Real, Mountain View, CA","lat":"37.3863","lng":"-122.086","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s29.postimg.org\/9yarz4nmv\/image.jpg","distance":"43.62","ranking":"43.62472294523851"},{"id":"305","name":"Kapp's Pizza Bar & Grill","address":"191 Castro St, Mountain View, CA","lat":"37.3939","lng":"-122.079","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s27.postimg.org\/yth8q6mb7\/image.jpg","distance":"44.36","ranking":"44.3553242060947"},{"id":"306","name":"Round Table Pizza: Mountain View","address":"570 N Shoreline Blvd, Mountain View, CA","lat":"37.4027","lng":"-122.079","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s11.postimg.org\/gt2rkwr8j\/image.jpg","distance":"45.32","ranking":"45.32142235623846"},{"id":"308","name":"Oregano's Wood-Fired Pizza","address":"4546 El Camino Real, Los Altos, CA","lat":"37.4017","lng":"-122.115","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s29.postimg.org\/9yarz4nmv\/image.jpg","distance":"45.81","ranking":"45.8134266627868"},{"id":"443","name":"Pizz'a Chicago","address":"4115 El Camino Real, Palo Alto, CA","lat":"37.4141","lng":"-122.126","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s10.postimg.org\/lk0r9tbsp\/a_A.jpg","distance":"47.38","ranking":"47.37868781103179"},{"id":"444","name":"California Pizza Kitchen","address":"531 Cowper St, Palo Alto, CA","lat":"37.4481","lng":"-122.159","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s29.postimg.org\/9yarz4nmv\/image.jpg","distance":"51.78","ranking":"51.77711350584475"},{"id":"441","name":"North Beach Pizza","address":"240 E 3rd Ave, San Mateo, CA","lat":"37.5653","lng":"-122.323","promotype":"1.00","tipo":"Cabeleireiros","foto":"http:\/\/s27.postimg.org\/yth8q6mb7\/image.jpg","distance":"69.05
10-09 13:46:54.676: D/dalvikvm(16241): GC_FOR_ALLOC freed 455K, 32% free 17111K/25000K, paused 15ms, total 15ms
10-09 13:46:54.696: I/dalvikvm-heap(16241): Grow heap (frag case) to 28.377MB for 9849616-byte allocation
10-09 13:46:54.816: V/RenderScript(16241): Application requested CPU execution
10-09 13:46:54.826: V/RenderScript(16241): 0x61248f10 Launching thread(s), CPUs 4
10-09 13:46:54.836: E/rsC++(16241): RS CPP error: Blur radius out of 0-25 pixel bound
10-09 13:46:54.836: E/rsC++(16241): RS CPP error (masked by previous error): Allocation creation failed
10-09 13:46:54.836: E/rsC++(16241): RS CPP error (masked by previous error): Allocation creation failed
10-09 13:46:54.836: A/libc(16241): Fatal signal 11 (SIGSEGV) at 0x00000028 (code=1), thread 16241
(le.dbjsonstring)
10-09 13:51:59.936: D/HyLog(20453): I : /data/font/config/dfactpre.dat, No such file or directory (2)
10-09 13:52:00.046: D/dalvikvm(20453): GC_FOR_ALLOC freed 85K, 16% free 21227K/25000K, paused 12ms, total 12ms
10-09 13:52:00.046: I/dalvikvm-heap(20453): Grow heap (frag case) to 30.101MB for 7441936-byte allocation
10-09 13:52:00.186: D/dalvikvm(20453): GC_FOR_ALLOC freed 1K, 12% free 28494K/32268K, paused 14ms, total 14ms
10-09 13:52:00.206: I/dalvikvm-heap(20453): Grow heap (frag case) to 49.578MB for 20422912-byte allocation
10-09 13:52:00.406: I/Adreno-EGL(20453): <qeglDrvAPI_eglInitialize:385>: EGL 1.4 QUALCOMM build: ()
10-09 13:52:00.406: I/Adreno-EGL(20453): OpenGL ES Shader Compiler Version: E031.24.00.02
10-09 13:52:00.406: I/Adreno-EGL(20453): Build Date: 01/20/14 Mon
10-09 13:52:00.406: I/Adreno-EGL(20453): Local Branch: PMH2-KK_3.5-RB1-AU61-554722-586267-set2
10-09 13:52:00.406: I/Adreno-EGL(20453): Remote Branch:
10-09 13:52:00.406: I/Adreno-EGL(20453): Local Patches:
10-09 13:52:00.406: I/Adreno-EGL(20453): Reconstruct Branch:
10-09 13:52:00.426: D/OpenGLRenderer(20453): Enabling debug mode 0
10-09 13:52:00.666: I/ActivityManager(20453): Timeline: Activity_idle id: android.os.BinderProxy#428d7ac8 time:183390382
What can it be?
Encountered the issue and I found this post. After experimenting sometime, I found out the exact solution of this problem. Though its very late, but i am posting it here for future help of others.
The problem is self-explanatory.
E/rsC++(16241): RS CPP error: Blur radius out of 0-25 pixel bound
Setting a shadowRadius larger than 25px on a View will crash your app with a segmentation fault. This is due to RenderScript, more specifically ScriptIntrinsicBlur.
More from here: https://developer.android.com/reference/android/renderscript/ScriptIntrinsicBlur.html#setRadius(float)
So use shadowRadius value less than 25px and the problem will be resolved.
So, After a while I found that the problem is on the shadow radius of a textview.
After removing that shaddow it runned great. The strange thing is that the app was running on 3 differente phones and one tablet.
Well, I'll continue my journey through android lolol
Related
How to find location of non fatal error in Android's logcat
I'm getting some non fatal errors on my logcat but no line numbers or anything else that can help me locate the error. As you can see, I'm getting several, including Cursor finalized without prior close() and Window is full, but no idea how to find them. 09-26 14:20:47.743: W/CursorWindow(2090): Window is full: requested allocation 756 bytes, free space 150 bytes, window size 2097152 bytes 09-26 14:20:48.151: D/dalvikvm(2090): GC_FOR_ALLOC freed 1686K, 3% free 90204K/92076K, paused 108ms, total 112ms 09-26 14:20:48.159: W/CursorWrapperInner(2090): Cursor finalized without prior close() 09-26 14:20:48.163: W/CursorWrapperInner(2090): Cursor finalized without prior close() 09-26 14:20:49.759: D/dalvikvm(2090): GC_FOR_ALLOC freed 910K, 2% free 91343K/92436K, paused 115ms, total 115ms 09-26 14:20:51.127: D/dalvikvm(2090): GC_FOR_ALLOC freed 731K, 1% free 92661K/93576K, paused 70ms, total 70ms 09-26 14:20:52.195: D/dalvikvm(2090): GC_FOR_ALLOC freed 683K, 1% free 94024K/94892K, paused 71ms, total 71ms 09-26 14:20:53.303: D/dalvikvm(2090): GC_FOR_ALLOC freed 713K, 1% free 95360K/96256K, paused 77ms, total 77ms 09-26 14:20:54.403: D/dalvikvm(2090): GC_FOR_ALLOC freed 706K, 1% free 96702K/97592K, paused 84ms, total 84ms 09-26 14:20:54.755: W/CursorWindow(2090): Window is full: requested allocation 756 bytes, free space 645 bytes, window size 2097152 bytes 09-26 14:20:55.559: D/dalvikvm(2090): GC_FOR_ALLOC freed 752K, 1% free 98000K/98936K, paused 76ms, total 76ms Any tips? Thanks!
This kind of errors are not exceptions thrown by the program and will therefore not contain a stack-trace. As a general rule of thumb you may find ways to optimize your code by carefully reading the error message and read into the subject concerning the error. As far as I can see it is a problem with allocation of memory. I don't think you can pinpoint them to a specific position in your execution flow since it will probably occur at different points in execution. You can think about your code to see if you can find some memory optimization possibilities. If you want to analyze your code thoroughly you may want to use a tool like 'Eclipse MAT'. Read this tutorial to learn how to use the tool
Do a global file search looking for text like ".query(" in your .java files. That should lead you to places where a Cursor is returned and from there you should be able to determine where they are not being closed.
From these logs, does the memory usage of my Android game seem reasonable?
I have written a game in Java for the Android platform which is currently undergoing thorough testing before it's release. It's all looking good in terms of bugs fixed, etc. but the thing which is troubling me at the moment is the memory usage. It all looks fine when executing on an emulator hosting Android 2.3.3 with 16MB VM Heap as you can see from the following log dumps: Just after booting up before starting my game: 05-23 15:11:43.422: DEBUG/dalvikvm(133): GC_EXPLICIT freed 81K, 50% free 2873K/5703K, external 6185K/6640K, paused 44ms 05-23 15:11:45.222: DEBUG/dalvikvm(60): GC_EXPLICIT freed 164K, 45% free 4104K/7431K, external 4373K/5573K, paused 76ms After starting my game: 05-23 15:12:40.762: DEBUG/dalvikvm(314): GC_EXTERNAL_ALLOC freed 104K, 50% free 2833K/5575K, external 5104K/5748K, paused 46ms 05-23 15:12:41.143: DEBUG/dalvikvm(314): GC_EXTERNAL_ALLOC freed 10K, 50% free 2841K/5575K, external 6046K/6103K, paused 46ms 05-23 15:12:42.202: DEBUG/dalvikvm(314): GC_EXTERNAL_ALLOC freed 79K, 49% free 2925K/5639K, external 7656K/7658K, paused 46ms So, from those entries it seems that I have around 50% available memory to use. -- Now, when I start an emulator hosting Android 4.1.2 with 32MB VM Heap, the values I see from the logs are somewhat disappointing: Just after booting up before starting my game: 05-23 15:08:32.566: DEBUG/dalvikvm(149): GC_CONCURRENT freed 530K, 6% free 9763K/10375K, paused 16ms+19ms, total 132ms 05-23 15:08:32.946: DEBUG/dalvikvm(149): GC_CONCURRENT freed 913K, 10% free 9786K/10823K, paused 16ms+27ms, total 128ms After starting my game: 05-23 15:09:25.706: DEBUG/dalvikvm(618): GC_CONCURRENT freed 418K, 3% free 20563K/21063K, paused 18ms+19ms, total 118ms 05-23 15:09:25.706: DEBUG/dalvikvm(618): WAIT_FOR_CONCURRENT_GC blocked 38ms 05-23 15:09:26.316: DEBUG/dalvikvm(618): GC_FOR_ALLOC freed 557K, 4% free 21761K/22599K, paused 55ms, total 75ms The amount of free memory hover around the 4%-10% mark despite the fact that this emulator has twice the amount of memory. Initially, I thought it may be because the background graphic I am loading is larger (1280x800 pixels vs 800x480 pixels) but disproved this by removing the code that loads the background graphics and noticed that the amount of free memory remained the same. Maybe I'm just paranoid and there isn't actually a problem because from the above logs it seems that immediately after booting up, the Android 4.1.2 instance reports between 6% and 10% of free memory anyway. I have also added some manual memory usage logging for when the game was running on the Android 4.1.2 emulator. You will see from the following log entries, I have included the methods I used to obtain the values (e.g. Runtime.getRuntime().totalMemory()) : 05-23 15:09:26.386: DEBUG/Memory Usage(618): Heap Limit: 32(amount to stay within) 05-23 15:09:26.386: DEBUG/Memory Usage(618): Heap 05-23 15:09:26.386: DEBUG/Memory Usage(618): - Current Total: 23863264 (Runtime.getRuntime().totalMemory()) 05-23 15:09:26.386: DEBUG/Memory Usage(618): - Maximum: 33554432 (Runtime.getRuntime().maxMemory()) 05-23 15:09:26.386: DEBUG/Memory Usage(618): - Free: 792736 (Runtime.getRuntime().freeMemory()) 05-23 15:09:26.386: DEBUG/Memory Usage(618): Native Heap 05-23 15:09:26.386: DEBUG/Memory Usage(618): - Allocated: 10139952 (Debug.getNativeHeapAllocatedSize()) 05-23 15:09:26.396: DEBUG/Memory Usage(618): - Size: 10383360 (Debug.getNativeHeapSize()) 05-23 15:09:26.396: DEBUG/Memory Usage(618): - Free: 136912 (Debug.getNativeHeapFreeSize()) Any suggestions and/or comments would be most welcome. Thanks for reading, Wayne.
Getting Fatal Signal 11 error
I am making a SIP client using PortSIP library made based on AndroidSIPSample project. I get the following error: 01-09 02:00:52.730: A/libc(750): Fatal signal 11 (SIGSEGV) at 0x00000c0d (code=1), thread 750 (ovative.innovox) The error is not coming when I am running AndroidSIPSample project downloaded from PortSIP website. Following is my logcat output: 01-09 02:00:47.910: D/dalvikvm(750): Trying to load lib /data/app-lib/in.innovative.innovox-2/libportsipcore.so 0x416fc190 01-09 02:00:47.981: D/dalvikvm(750): Added shared lib /data/app-lib/in.innovative.innovox-2/libportsipcore.so 0x416fc190 01-09 02:00:48.400: D/dalvikvm(750): GC_FOR_ALLOC freed 63K, 8% free 2656K/2876K, paused 81ms, total 91ms 01-09 02:00:48.432: I/dalvikvm-heap(750): Grow heap (frag case) to 5.087MB for 2457616-byte allocation 01-09 02:00:48.510: D/dalvikvm(750): GC_FOR_ALLOC freed 2K, 5% free 5053K/5280K, paused 70ms, total 70ms 01-09 02:00:49.530: D/dalvikvm(750): GC_FOR_ALLOC freed 28K, 4% free 5351K/5540K, paused 53ms, total 57ms 01-09 02:00:49.550: I/dalvikvm-heap(750): Grow heap (frag case) to 6.451MB for 1127536-byte allocation 01-09 02:00:49.630: D/dalvikvm(750): GC_FOR_ALLOC freed 1K, 3% free 6450K/6644K, paused 73ms, total 73ms 01-09 02:00:51.990: I/Choreographer(750): Skipped 167 frames! The application may be doing too much work on its main thread. 01-09 02:00:52.010: D/gralloc_goldfish(750): Emulator without GPU emulation detected. 01-09 02:00:52.730: A/libc(750): Fatal signal 11 (SIGSEGV) at 0x00000c0d (code=1), thread 750 (ovative.innovox) I don't know what is causing it, I even put images in xhdpi drawable folder for xhdpi devices according to this answer. But still getting the error. Please help me solve this error.
I was getting the error because I was passing wrong argument to a method of the PortSIP library, so because of that the library was throwing error.
RenderScript code not working without rsDebug
I'm completely new to RenderScript. I was trying to get a simple example shown by Romain Guy in http://www.youtube.com/watch?v=5jz0kSuR2j4 working. First off, here's the code. MainActivity.java package com.example.rsgray; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.renderscript.Allocation; import android.renderscript.RenderScript; import android.view.Window; import android.view.WindowManager; import android.widget.ImageView; import android.widget.ImageView.ScaleType; public class MainActivity extends Activity { #Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); requestWindowFeature(Window.FEATURE_NO_TITLE); ImageView iv = new ImageView(this); iv.setScaleType(ScaleType.CENTER_CROP); setContentView(iv); drawGrayScale(iv, R.drawable.tulips); } private void drawGrayScale(ImageView iv, int image) { Bitmap in = BitmapFactory.decodeResource(getResources(), image); Bitmap out = Bitmap.createBitmap(in.getWidth(), in.getHeight(), in.getConfig()); RenderScript rs = RenderScript.create(MainActivity.this); Allocation inAlloc = Allocation.createFromBitmap(rs, in); Allocation outAlloc = Allocation.createTyped(rs, inAlloc.getType()); ScriptC_gray script = new ScriptC_gray(rs, getResources(), R.raw.gray); script.set_in(inAlloc); script.set_out(outAlloc); script.set_script(script); script.invoke_filter(); outAlloc.copyTo(out); iv.setImageBitmap(out); } } gray.rs #pragma version(1) #pragma rs java_package_name(com.example.rsgray) #pragma rs_fp_relaxed rs_allocation in; rs_allocation out; rs_script script; const static float3 gray = { 0.3f, 0.6f, 0.1f }; void root(const uchar4* v_in, uchar4* v_out, const void* usrData, uint32_t x, uint32_t y) { rsDebug("gray.rs", rsUptimeMillis()); float4 inPixel = rsUnpackColor8888(*v_in); float3 result = dot(inPixel.rgb, gray); *v_out = rsPackColorTo8888(result); } void filter() { rsForEach(script, in, out); } and finally, AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.rsgray" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="16" /> <application android:allowBackup="true" android:icon="#drawable/ic_launcher" android:label="#string/app_name" android:theme="#style/AppTheme" > <activity android:name="com.example.rsgray.MainActivity" android:label="#string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> res/drawable-nodpi contains tulips.jpg. You won't find the rsDebug() statement that I've added in gray.rs in Romain Guy's code. Anyway, the code compiles, with or without rsDebug(). However, the problem starts when I try to run the app on a device. I tried to run the app on my Nexus 4 running Android 4.4. With the code as shown, it works fine and I get a greyscale image. However, if I comment out the rsDebug() line, the app does not work. I just get a black screen. Here is the logcat output. With rsDebug() : 11-26 16:22:41.563: D/dalvikvm(21523): GC_FOR_ALLOC freed 69K, 2% free 9046K/9148K, paused 16ms, total 16ms 11-26 16:22:41.573: I/dalvikvm-heap(21523): Grow heap (frag case) to 11.862MB for 3145744-byte allocation 11-26 16:22:41.603: D/dalvikvm(21523): GC_FOR_ALLOC freed <1K, 1% free 12118K/12224K, paused 30ms, total 30ms 11-26 16:22:41.683: D/dalvikvm(21523): GC_FOR_ALLOC freed <1K, 1% free 12117K/12224K, paused 11ms, total 11ms 11-26 16:22:41.693: I/dalvikvm-heap(21523): Grow heap (frag case) to 14.862MB for 3145744-byte allocation 11-26 16:22:41.703: D/dalvikvm(21523): GC_FOR_ALLOC freed 0K, 1% free 15189K/15300K, paused 14ms, total 14ms 11-26 16:22:41.753: V/RenderScript(21523): 0x74ed5020 Launching thread(s), CPUs 4 11-26 16:22:41.753: W/Adreno-RS(21523): <rsdVendorAllocationDestroyQCOM:194>: rsdVendorAllocationDestroy: No context! 11-26 16:22:41.753: E/RenderScript(21523): Successfully loaded runtime: libRSDriver_adreno.so 11-26 16:22:41.783: D/dalvikvm(21523): GC_FOR_ALLOC freed <1K, 1% free 15201K/15300K, paused 11ms, total 11ms 11-26 16:22:41.803: D/dalvikvm(21523): GC_FOR_ALLOC freed <1K, 1% free 15202K/15300K, paused 11ms, total 12ms 11-26 16:22:41.813: W/Adreno-RS(21523): <rsdCompileBitcode:289>: Header check (bitcode_SHA1) failed for /data/data/com.example.rsgray/cache/com.android.renderscript.cache/gray-adreno.meta 11-26 16:22:41.813: W/Adreno-RS(21523): <rsdDumpCompileLog:499>: Build log for gray: RS code uses long(i64) data type 11-26 16:22:41.813: W/Adreno-RS(21523): RS bitcode does not contain an invokable compute root 11-26 16:22:41.813: W/Adreno-RS(21523): <rsdVendorScriptInitQCOM:610>: ERROR: __BuildProgram returned -11 11-26 16:22:41.813: D/RenderScript(21523): long gray.rs 18142906 0x114d6ba 11-26 16:22:41.813: D/RenderScript(21523): long gray.rs 18142906 0x114d6ba 11-26 16:22:41.813: D/RenderScript(21523): long gray.rs 18142906 0x114d6ba 11-26 16:22:41.813: D/RenderScript(21523): long gray.rs 18142906 0x114d6ba . . a million more such lines . 11-26 16:22:44.686: D/RenderScript(21523): long gray.rs 18145771 0x114e1eb 11-26 16:22:44.686: D/RenderScript(21523): long gray.rs 18145771 0x114e1eb 11-26 16:22:44.686: D/RenderScript(21523): long gray.rs 18145771 0x114e1eb 11-26 16:22:44.686: D/RenderScript(21523): long gray.rs 18145771 0x114e1eb 11-26 16:22:44.717: I/Adreno-EGL(21523): <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM build: (CL3776187) 11-26 16:22:44.717: I/Adreno-EGL(21523): OpenGL ES Shader Compiler Version: 11-26 16:22:44.717: I/Adreno-EGL(21523): Build Date: 10/15/13 Tue 11-26 16:22:44.717: I/Adreno-EGL(21523): Local Branch: 11-26 16:22:44.717: I/Adreno-EGL(21523): Remote Branch: partner/upstream 11-26 16:22:44.717: I/Adreno-EGL(21523): Local Patches: 11-26 16:22:44.717: I/Adreno-EGL(21523): Reconstruct Branch: 11-26 16:22:44.747: D/OpenGLRenderer(21523): Enabling debug mode 0 Without rsDebug() : 11-26 16:23:41.327: D/dalvikvm(21902): GC_FOR_ALLOC freed 56K, 1% free 9046K/9136K, paused 18ms, total 18ms 11-26 16:23:41.337: I/dalvikvm-heap(21902): Grow heap (frag case) to 11.862MB for 3145744-byte allocation 11-26 16:23:41.367: D/dalvikvm(21902): GC_FOR_ALLOC freed <1K, 1% free 12118K/12212K, paused 27ms, total 27ms 11-26 16:23:41.427: D/dalvikvm(21902): GC_FOR_ALLOC freed <1K, 1% free 12117K/12212K, paused 11ms, total 11ms 11-26 16:23:41.437: I/dalvikvm-heap(21902): Grow heap (frag case) to 14.862MB for 3145744-byte allocation 11-26 16:23:41.447: D/dalvikvm(21902): GC_FOR_ALLOC freed 0K, 1% free 15189K/15288K, paused 12ms, total 12ms 11-26 16:23:41.477: V/RenderScript(21902): 0x74ed4f18 Launching thread(s), CPUs 4 11-26 16:23:41.477: W/Adreno-RS(21902): <rsdVendorAllocationDestroyQCOM:194>: rsdVendorAllocationDestroy: No context! 11-26 16:23:41.477: E/RenderScript(21902): Successfully loaded runtime: libRSDriver_adreno.so 11-26 16:23:41.507: D/dalvikvm(21902): GC_FOR_ALLOC freed <1K, 1% free 15201K/15288K, paused 12ms, total 13ms 11-26 16:23:41.527: D/dalvikvm(21902): GC_FOR_ALLOC freed <1K, 1% free 15202K/15288K, paused 12ms, total 12ms 11-26 16:23:41.537: D/bcc(21902): Cache /data/data/com.example.rsgray/cache/com.android.renderscript.cache/gray.o.info is dirty due to the source it dependends on has been changed: 11-26 16:23:43.419: I/Adreno-EGL(21902): <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM build: (CL3776187) 11-26 16:23:43.419: I/Adreno-EGL(21902): OpenGL ES Shader Compiler Version: 11-26 16:23:43.419: I/Adreno-EGL(21902): Build Date: 10/15/13 Tue 11-26 16:23:43.419: I/Adreno-EGL(21902): Local Branch: 11-26 16:23:43.419: I/Adreno-EGL(21902): Remote Branch: partner/upstream 11-26 16:23:43.419: I/Adreno-EGL(21902): Local Patches: 11-26 16:23:43.419: I/Adreno-EGL(21902): Reconstruct Branch: 11-26 16:23:43.449: D/OpenGLRenderer(21902): Enabling debug mode 0 I can not understand how a debug statement can affect the way in which the app runs. Any help on why I'm facing this problem would be much appreciated. So that's the first part of my problem. The second part : When I try to run the exact same code on the Galaxy Note 10.1 N8013 running Android 4.1.2 and on another piece of hardware with the APQ8064, also running Android 4.1.2, the app does not work. Here's the logcat output with my hardware : 01-02 00:00:51.043: E/Trace(1684): error opening trace file: No such file or directory (2) 01-02 00:00:51.043: D/ActivityThread(1684): setTargetHeapUtilization:0.25 01-02 00:00:51.043: D/ActivityThread(1684): setTargetHeapIdealFree:8388608 01-02 00:00:51.053: D/ActivityThread(1684): setTargetHeapConcurrentStart:2097152 01-02 00:00:51.183: V/RenderScript(1684): rsContextCreate dev=0x7276fdd0 01-02 00:00:51.183: V/RenderScript(1684): 0x616350e0 Launching thread(s), CPUs 4 01-02 00:00:51.203: V/ScriptC(1684): Create script for resource = gray 01-02 00:00:51.203: E/bcc(1684): CPU is krait2 01-02 00:00:51.274: W/bcc(1684): Unable to open /data/data/com.example.rsgray/cache/com.android.renderscript.cache/gray.o in read mode. (reason: No such file or directory) 01-02 00:00:51.404: A/libc(1684): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 1701 (.example.rsgray) And finally, here's the logcat output with the Samsung tablet : 01-02 10:34:47.470: D/dalvikvm(19022): GC_FOR_ALLOC freed 48K, 11% free 7046K/7875K, paused 13ms, total 13ms 01-02 10:34:47.475: I/dalvikvm-heap(19022): Grow heap (frag case) to 10.495MB for 3145744-byte allocation 01-02 10:34:47.495: D/dalvikvm(19022): GC_CONCURRENT freed <1K, 9% free 10117K/11015K, paused 11ms+1ms, total 18ms 01-02 10:34:47.585: D/dalvikvm(19022): GC_FOR_ALLOC freed <1K, 9% free 10117K/11015K, paused 10ms, total 10ms 01-02 10:34:47.590: I/dalvikvm-heap(19022): Grow heap (frag case) to 13.494MB for 3145744-byte allocation 01-02 10:34:47.610: D/dalvikvm(19022): GC_CONCURRENT freed <1K, 7% free 13189K/14151K, paused 11ms+3ms, total 23ms 01-02 10:34:47.610: D/dalvikvm(19022): WAIT_FOR_CONCURRENT_GC blocked 12ms 01-02 10:34:47.610: V/RenderScript(19022): rsContextCreate dev=0x40e3b288 01-02 10:34:47.615: V/RenderScript(19022): 0x411e3008 Launching thread(s), CPUs 3 01-02 10:34:47.625: V/ScriptC(19022): Create script for resource = gray 01-02 10:34:47.625: I/bcc(19022): LIBBCC build time: 2013/01/09 23:19:52 01-02 10:34:47.625: I/bcc(19022): LIBBCC build revision: Unknown (not git) 01-02 10:34:47.645: D/StopWatch(19022): StopWatch calcFileSHA1 time (us): 17719 01-02 10:34:47.650: D/StopWatch(19022): StopWatch calcFileSHA1 time (us): 3031 01-02 10:34:47.650: W/bcc(19022): Unable to open file in read mode. (reason: No such file or directory) 01-02 10:34:47.750: A/libc(19022): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 19053 (.example.rsgray) That's about it. If anyone has any idea how to interpret this, please do let me know. Thanks!
I've just encountered the same issue. It seems to be fixed when rsDebug is somewhere in the same function. This fixed it for me: if(x > 0) { if(x < 0) { rsDebug("Workaround for renderscript bug", 0.0f); } /* Code */ } Using this, rsDebug is never actually called, so it will not output anything. Note this does not work: if(0) { rsDebug("Workaround for renderscript bug", 0.0f); } This is probably optimized out.
Adobe Air Camera Issue
Dont know if anyone has come across this issue but I am creating an app for mobile devices and it runs fine on my galaxy s2 running ics 4.0.4 however when I run it on the galaxy tab running 2.3.3 it keeps throwing errors. All that I am doing is getting the device camera and attaching it to a flash.media.Video. I have the suspicion that the amount of errors caused by this issues is severly affecting the perfomance. I have attached an fxp file ( https://www.box.com/s/77a9460edcf8a7ce95ee ) so that you can see that I am not doing anything out of the ordinary. THanks for your help! P.S. Here is a sample segment of the logcat- D/TvOut-Engine( 79): (isHdmiCableConnected): mHdmiCableConnected 0 D/CameraHardwareSec( 75): MemoryHeapBase(fd(26), size(5760128), width(800), height(600)) W/AudioFlinger( 75): RecordThread: buffer overflow D/dalvikvm(12597): GC_FOR_MALLOC freed 1206K, 48% free 4217K/8007K, external 4034K/4493K, paused 91ms V/AudioHardwareALSA( 75): resampler read error -32 D/AudioHardwareALSA( 75): AudioStreamInALSA::read error -32 D/AudioHardwareALSA( 75): AudioStreamInALSA::snd_pcm_recover error 0 E/v4l2_utils( 75): Error = Invalid argument from qbuf E/CameraHardwareSec( 75): ERR(int android::CameraHardwareSec::previewThread()):overlay queueBuffer fail I/dalvikvm-heap(12597): Grow heap (frag case) to 16.060MB for 5760016-byte allocation D/dalvikvm(12597): GC_FOR_MALLOC freed 203K, 30% free 9638K/13639K, external 3975K/4493K, paused 26ms E/v4l2_utils( 75): Error = Invalid argument from qbuf E/CameraHardwareSec( 75): ERR(int android::CameraHardwareSec::previewThread()):overlay queueBuffer fail D/dalvikvm(12597): GC_CONCURRENT freed 91K, 31% free 9547K/13639K, external 3975K/4493K, paused 2ms+13ms D/dalvikvm(12597): GC_FOR_MALLOC freed 76K, 31% free 9471K/13639K, external 3975K/4493K, paused 43ms E/v4l2_utils( 75): Error = Invalid argument from qbuf E/CameraHardwareSec( 75): ERR(int android::CameraHardwareSec::previewThread()):overlay queueBuffer fail I/dalvikvm-heap(12597): Grow heap (frag case) to 21.133MB for 5760016-byte allocation E/v4l2_utils( 75): Error = Invalid argument from qbuf E/CameraHardwareSec( 75): ERR(int android::CameraHardwareSec::previewThread()):overlay queueBuffer fail