Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7721] Android: Selecting items in the app's menu causes a crash

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-02-29T14:36:01.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterMauro Parra-Miranda
AssigneePing Wang
Created2012-02-21T11:10:25.000+0000
Updated2017-03-24T18:22:42.000+0000

Description

Problem Description

When you select an item in the app's menu, the app will reboot.

Actual Results

When you select an item in the menu, the app restarts.

Expected Results

When you select an item in the menu, the app should open that window.

Test Case

 var activity = Ti.Android.currentActivity;
   activity.onCreateOptionsMenu = function(e) {
      // Code to be triggered by pressing the button goes here.
      var menu = e.menu;
 var menuItemAbout = menu.add({ title: "About NFHS" });
      menuItemAbout.addEventListener("click", function(e) {
         var loading = Titanium.UI.createActivityIndicator({ height:75, width:250, color:'#FFFFFF', opacity:0.9, borderRadius:5, borderColor:'#000', font:{fontFamily:'Helvetica Neue', fontSize:18}, style:Titanium.UI.iPhone.ActivityIndicatorStyle.PLAIN, message: "Loading About NFHS" });
         if (Titanium.Platform.osname!='android') { loading.backgroundColor = "#000000"; }
         currentWin.add(loading);
         loading.show();
         var win = Ti.UI.createWindow({ url:'about.js', title:'About NFHS', fullscreen:false, navBarHidden:true  });
         win.open(win);
         loading.hide();
      });
}
var currentWin = Ti.UI.currentWindow;
Ti.include("incCommon.js");

var webview = Titanium.UI.createWebView({ url:'about.htm', top:50 });
currentWin.add(webview);

showHeader('About NFHS');

Crash log

TiUIView(  314): (main) [246721,248305] Nativeview is null
W/InputManagerService(   61): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@43f26260
D/dalvikvm(  314): GC_FOR_MALLOC freed 2815 objects / 126464 bytes in 74ms
W/dalvikvm(  314): ReferenceTable overflow (max=512)
W/dalvikvm(  314): Last 10 entries in JNI local reference table:
W/dalvikvm(  314):   502: 0x43e309b0 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm(  314):   503: 0x43eff4e8 cls=Ljava/util/HashMap; (52 bytes)
W/dalvikvm(  314):   504: 0x43e8c3b0 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm(  314):   505: 0x43e6f680 cls=Ljava/util/HashMap; (52 bytes)
W/dalvikvm(  314):   506: 0x43eb9a58 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm(  314):   507: 0x43eb9a98 cls=Ljava/util/HashMap; (52 bytes)
W/dalvikvm(  314):   508: 0x43eb9c70 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm(  314):   509: 0x43eb9cb0 cls=Ljava/util/HashMap; (52 bytes)
W/dalvikvm(  314):   510: 0x43ebc4c0 cls=Ljava/lang/String; (28 bytes)
W/dalvikvm(  314):   511: 0x43ebc508 cls=Ljava/util/HashMap; (52 bytes)
W/dalvikvm(  314): JNI local reference table summary (512 entries):
W/dalvikvm(  314):     1 of [Ljava/lang/Object; 20B
W/dalvikvm(  314):   253 of Ljava/lang/String; 28B (253 unique)
W/dalvikvm(  314):     2 of Ljava/lang/String; 36B (2 unique)
W/dalvikvm(  314):   253 of Ljava/util/HashMap; 52B (253 unique)
W/dalvikvm(  314):     3 of Ljava/util/HashMap; 60B (3 unique)
W/dalvikvm(  314): Memory held directly by tracked refs is 20512 bytes
E/dalvikvm(  314): Failed adding to JNI local ref table (has 512 entries)
I/dalvikvm(  314): "KrollRuntimeThread" prio=5 tid=7 RUNNABLE
I/dalvikvm(  314):   | group="main" sCount=0 dsCount=0 s=N obj=0x43ec0ef0 self=0x246328
I/dalvikvm(  314):   | sysTid=321 nice=0 sched=0/0 cgrp=default handle=2324128
I/dalvikvm(  314):   | schedstat=( 3080290322 1200366103 268 )
I/dalvikvm(  314):   at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
I/dalvikvm(  314):   at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:47)
I/dalvikvm(  314):   at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:441)
I/dalvikvm(  314):   at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:602)
I/dalvikvm(  314):   at android.os.Handler.dispatchMessage(Handler.java:95)
I/dalvikvm(  314):   at android.os.Looper.loop(Looper.java:123)
I/dalvikvm(  314):   at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:102)
I/dalvikvm(  314): 
E/dalvikvm(  314): VM aborting
I/DEBUG   (   31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (   31): Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
I/DEBUG   (   31): pid: 314, tid: 321  >>> org.nfhs.baseballrules2012 <<<
I/DEBUG   (   31): signal 11 (SIGSEGV), fault addr deadd00d
I/DEBUG   (   31):  r0 00000374  r1 0000000c  r2 0000000c  r3 deadd00d
I/DEBUG   (   31):  r4 00000026  r5 00246328  r6 43ebc568  r7 00246374
I/DEBUG   (   31):  r8 43ebc4c0  r9 43ebc508  10 814a0160  fp 461a10be
I/DEBUG   (   31):  ip 808881ec  sp 461a0fd8  lr afd154c5  pc 8083b162  cpsr 20000030
I/DEBUG   (   31):          #00  pc 0003b162  /system/lib/libdvm.so
I/DEBUG   (   31):          #01  pc 0003ec3a  /system/lib/libdvm.so
I/DEBUG   (   31):          #02  pc 0004069c  /system/lib/libdvm.so
I/DEBUG   (   31):          #03  pc 0002d2a2  /system/lib/libdvm.so
I/DEBUG   (   31):          #04  pc 0006e220  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #05  pc 0006e99c  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #06  pc 0006ea8e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #07  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #08  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #09  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #10  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #11  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #12  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #13  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #14  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #15  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #16  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #17  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #18  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #19  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #20  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #21  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #22  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #23  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #24  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #25  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #26  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #27  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #28  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #29  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #30  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31):          #31  pc 0006ea9e  /data/data/org.nfhs.baseballrules2012/lib/libkroll-v8.so
I/DEBUG   (   31): 
I/DEBUG   (   31): code around pc:
I/DEBUG   (   31): 8083b140 1861447c 200618a2 e878f7d8 f7d82000 
I/DEBUG   (   31): 8083b150 4808e9e4 6bdb5823 d0002b00 4b064798 
I/DEBUG   (   31): 8083b160 701c2426 ea5cf7d8 0004ce80 fffe4ae0 
I/DEBUG   (   31): 8083b170 fffe801c 00000374 deadd00d b510b40e 
I/DEBUG   (   31): 8083b180 4c0a4b09 447bb083 aa05591b 6b5bca02 
I/DEBUG   (   31): 
I/DEBUG   (   31): code around lr:
I/DEBUG   (   31): afd154a4 b0834a0d 589c447b 26009001 686768a5 
I/DEBUG   (   31): afd154b4 220ce008 2b005eab 1c28d003 47889901 
I/DEBUG   (   31): afd154c4 35544306 d5f43f01 2c006824 b003d1ee 
I/DEBUG   (   31): afd154d4 bdf01c30 0002ae7c 000000d4 1c0fb5f0 
I/DEBUG   (   31): afd154e4 43551c3d a904b087 1c16ac01 604d9004 
I/DEBUG   (   31): 
I/DEBUG   (   31): stack:
I/DEBUG   (   31):     461a0f98  00000015  
I/DEBUG   (   31):     461a0f9c  afd1453b  /system/lib/libc.so
I/DEBUG   (   31):     461a0fa0  afd405a0  /system/lib/libc.so
I/DEBUG   (   31):     461a0fa4  afd4054c  /system/lib/libc.so
I/DEBUG   (   31):     461a0fa8  00000000  
I/DEBUG   (   31):     461a0fac  afd154c5  /system/lib/libc.so
I/DEBUG   (   31):     461a0fb0  00246328  [heap]
I/DEBUG   (   31):     461a0fb4  afd1450d  /system/lib/libc.so
I/DEBUG   (   31):     461a0fb8  00246374  [heap]
I/DEBUG   (   31):     461a0fbc  80887fc4  /system/lib/libdvm.so
I/DEBUG   (   31):     461a0fc0  00246328  [heap]
I/DEBUG   (   31):     461a0fc4  43ebc568  /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG   (   31):     461a0fc8  00246374  [heap]
I/DEBUG   (   31):     461a0fcc  afd1456b  /system/lib/libc.so
I/DEBUG   (   31):     461a0fd0  df002777  
I/DEBUG   (   31):     461a0fd4  e3a070ad  
I/DEBUG   (   31): #00 461a0fd8  00237720  [heap]
I/DEBUG   (   31):     461a0fdc  8083ec3f  /system/lib/libdvm.so
I/DEBUG   (   31): #01 461a0fe0  00000001  
I/DEBUG   (   31):     461a0fe4  00238a70  [heap]
I/DEBUG   (   31):     461a0fe8  43ebc568  /dev/ashmem/mspace/dalvik-heap/2 (deleted)
I/DEBUG   (   31):     461a0fec  00246328  [heap]
I/DEBUG   (   31):     461a0ff0  00000000  
I/DEBUG   (   31):     461a0ff4  808406a1  /system/lib/libdvm.so
I/BootReceiver(   61): Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
D/Zygote  (   33): Process 314 terminated by signal (11)
D/dalvikvm(   61): GC_FOR_MALLOC freed 2353 objects / 593488 bytes in 107ms
I/ActivityManager(   61): Process org.nfhs.baseballrules2012 (pid 314) has died.

Comments

  1. Neeraj Gupta 2012-02-21

    @Mauro - Please set the customer name for this ticket.
  2. Lee Morris 2017-03-24

    Closing ticket as invalid with reference to the above comments.

JSON Source