Skip to content

Setting digits as text property value of ActionBar item crashes the app on start up #747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vchimev opened this issue Sep 15, 2015 · 2 comments
Assignees

Comments

@vchimev
Copy link
Contributor

vchimev commented Sep 15, 2015

The following code snippet crashes the app on start up both in iOS and Android:

    <Page.actionBar>
      <ActionBar title="Service Asset Maintenance">
        <ActionBar.actionItems>
          <ActionItem text="1" ios.position="right"/>
        </ActionBar.actionItems>
      </ActionBar>
    </Page.actionBar>

Output:

E/TNS.Native( 3740): Error: android.content.res.Resources$NotFoundException: String resource ID #0x1
E/TNS.Native( 3740):     android.content.res.Resources.getText(Resources.java:274)
E/TNS.Native( 3740):     android.content.res.Resources.getString(Resources.java:360)
E/TNS.Native( 3740):     android.support.v7.internal.view.menu.MenuBuilder.add(MenuBuilder.java:472)
E/TNS.Native( 3740):     com.tns.Platform.callJSMethodNative(Native Method)
E/TNS.Native( 3740):     com.tns.Platform.dispatchCallJSMethodNative(Platform.java:799)
E/TNS.Native( 3740):     com.tns.Platform.callJSMethod(Platform.java:687)
E/TNS.Native( 3740):     com.tns.Platform.callJSMethod(Platform.java:666)
E/TNS.Native( 3740):     com.tns.Platform.callJSMethod(Platform.java:656)
E/TNS.Native( 3740):     com.tns.gen.android.app.Fragment_frnal_prepareExtend_l60_c37__PageFragmentBody.onCreateView(android.app.Fragment.java)
E/TNS.Native( 3740):     android.app.Fragment.performCreateView(Fragment.java:2053)
E/TNS.Native( 3740):     android.app.FragmentManagerImpl.moveToState(FragmentManager.java:894)
E/TNS.Native( 3740):     android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
E/TNS.Native( 3740):     android.app.BackStackRecord.run(BackStackRecord.java:833)
E/TNS.Native( 3740):     android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1452)
E/TNS.Native( 3740):     android.app.Activity.performStart(Activity.java:5948)
E/TNS.Native( 3740):     android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2261)
E/TNS.Native( 3740):     android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
E/TNS.Native( 3740):     android.app.ActivityThread.access$800(ActivityThread.java:144)
E/TNS.Native( 3740):     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
E/TNS.Native( 3740):     android.os.Handler.dispatchMessage(Handler.java:102)
E/TNS.Native( 3740):     android.os.Looper.loop(Looper.java:135)
E/TNS.Native( 3740):     android.app.ActivityThread.main(ActivityThread.java:5221)
E/TNS.Native( 3740):     java.lang.reflect.Method.invoke(Native Method)
E/TNS.Native( 3740):     java.lang.reflect.Method.invoke(Method.java:372)
E/TNS.Native( 3740):     com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
E/TNS.Native( 3740):     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
E/TNS.Native( 3740): File: "/data/data/org.nativescript.testApp/files/app/tns_modules/ui/action-bar/action-bar.js, line: 183, column: 32
@nsndeck nsndeck self-assigned this Sep 16, 2015
nsndeck pushed a commit that referenced this issue Sep 16, 2015
nsndeck pushed a commit that referenced this issue Sep 16, 2015
nsndeck pushed a commit that referenced this issue Sep 17, 2015
nsndeck pushed a commit that referenced this issue Sep 17, 2015
@nsndeck
Copy link

nsndeck commented Sep 17, 2015

fixed with #750 commit.

@nsndeck nsndeck closed this as completed Sep 17, 2015
@lock
Copy link

lock bot commented Aug 30, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants