Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1899] borderRadius causes exception when modal:true is used

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2011-04-18T23:11:10.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.7.0, Sprint 2011-11
ComponentsAndroid
Labelsandroid, border, defect, klist, release-1.7.0, reported-1.5.0, rplist
ReporterPaul Dowsett
AssigneeDon Thorp
Created2011-04-15T03:05:00.000+0000
Updated2011-04-18T23:11:10.000+0000

Description

The following use case produces an error. Commenting borderRadius:5 of createWindow prevents the error, but obviously the aesthetically this may not be desirable.

var winView1 = Ti.UI.createWindow({

    backgroundColor:'#b1b1bd',
    borderRadius:5,
    url:"view1.js",
    modal: true,
//  modal:false,
    title: "View1",
    width: 280,
    height: 300
});
winView1.open();

view1.js

var win = Ti.UI.currentWindow;
var viewView1 = Ti.UI.createView({
    backgroundColor: '#ffb1bd',
    borderRadius:10,
    top:10,
    width:280,
    height:280
});
win.add(viewView1);

Comments

  1. Don Thorp 2011-04-15

    @hal please provide the stacktrace of the error with the report. thx.

  2. hal 2011-04-15

    Please excuse the oversight, Don. Here's the stacktrace:


    1948 TiActivity W (main) [4130,9784] Notifying TiUIWindow, activity is created 1948 KrollContext D (kroll$3) [71,9855] eval file: app://test.js 60 ActivityManager I Starting activity: Intent { cmp=com.appcelerator.persistence/org.appcelerator.titanium.TiModalActivity (has extras) } 1948 PhoneWindow D couldn't save which view has focus because the focused view com.android.internal.policy.impl.PhoneWindow$DecorView@44fc3418 has no id. 1948 TiActivity W (main) [208,10063] Notifying TiUIWindow, activity is created 1948 AndroidRuntime D Shutting down VM 1948 dalvikvm W threadid=1: thread exiting with uncaught exception (group=0x4001d800) 1948 TiUncaughtHandler E (main) [38,10101] Sending event: exception on thread: main msg:java.lang.NullPointerException 1948 TiUncaughtHandler E java.lang.NullPointerException 1948 TiUncaughtHandler E at org.appcelerator.titanium.view.TiUIView.initializeBorder(TiUIView.java:566) 1948 TiUncaughtHandler E at org.appcelerator.titanium.view.TiUIView.processProperties(TiUIView.java:396) 1948 TiUncaughtHandler E at ti.modules.titanium.ui.TiUIWindow.processProperties(TiUIWindow.java:490) 1948 TiUncaughtHandler E at org.appcelerator.titanium.TiProxy.setModelListener(TiProxy.java:109) 1948 TiUncaughtHandler E at ti.modules.titanium.ui.TiUIWindow.handleMessage(TiUIWindow.java:388) 1948 TiUncaughtHandler E at android.os.Handler.dispatchMessage(Handler.java:95) 1948 TiUncaughtHandler E at android.os.Looper.loop(Looper.java:123) 1948 TiUncaughtHandler E at android.app.ActivityThread.main(ActivityThread.java:4627) 1948 TiUncaughtHandler E at java.lang.reflect.Method.invokeNative(Native Method) 1948 TiUncaughtHandler E at java.lang.reflect.Method.invoke(Method.java:521) 1948 TiUncaughtHandler E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 1948 TiUncaughtHandler E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 1948 TiUncaughtHandler E at dalvik.system.NativeStart.main(Native Method) 1948 TiApplication D (main) [156,10257] Analytics Event: type=ti.crash 1948 TiApplication D event=ti.crash 1948 TiApplication D timestamp=2010-09-24T02:37:29.111+0000 1948 TiApplication D mid=9774d56d682e549c 1948 TiApplication D sid=a4057cd3-deb0-406e-bef0-b4e9e03e0c6d 1948 TiApplication D aguid=ef78a2da-817a-47ba-8b32-3a21a3745224 1948 TiApplication D isJSON=true 1948 TiApplication D payload={"value":thread_namemain\nthread_id1\nerror_msgjava.lang.NullPointerException\n<<<<<<<<<<<<<<< STACK TRACE >>>>>>>>>>>>>>>\norg.appcelerator.titanium.view.T

                                     iUIView.initializeBorder(TiUIView.java:566)\norg.appcelerator.titanium.view.TiUIView.processProperties(TiUIView.java:396)\nti.modules.titanium.ui.TiUIWindow.processProperties(TiUIWindow.java:490)\norg.appcelerator.titanium.TiProxy.setModelListener(TiProxy.java:109)\nti.modules.titanium.ui.TiUIWindow.handleMessage(TiUIWindow.java:3
                                     88)\nandroid.os.Handler.dispatchMessage(Handler.java:95)\nandroid.os.Looper.loop(Looper.java:123)\nandroid.app.ActivityThread.main(ActivityThread.java:4627)\njava.lan
                                     g.reflect.Method.invokeNative(Native Method)\njava.lang.reflect.Method.invoke(Method.java:521)\ncom.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.
                                     java:868)\ncom.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)\ndalvik.system.NativeStart.main(Native Method)\n}
       

    1948 AndroidRuntime E FATAL EXCEPTION: main 1948 AndroidRuntime E java.lang.NullPointerException 1948 AndroidRuntime E at org.appcelerator.titanium.view.TiUIView.initializeBorder(TiUIView.java:566) 1948 AndroidRuntime E at org.appcelerator.titanium.view.TiUIView.processProperties(TiUIView.java:396) 1948 AndroidRuntime E at ti.modules.titanium.ui.TiUIWindow.processProperties(TiUIWindow.java:490) 1948 AndroidRuntime E at org.appcelerator.titanium.TiProxy.setModelListener(TiProxy.java:109) 1948 AndroidRuntime E at ti.modules.titanium.ui.TiUIWindow.handleMessage(TiUIWindow.java:388) 1948 AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:95) 1948 AndroidRuntime E at android.os.Looper.loop(Looper.java:123) 1948 AndroidRuntime E at android.app.ActivityThread.main(ActivityThread.java:4627) 1948 AndroidRuntime E at java.lang.reflect.Method.invokeNative(Native Method) 1948 AndroidRuntime E at java.lang.reflect.Method.invoke(Method.java:521) 1948 AndroidRuntime E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 1948 AndroidRuntime E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 1948 AndroidRuntime E at dalvik.system.NativeStart.main(Native Method) 60 ActivityManager W Force finishing activity com.appcelerator.persistence/org.appcelerator.titanium.TiModalActivity 60 ActivityManager W Force finishing activity com.appcelerator.persistence/ti.modules.titanium.ui.TiTabActivity 60 ActivityManager W Activity pause timeout for HistoryRecord{451543d8 com.appcelerator.persistence/org.appcelerator.titanium.TiModalActivity} 60 ActivityManager W Launch timeout has expired, giving up wake lock! 60 ActivityManager W Activity idle timeout for HistoryRecord{451543d8 com.appcelerator.persistence/org.appcelerator.titanium.TiModalActivity} 60 ActivityManager W Activity idle timeout for HistoryRecord{45082d98 com.appcelerator.persistence/.PersistenceActivity}


  3. Jon Alter 2011-04-15

    Associated Helpdesk Ticket ##

    http://developer.appcelerator.com/helpdesk/view/73631">http://developer.appcelerator.com/helpdesk/view/73631

  4. Opie Cyrus 2011-04-15

    (from [48d07e194f46b3a0495d73624bac4e7d3b79706a]) [#1899 state:fixed-in-qa] ignored border properties when set on heavy weight windows

    ignore border properties on heavy weight windows as border properties are not meant to be used with them and the behavior is incorrect. got approval from Don Thorp before taking this approach.
    https://github.com/appcelerator/titanium_mobile/commit/48d07e194f46b3a0495d73624bac4e7d3b79706a"> https://github.com/appcelerator/titanium_mobile/commit/48d07e194f46...

  5. Opie Cyrus 2011-04-15

    Fix can be verified with test attached when ticket was created. Ultimately, there should be no border effects on the main modal window while the new view should have the border properties in place.

  6. Bill Dawson 2011-04-15

    Making sure opie gets credit!

  7. Don Thorp 2011-04-15

    Correcting title.

  8. Natalie Huynh 2011-04-15

    Tested with [INFO] Titanium SDK version: 1.7.0 (03/22/11 09:36 42d2187) on
    Emulator 2.1
    Nexus S 2.3.2

JSON Source