Nativescript app getting crashed on Redmi 1S - android

I have created the Grocery test app on Nativescript platform but when i tried to launch it on Redmi 1S, the app gets crashed while launching.
This is the log:
W/dalvikvm( 4854):in Lcom/tns/Runtime;.callJSMethodNative(IILjava/lang/String;IZ[Ljava/lang/Object;)Ljava/lang/Object; (CallIntMethodA)
I/dalvikvm( 4854): at com.tns.Runtime.callJSMethodNative(Native Method)
I/dalvikvm( 4854): at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1022)
I/dalvikvm( 4854): at com.tns.Runtime.callJSMethodImpl(Runtime.java:907)
I/dalvikvm( 4854): at com.tns.Runtime.callJSMethod(Runtime.java:895)
I/dalvikvm( 4854): at com.tns.Runtime.callJSMethod(Runtime.java:879)
I/dalvikvm( 4854): at com.tns.Runtime.callJSMethod(Runtime.java:871)

Related

Fatal signal 6 (SIGABRT) at 0x000002ef (code=0) while using Retrofit

Application sometimes crashes when calling API with retrofit and doing some UI interactions. I'm using Retrofit version 1.7.0.
Logcat shows:
I/dalvikvm﹕ threadid=3: reacting to signal 3
I/dalvikvm﹕ Wrote stack traces to '/data/anr/traces.txt'
A/libc﹕ Fatal signal 6 (SIGABRT) at 0x000002ef (code=0), thread 8653
How to resolve this issue?

Android "Shutting down VM" with no stacktrace

I have recently faced this issue a lot and I am not able to find any solution to it.
I am constantly getting Shutting down VM and logcat doesn't show any trace of this issue.
06-08 20:34:25.288 20416-20416/my.package.dev D/app_BaseRecyclerView﹕ onCreateViewHolder begins
06-08 20:34:25.324 20416-20416/my.package.dev D/AndroidRuntime﹕ Shutting down VM
06-08 20:34:30.969 20416-20425/my.package.dev I/art﹕ Thread[5,tid=20425,WaitingInMainSignalCatcherLoop,Thread*=0xb4a33800,peer=0x12c000a0,"Signal Catcher"]: reacting to signal 3
06-08 20:34:30.969 20416-20425/my.package.dev I/art﹕ [ 06-08 20:34:31.169 617: 639 I/Process ]
Sending signal. PID: 617 SIG: 3
Do you know how to make the stacktrace visible?
If you are using Google Analytics, try to disable ExceptionReporting if it is set to true

Amazon-Android Registration Error(601): SERVICE_NOT_AVAILABLE

Today I tried to implement the Amazon push notification into my android app.
I followed this instruction: http://docs.aws.amazon.com/sns/latest/dg/mobile-push-gcm.html
But at the third step when I start the "AndroidMobilePushApp" there comes no Registration ID in the LogCat there are just these lines:
10-25 20:39:44.313: D/dalvikvm(601): Not late-enabling CheckJNI (already on)
10-25 20:39:45.144: I/dalvikvm(601): threadid=3: reacting to signal 3
10-25 20:39:45.394: E/dalvikvm(601): Unable to open stack trace file '/data/anr/traces.txt': Is a directory
10-25 20:39:45.653: I/dalvikvm(601): threadid=3: reacting to signal 3
10-25 20:39:45.713: I/dalvikvm(601): Wrote stack traces to '/data/anr/traces.txt'
10-25 20:39:45.743: I/onResume(601): no missed messages
10-25 20:39:45.993: I/onResume(601): no missed messages
10-25 20:39:46.053: D/gralloc_goldfish(601): Emulator without GPU emulation detected.
10-25 20:39:52.413: I/Registration Error(601): SERVICE_NOT_AVAILABLE
I hope you can help me.
This means the GCM service is currently unavailable and should be retried. checkout How to fix Google Cloud Messaging Registration error: SERVICE_NOT_AVAILABLE?

Fail to add Spongycastle as provider in android

I am trying to make use of spongycastle and followed all the help I could get to include it but when the application execute it crashes at the code where I add it as a provider:
static {
Security.addProvider(new org.spongycastle.jce.provider.BouncyCastleProvider());
}
I add scprov-jdk15-1.46.99.3-UNOFFICIAL-ROBERTO-RELEASE.jar as an external JAR to my project and eclipse does not report any errors.
Any ideas?
The stacktrace:
08-11 12:41:56.653: W/ActivityThread(683): Application com.ljbrits.test4 is waiting for the debugger on port 8100...
08-11 12:41:56.723: I/System.out(683): Sending WAIT chunk
08-11 12:41:56.723: I/dalvikvm(683): Debugger is active
08-11 12:41:56.914: I/System.out(683): Debugger has connected
08-11 12:41:56.914: I/System.out(683): waiting for debugger to settle...
08-11 12:41:57.113: I/System.out(683): waiting for debugger to settle...
08-11 12:41:57.153: I/dalvikvm(683): threadid=3: reacting to signal 3
08-11 12:41:57.203: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
:
08-11 12:41:59.344: I/System.out(683): waiting for debugger to settle...
08-11 12:41:59.546: I/System.out(683): debugger has settled (1437)
08-11 12:41:59.693: I/dalvikvm(683): threadid=3: reacting to signal 3
08-11 12:41:59.824: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
08-11 12:42:00.173: I/dalvikvm(683): threadid=3: reacting to signal 3
08-11 12:42:00.183: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
08-11 12:42:00.193: D/dalvikvm(683): threadid=1: still suspended after undo (sc=1 dc=1)
08-11 12:42:00.283: E/dalvikvm(683): Could not find class 'org.spongycastle.jce.provider.BouncyCastleProvider', referenced from method com.ljbrits.test4.Test4Activity.<clinit>
08-11 12:42:00.283: W/dalvikvm(683): VFY: unable to resolve new-instance 417 (Lorg/spongycastle/jce/provider/BouncyCastleProvider;) in Lcom/ljbrits/test4/Test4Activity;
08-11 12:42:00.283: D/dalvikvm(683): VFY: replacing opcode 0x22 at 0x0000
08-11 12:42:00.363: D/dalvikvm(683): DexOpt: unable to opt direct call 0x07d8 at 0x02 in Lcom/ljbrits/test4/Test4Activity;.<clinit>
08-11 12:42:00.683: I/dalvikvm(683): threadid=3: reacting to signal 3
08-11 12:42:00.714: D/dalvikvm(683): threadid=1: still suspended after undo (sc=1 dc=1)
08-11 12:42:00.714: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
:
08-11 12:42:06.233: I/dalvikvm(683): Wrote stack traces to '/data/anr/traces.txt'
08-11 12:42:08.719: W/dalvikvm(683): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/ljbrits/test4/Test4Activity;
08-11 12:42:08.719: W/dalvikvm(683): Class init failed in newInstance call (Lcom/ljbrits/test4/Test4Activity;)
The NoClassDefFoundError thrown here suggests that the SpongyCastle classes are not being included in your deployed apk file - try unzipping the apk to check this). This could be caused by a few things, make sure you do a clean build (are you builiding with ant or eclipse?) and if the problem persists, it's likely a proguard issue - ProGuard may be stripping out classes it thinks are unused - could you post your proguard.cfg?

Android app keeps crashing on launch with no good reason

I've been trying to figure this out for days, to no avail. I'm developing a simple android app with Titanium that works perfectly fine on iOS. Yet, when I launch it on android, it never starts. Here is my manifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tiki.signals" android:versionCode="1"
android:versionName="1">
<uses-sdk android:minSdkVersion="8" />
<!-- TI_MANIFEST -->
<application android:icon="#drawable/appicon"
android:label="Signals" android:name="SignalsApplication"
android:debuggable="false">
<!-- TI_APPLICATION -->
<activity android:name=".SignalsActivity"
android:label="Signals" android:theme="#style/Theme.Titanium"
android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="ti.modules.titanium.facebook.FBActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
/>
<activity android:name="org.appcelerator.titanium.TiActivity"
android:configChanges="keyboardHidden|orientation" />
<activity android:name="org.appcelerator.titanium.TiTranslucentActivity"
android:configChanges="keyboardHidden|orientation"
android:theme="#android:style/Theme.Translucent" />
<activity android:name="org.appcelerator.titanium.TiModalActivity"
android:configChanges="keyboardHidden|orientation"
android:theme="#android:style/Theme.Translucent" />
<activity android:name="ti.modules.titanium.ui.TiTabActivity"
android:configChanges="keyboardHidden|orientation" />
<activity android:name="ti.modules.titanium.ui.android.TiPreferencesActivity" />
<service android:name="org.appcelerator.titanium.analytics.TiAnalyticsService"
android:exported="false" />
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
</manifest>
Here's the logcat:
I/ActivityManager( 81): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.tiki.signals/.SignalsActivity} from pid 176
D/PermissionCache( 35): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (1163 us)
D/dalvikvm( 81): GC_FOR_ALLOC freed 842K, 14% free 11108K/12807K, paused 106ms
I/dalvikvm-heap( 81): Grow heap (frag case) to 12.385MB for 1536016-byte allocation
D/dalvikvm( 81): GC_FOR_ALLOC freed 1K, 13% free 12606K/14343K, paused 105ms
W/WindowManager( 81): Failure taking screenshot for (180x300) to layer 21005
I/ActivityManager( 81): Start proc com.tiki.signals for activity com.tiki.signals/.SignalsActivity: pid=457 uid=10040 gids={1015, 3003}
I/dalvikvm( 457): Turning on JNI app bug workarounds for target SDK version 8...
W/NetworkManagementSocketTagger( 81): setKernelCountSet(10040, 1) failed with errno -2
D/dalvikvm( 81): GC_CONCURRENT freed 13K, 13% free 12619K/14343K, paused 8ms+32ms
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/TiApplication( 457): (main) [0,0] checkpoint, app created.
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 457): GC_CONCURRENT freed 243K, 4% free 9294K/9607K, paused 7ms+6ms
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/TiApplication( 457): (main) [682,682] Titanium 1.8.2 (2012/02/23 17:46 59b3a90)
D/dalvikvm( 457): GC_CONCURRENT freed 422K, 5% free 9434K/9927K, paused 6ms+4ms
I/TiApplication( 457): (main) [254,936] Titanium Javascript runtime: v8
D/dalvikvm( 457): Trying to load lib /data/data/com.tiki.signals/lib/libstlport_shared.so 0x412a1e60
D/dalvikvm( 457): Added shared lib /data/data/com.tiki.signals/lib/libstlport_shared.so 0x412a1e60
D/dalvikvm( 457): No JNI_OnLoad found in /data/data/com.tiki.signals/lib/libstlport_shared.so 0x412a1e60, skipping init
D/dalvikvm( 457): Trying to load lib /data/data/com.tiki.signals/lib/libkroll-v8.so 0x412a1e60
I/TiRootActivity( 457): (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
D/dalvikvm( 457): Added shared lib /data/data/com.tiki.signals/lib/libkroll-v8.so 0x412a1e60
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
E/TiApplication( 457): (KrollRuntimeThread) [3551,3551] APP PROXY: ti.modules.titanium.app.AppModule#41334e08
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 457): GC_CONCURRENT freed 349K, 5% free 9566K/10055K, paused 7ms+6ms
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
D/dalvikvm( 457): GC_FOR_ALLOC freed 452K, 7% free 9534K/10183K, paused 84ms
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
D/TiLocation( 457): (main) [2290,5841] preferredProvider property found [null]
D/TiLocation( 457): (main) [1,5842] accuracy property found [0]
E/TiLocationHelper( 457): (main) [31,5873] unable to register, provider is null
D/dalvikvm( 457): GC_FOR_ALLOC freed 105K, 7% free 9571K/10183K, paused 61ms
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
I/dalvikvm-heap( 457): Grow heap (frag case) to 10.878MB for 1536016-byte allocation
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 457): GC_CONCURRENT freed 1K, 6% free 11070K/11719K, paused 8ms+5ms
I/TiRootActivity( 457): (main) [0,0] checkpoint, on root activity resume. activity = com.tiki.signals.SignalsActivity#412aba88
V/PhoneStatusBar( 134): setLightsOn(true)
I/Process ( 81): Sending signal. PID: 457 SIG: 3
I/dalvikvm( 457): threadid=3: reacting to signal 3
W/InputManagerService( 81): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#41434cb8 (uid=10013 pid=176)
I/dalvikvm( 457): Wrote stack traces to '/data/anr/traces.txt'
D/gralloc_goldfish( 457): Emulator without GPU emulation detected.
I/ActivityManager( 81): Displayed com.tiki.signals/.SignalsActivity: +9s553ms
W/NetworkManagementSocketTagger( 81): setKernelCountSet(10013, 0) failed with errno -2
D/ExchangeService( 355): Received deviceId from Email app: androidc259148960
D/ExchangeService( 355): Reconciling accounts...
D/dalvikvm( 81): GC_EXPLICIT freed 1712K, 23% free 11125K/14343K, paused 7ms+11ms
W/ThrottleService( 81): unable to find stats for iface rmnet0
W/TiAnalyticsSvc( 457): (Thread-65) [23787,23787] Analytics Service Started
I/TiAnalyticsSvc( 457): (Thread-65) [152,23939] Sending 2 analytics events.
W/TiAnalyticsSvc( 457): (Thread-65) [1072,25011] Stopping Analytics Service
Here's my tiapp.xml:
<?xml version="1.0" encoding="UTF-8"?>
<ti:app xmlns:ti="http://ti.appcelerator.org">
<property name="ti.android.runtime">v8</property>
<property name="ti.android.threadstacksize" type="int">132768</property>
<property name="ti.android.fastdev" type="bool">false</property>
<sdk-version>1.8.2</sdk-version>
<deployment-targets>
<target device="mobileweb">false</target>
<target device="iphone">true</target>
<target device="ipad">true</target>
<target device="android">true</target>
<target device="blackberry">false</target>
</deployment-targets>
<id>com.tiki.signals</id>
<name>Signals</name>
<version>1.0</version>
<publisher>Michael</publisher>
<url>http://</url>
<description>not specified</description>
<copyright>2012 by meilers</copyright>
<icon>appicon.png</icon>
<persistent-wifi>false</persistent-wifi>
<prerendered-icon>false</prerendered-icon>
<statusbar-style>default</statusbar-style>
<statusbar-hidden>false</statusbar-hidden>
<fullscreen>false</fullscreen>
<navbar-hidden>false</navbar-hidden>
<analytics>true</analytics>
<guid>49aefe11-b922-4f04-bffd-887ed59cb5d3</guid>
<iphone>
<orientations device="iphone">
<orientation>Ti.UI.PORTRAIT</orientation>
</orientations>
<orientations device="ipad">
<orientation>Ti.UI.PORTRAIT</orientation>
<orientation>Ti.UI.UPSIDE_PORTRAIT</orientation>
<orientation>Ti.UI.LANDSCAPE_LEFT</orientation>
<orientation>Ti.UI.LANDSCAPE_RIGHT</orientation>
</orientations>
</iphone>
<android xmlns:android="http://schemas.android.com/apk/res/android"/>
<modules/>
</ti:app>
What is happening here? I don't see any error in logcat. The VM is just shutting down, with no reason. Please help!
One item comes to mind just looking at the logcat... Not enough memory. You'll see memory free dip to 3% YIKES!. Usually try to keep 10% free or OS may go into a paging fit and possible time out some features.
Disable some features in the app and watch the memory under the emulator.
Best recommendation install the app onto actual phone, though the emulator is supposed to give close tor real world results. Which I dont count on emulating any hardware device well.
Here's some code to dump memory usage. You need to find out what your target class is.
Older phones have as little as 16MB newer ones 48MB before the OS starts picking on your app. Put code in Oncreate.
Runtime rt = Runtime.getRuntime();
long maxMemory = rt.maxMemory();
Log.v("onCreate", "maxMemory:>>>>>" + Long.toString(maxMemory)); //max available memory to use
ActivityManager am = (ActivityManager) getSystemService(ACTIVITY_SERVICE);
int memoryClass = am.getMemoryClass();
Log.v("onCreate", "memoryClass:>>>>" + Integer.toString(memoryClass)); //max available you should use to keep from getting bumped off
printl("PGM MEM FREE MB", GetInternalMemAvail());
printl("INTERNAL STORAGE FREE MEMORY BYTES",getmem());
printl("INTERNAL TOTAL MEMORY BYTES",TotalMemory());
printl("SD MEM FREE MB",GetSDMemAvail());
printl("SD MEM GB",getAvailableSpaceInGB());
private static void printl(String printstring,long x)
{
String temp;
temp=String.format(" %d",x);
Log.e(printstring,temp);
}

Categories

Resources