[TIMOB-24728] Crash when closing a window with a TableView on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-05-24T17:15:53.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.1.0 |
Components | Android |
Labels | android, regression, titanium |
Reporter | Luc-Edmond Gaspard |
Assignee | Gary Mathews |
Created | 2017-05-23T20:56:21.000+0000 |
Updated | 2018-08-06T17:49:32.000+0000 |
Description
The app crash when closing a window that contain a TableView in a ScrollView.
FATAL EXCEPTION: main
Process: com.test.test222, PID: 15752
java.lang.RuntimeException: Unable to destroy activity {com.test.test222/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to read from field 'ti.modules.titanium.ui.widget.TiUIScrollView$TiScrollViewLayout ti.modules.titanium.ui.widget.TiUIScrollView$TiHorizontalScrollView.layout' on a null object reference
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4639)
at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4662)
at android.app.ActivityThread.-wrap7(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1711)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6688)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
Caused by: java.lang.NullPointerException: Attempt to read from field 'ti.modules.titanium.ui.widget.TiUIScrollView$TiScrollViewLayout ti.modules.titanium.ui.widget.TiUIScrollView$TiHorizontalScrollView.layout' on a null object reference
at ti.modules.titanium.ui.widget.TiUIScrollView$TiHorizontalScrollView.access$1000(TiUIScrollView.java:290)
at ti.modules.titanium.ui.widget.TiUIScrollView.getLayout(TiUIScrollView.java:586)
at ti.modules.titanium.ui.widget.TiUIScrollView.remove(TiUIScrollView.java:666)
at org.appcelerator.titanium.view.TiUIView.release(TiUIView.java:1259)
at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews(TiViewProxy.java:543)
at org.appcelerator.titanium.proxy.TiViewProxy.releaseViews(TiViewProxy.java:540)
at org.appcelerator.titanium.proxy.TiWindowProxy.closeFromActivity(TiWindowProxy.java:191)
at org.appcelerator.titanium.TiBaseActivity.onDestroy(TiBaseActivity.java:1579)
at org.appcelerator.titanium.TiActivity.onDestroy(TiActivity.java:32)
at android.app.Activity.performDestroy(Activity.java:7165)
at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1161)
at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4626)
... 9 more
Attachments
File | Date | Size |
---|---|---|
test.js | 2017-05-23T20:51:57.000+0000 | 1241 |
Hello, Please use the latest SDK 6.0.4.GA. I can't reproduce the issue there.
It is with the 6.1.0 RC sdk that it crash. It does work on 6.0.4.
[~gaspard.le] Thanks for the report. Moving this over to TIMOB
Steps to reproduce
Copy the code in attached test.js to app.js
Build for Android
Click open window
Click close
Environment OP 3 7.1.1 Ti SDK: 6.1.0.v20170523143141, 6.2.0.v201705231032326_1_X: https://github.com/appcelerator/titanium_mobile/pull/9078
master: https://github.com/appcelerator/titanium_mobile/pull/9089
[~gmathews], App built with master with the fix, the app crashes for me with the following steps & logs: 1. After the app opens click on
open window
. 2. Click onclose
to close the new window. 3. Hit the back button to exit the app. 4. You see dialogUnfortunately, app has stopped
. Logs:On Samsung S4 android 4.4.4 the app crashes with normal opening & closing the second window logs:
[~lchoudhary] That's probably due to the V8 changes in
master
https://github.com/appcelerator/titanium_mobile/pull/8382 Although, I'm unable to reproduce the issue on6.2.0.v20170526055219
Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.