Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14350] BlackBerry : Adding number of views beyond than which can be seen on horizontal layout makes tha app exit

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-07-26T01:32:49.000+0000
Affected Version/sn/a
Fix Version/s2013 Sprint 13, 2013 Sprint 15 API, 2013 Sprint 15, Release 3.1.2, Release 3.2.0
ComponentsBlackBerry
Labelsblackberry, module_view, qe-3.1.2, qe-nfc, qe-testadded, sdk-bb
ReporterLokesh Choudhary
AssigneeRussell McMahon
Created2013-06-22T00:34:00.000+0000
Updated2014-06-19T12:43:15.000+0000

Description

Description: ============== 1. Create an app with the following code:
var win = Ti.UI.createWindow({});
     
var view = Ti.UI.createView({
	backgroundColor:'green',
        height:200,
        width:200,
        layout:'horizontal'
         
});


function MyView(){
	var view = Ti.UI.createLabel({
		backgroundColor:color,
		height:40,
		top:10,
		left:5,
		width:Ti.UI.SIZE
	});
	
	var lbl = Ti.UI.createLabel({
	text:'view for test'
	//height:Ti.UI.SIZE,
	//width:Ti.UI.SIZE

	});
	
	view.add(lbl);
	
    return view;
    
}

for(i=0;i<20;i++){
view.add(MyView(red));
}
	


win.add(view);
	 
win.open();
2. Build & run on BB device/simulator. 3. Observe the app when it starts Actual Result: ================ 1. The app exits immediately after start Expected Result: ================= 1. The app should not exit

Attachments

FileDateSize
JSSyntaxError.tiff2013-07-26T01:32:40.000+000074974

Comments

  1. Russell McMahon 2013-06-27

    This should be fixed now that multiple buttons and labels work on horizontal layout.
  2. Priya Agarwal 2013-07-19

    Reopening. As the app still crashes with when number of views are added beyond which can be seen on horizontal layout.
       var win = Ti.UI.createWindow({});
       var mainview = Ti.UI.createView({
       	backgroundColor:'green',
               height:Ti.UI.FILL,
               width:Ti.UI.FILL,
               layout:'horizontal'
                
       });
       
       function MyView(){
           var view = Ti.UI.createView({
               backgroundColor:'red',
               height:40,
               top:10,
               left:5,
               width:60,
               borderColor:'black',
               borderWidth:5
           });
               
           return view;    
       }
       for(i=0;i<20;i++){
       mainview.add(MyView());
       }
       win.add(mainview);	 
       win.open();
       
       
    Verified with Environment: Studio: 3.1.2.201307171817 Titanium SDK:3.1.2.v20130718094558 acs:1.0.3 alloy:1.1.3 npm:1.3.2 titanium:3.1.1 titanium-code-processor:1.0.1 OS: OSX 10.8 Device:Blackberry-Z10(v 10.0.10.261),ios Simulator(v6.0),Galaxy Nexus(v4.0.4) Xcode: 4.5.1 blackberry SDK: 10.1.0.1020 Studio Console log: Process 38097102 (TIMOB-14350) terminated SIGSEGV code=1 fltno=11 ip=015669d8(/usr/lib/ldqnx.so.2@__generic_memcpy+0x50) mapaddr=000669d8. ref=00000010 bdslot=1 /usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:181 throw e; ^ TypeError: Cannot read property 'value' of undefined at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:185:23 at iterate (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:108:13) at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:119:25 at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:187:17 at /usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:491:34 at /usr/local/lib/node_modules/titanium/lib/cli.js:112:8 at /Users/global/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130718094558/blackberry/cli/common/blackberryndk.js:195:4 at /Users/global/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130718094558/blackberry/cli/common/blackberryndk.js:62:3 at exithandler (child_process.js:635:7) --------------------------------------------- at exports.execFile (child_process.js:691:9) at exports.exec (child_process.js:578:18) at runCommandFromArray (/Users/global/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130718094558/blackberry/cli/common/blackberryndk.js:60:2) at getAppLog (/Users/global/Library/Application Support/Titanium/mobilesdk/osx/3.1.2.v20130718094558/blackberry/cli/common/blackberryndk.js:168:2) at wrapper (timers.js:252:14) at listOnTimeout (timers.js:110:15)
  3. Lokesh Choudhary 2013-08-09

    Verified the fix & the app does not exit anymore. Thus closing. Environment: Appcel Studio : 3.1.2.201308082014 Ti SDK : 3.1.2.v20130808180613 Mac OSX : 10.8.4 Alloy : 1.2.0-alpha6 CLI - 3.1.2-alpha win 7 Win 8 Z10 BB simulator : 10.0.10.822 Z10 device running 10.0.10.88

JSON Source