Android-runtime: stack corruption detected

Created on 10 Nov 2016  路  6Comments  路  Source: NativeScript/android-runtime

Please provide the following version numbers that your issue occurs with:

  • CLI: 2.3.0
  • Cross-platform modules: 2.3.0
  • Runtime(s): 2.3.0 android
  • Plugin(s): nativescript-googlemaps nativescript-geolocation nativescript-loading-indicator
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="__PACKAGE__"
    android:versionCode="1"
    android:versionName="1.0">

    <supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"/>

    <uses-sdk
        android:minSdkVersion="17"
        android:targetSdkVersion="__APILEVEL__"/>

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>

    <application
        android:name="com.tns.NativeScriptApplication"
        android:allowBackup="true"
        android:icon="@drawable/icon"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">

        <activity
            android:name="com.tns.NativeScriptActivity"
            android:label="@string/title_activity_kimera"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@style/LaunchScreenTheme">

            <meta-data android:name="SET_THEME_ON_LAUNCH" android:resource="@style/AppTheme" />

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.tns.ErrorReportActivity"/>
    </application>
</manifest>

Did the error happen while the app was executing? (runtime error)

I'm using Android 4.2.2 on x86 emulator.

D/TNS.Java( 2109): Enabling NativeScript Debugger Agent
D/dalvikvm( 2109): GC_CONCURRENT freed 293K, 13% free 2547K/2904K, paused 13ms+1ms, total 27ms
D/dalvikvm( 2109): GC_CONCURRENT freed 304K, 13% free 2628K/2996K, paused 9ms+0ms, total 21ms
D/dalvikvm( 2109): GC_CONCURRENT freed 254K, 11% free 2760K/3096K, paused 9ms+1ms, total 23ms
D/dalvikvm( 2109): GC_CONCURRENT freed 280K, 11% free 2864K/3208K, paused 8ms+2ms, total 25ms
D/dalvikvm( 2109): GC_CONCURRENT freed 294K, 11% free 2954K/3312K, paused 7ms+1ms, total 22ms
D/dalvikvm( 2109): GC_CONCURRENT freed 173K, 8% free 3178K/3420K, paused 10ms+0ms, total 25ms
D/dalvikvm( 2109): GREF has increased to 201
I/dalvikvm( 2109): Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations
W/dalvikvm( 2109): VFY: unable to resolve virtual method 675: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
D/dalvikvm( 2109): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm( 2109): Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType
W/dalvikvm( 2109): VFY: unable to resolve virtual method 697: Landroid/content/res/TypedArray;.getType (I)I
D/dalvikvm( 2109): VFY: replacing opcode 0x6e at 0x0002
W/dalvikvm( 2109): VFY: unable to resolve static field 103 (INTERSECT) in Landroid/graphics/Path$Op;
D/dalvikvm( 2109): VFY: replacing opcode 0x62 at 0x0000
D/dalvikvm( 2109): GC_CONCURRENT freed 91K, 5% free 3473K/3628K, paused 2ms+1ms, total 20ms
I/dalvikvm( 2109): Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable
W/dalvikvm( 2109): VFY: unable to resolve virtual method 638: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm( 2109): VFY: replacing opcode 0x6e at 0x0002
I/dalvikvm( 2109): Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity
W/dalvikvm( 2109): VFY: unable to resolve virtual method 640: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable;
D/dalvikvm( 2109): VFY: replacing opcode 0x6e at 0x0002
E/SurfaceFlinger(  786): ro.sf.lcd_density must be defined as a build property
D/libEGL  ( 2109): loaded /system/lib/egl/libEGL_emulation.so
D/libEGL  ( 2109): loaded /system/lib/egl/libGLESv1_CM_emulation.so
D/libEGL  ( 2109): loaded /system/lib/egl/libGLESv2_emulation.so
D/        ( 2109): HostConnection::get() New Host Connection established 0xb927c8f0, tid 2109
W/EGL_emulation( 2109): eglSurfaceAttrib not implemented
D/OpenGLRenderer( 2109): Enabling debug mode 0
D/dalvikvm( 1193): GREF has increased to 601
W/IInputConnectionWrapper( 1533): showStatusIcon on inactive InputConnection
I/ActivityManager( 1193): Displayed org.nativescript.cadastramento/com.tns.NativeScriptActivity: +7s930ms
D/dalvikvm( 2109): GC_CONCURRENT freed 174K, 6% free 3785K/4024K, paused 7ms+9ms, total 55ms
D/dalvikvm( 2109): GC_FOR_ALLOC freed 4K, 7% free 3781K/4024K, paused 46ms, total 47ms
I/dalvikvm-heap( 2109): Grow heap (frag case) to 4.825MB for 1127532-byte allocation
D/dalvikvm( 2109): GC_FOR_ALLOC freed <1K, 5% free 4882K/5128K, paused 47ms, total 47ms
D/dalvikvm( 2109): GC_CONCURRENT freed <1K, 5% free 4891K/5128K, paused 9ms+10ms, total 67ms
I/Choreographer( 2109): Skipped 30 frames!  The application may be doing too much work on its main thread.
E/SurfaceFlinger(  786): ro.sf.lcd_density must be defined as a build property
W/EGL_emulation( 2109): eglSurfaceAttrib not implemented
F//system/bin/app_process( 2109): stack corruption detected: aborted
I/ActivityManager( 1193): Process org.nativescript.cadastramento (pid 2109) has died.
I/WindowState( 1193): WIN DEATH: Window{96fda0c8 u0 org.nativescript.cadastramento/com.tns.NativeScriptActivity}
W/ActivityManager( 1193): Force removing ActivityRecord{977257b0 u0 org.nativescript.cadastramento/com.tns.NativeScriptActivity}: app died, no saved state
I/WindowState( 1193): WIN DEATH: Window{975ebac0 u0 org.nativescript.cadastramento/com.tns.NativeScriptActivity}
D/Zygote  (  787): Process 2109 terminated by signal (6)

Please tell us how to recreate the issue in as much detail as possible.

The app loaded fine, when I tried to navigate to another view, it crashed with the error above. It simply exits the app and goes to the launcher screen. There's no stack trace.

bug

All 6 comments

Hi @pocesar,
If I understand correctly, you build a default app, and you add nativescript-googlemaps, nativescript-geolocation, nativescript-loading-indicator. Do you try to navigate to an activity provided by one of the plugins or no?
Please be more specific so we can assist you with the solution.

@Plamen5kov no, it's a regular 'page' (using Frame.topmost().navigate('views/actions')) after the login happened (when nativescript-loading-indicator instance is set to hide()), but it seems to be crashing before this. that's all the error that gives, sorry that the adb logcat is so opaque when debugging NS apps

Can you provide us with a small repo, so we can download it and reproduce and fix the problem.

I'll try

I noticed that the nativescript-loading-indicator was swallowing the actual error, that is the inclusion of '@google/maps' in 2.3.0 was failing. it wasn't copying @namespace/module to the device. the issue doesn't happen with nativescript@next

it's related to https://github.com/NativeScript/NativeScript/issues/3059

@pocesar i'm closing this issue for now, because it's likely to be solved with the next release, but if it recurs, feel free to reopen this issue.

Was this page helpful?
0 / 5 - 0 ratings