Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5630] Android: Autorotate parameter causes crash

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionNeeds more info
Resolution Date2018-03-04T22:38:55.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labels7.0.2.GA, ANDROID
ReporterAndreas Pingas
AssigneeShak Hossain
Created2018-02-28T10:00:53.000+0000
Updated2018-11-15T22:26:31.000+0000

Description

When autorotate parameter is true in an ImageView, the the application terminates and the following message appears: [ERROR] : TiApplication: (main) [1718,1960] Sending event: exception on thread: main msg:android.os.NetworkOnMainThreadException; Titanium 7.0.2,2018/02/09 10:59,undefined [ERROR] : TiApplication: android.os.NetworkOnMainThreadException [ERROR] : TiApplication: at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1303) [ERROR] : TiApplication: at java.net.Inet6AddressImpl.lookupHostByName(Inet6AddressImpl.java:86) [ERROR] : TiApplication: at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java:74) [ERROR] : TiApplication: at java.net.InetAddress.getAllByName(InetAddress.java:752) [ERROR] : TiApplication: at com.android.okhttp.internal.Network$1.resolveInetAddresses(Network.java:29) [ERROR] : TiApplication: at com.android.okhttp.internal.http.RouteSelector.resetNextInetSocketAddress(RouteSelector.java:187) [ERROR] : TiApplication: at com.android.okhttp.internal.http.RouteSelector.nextProxy(RouteSelector.java:156) [ERROR] : TiApplication: at com.android.okhttp.internal.http.RouteSelector.next(RouteSelector.java:98) [ERROR] : TiApplication: at com.android.okhttp.internal.http.HttpEngine.createNextConnection(HttpEngine.java:345) [ERROR] : TiApplication: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:328) [ERROR] : TiApplication: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:246) [ERROR] : TiApplication: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:457) [ERROR] : TiApplication: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:405) [ERROR] : TiApplication: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:243) [ERROR] : TiApplication: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210) [ERROR] : TiApplication: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java) [ERROR] : TiApplication: at java.net.URL.openStream(URL.java:1057) [ERROR] : TiApplication: at org.appcelerator.titanium.util.TiFileHelper.handleNetworkURL(TiFileHelper.java:245) [ERROR] : TiApplication: at org.appcelerator.titanium.util.TiFileHelper.handleMessage(TiFileHelper.java:783) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : TiApplication: at org.appcelerator.kroll.common.TiMessenger.sendMessage(TiMessenger.java:323) [ERROR] : TiApplication: at org.appcelerator.kroll.common.TiMessenger.sendBlockingMessage(TiMessenger.java:289) [ERROR] : TiApplication: at org.appcelerator.kroll.common.TiMessenger.sendBlockingRuntimeMessage(TiMessenger.java:191) [ERROR] : TiApplication: at org.appcelerator.titanium.util.TiFileHelper.openInputStream(TiFileHelper.java:182) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiDrawableReference.getInputStream(TiDrawableReference.java:892) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiDrawableReference.getOrientation(TiDrawableReference.java:983) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.TiUIImageView.processProperties(TiUIImageView.java:822) [ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1237) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:528) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:519) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:491) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.forceCreateView(TiViewProxy.java:459) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.createControls(TiTableViewRowProxyItem.java:242) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:423) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableViewRowProxyItem.setRowData(TiTableViewRowProxyItem.java:86) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableView$TTVListAdapter.getView(TiTableView.java:254) [ERROR] : TiApplication: at android.widget.AbsListView.obtainView(AbsListView.java:2363) [ERROR] : TiApplication: at android.widget.ListView.makeAndAddView(ListView.java:1970) [ERROR] : TiApplication: at android.widget.ListView.fillDown(ListView.java:704) [ERROR] : TiApplication: at android.widget.ListView.fillFromTop(ListView.java:765) [ERROR] : TiApplication: at android.widget.ListView.layoutChildren(ListView.java:1716) [ERROR] : TiApplication: at android.widget.AbsListView.onLayout(AbsListView.java:2162) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.support.v4.widget.SwipeRefreshLayout.onLayout(SwipeRefreshLayout.java:610) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableView.onLayout(TiTableView.java:650) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:862) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1767) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at org.appcelerator.titanium.view.TiCompositeLayout.onLayout(TiCompositeLayout.java:862) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) [ERROR] : TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:261) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.support.v7.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:443) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) [ERROR] : TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:261) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741) [ERROR] : TiApplication: at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585) [ERROR] : TiApplication: at android.widget.LinearLayout.onLayout(LinearLayout.java:1494) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) [ERROR] : TiApplication: at android.widget.FrameLayout.onLayout(FrameLayout.java:261) [ERROR] : TiApplication: at com.android.internal.policy.DecorView.onLayout(DecorView.java:726) [ERROR] : TiApplication: at android.view.View.layout(View.java:17637) [ERROR] : TiApplication: at android.view.ViewGroup.layout(ViewGroup.java:5575) [ERROR] : TiApplication: at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2346) [ERROR] : TiApplication: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2068) [ERROR] : TiApplication: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1254) [ERROR] : TiApplication: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6337) [ERROR] : TiApplication: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:874) [ERROR] : TiApplication: at android.view.Choreographer.doCallbacks(Choreographer.java:686) [ERROR] : TiApplication: at android.view.Choreographer.doFrame(Choreographer.java:621) [ERROR] : TiApplication: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:860) [ERROR] : TiApplication: at android.os.Handler.handleCallback(Handler.java:751) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:154) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:6119) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) [INFO] : art: Do partial code cache collection, code=123KB, data=109KB [INFO] : art: After code cache collection, code=122KB, data=108KB [INFO] : art: Increasing code cache capacity to 512KB [WARN] : TiVerify: (Timer-0) [3044,5004] Verifying module licenses... [INFO] : TiVerify: (Timer-0) [1098,6102] Succesfully verified module licenses

Comments

  1. Sharif AbuDarda 2018-02-28

    Hello, Please share a full reproducible test code for the issue. A sample project is even batter. Thanks.
  2. Mostafizur Rahman 2018-03-04

    Hello [~andreas.pingas],
Just passing a followup here.Are you able to get that sorted out? If not, please provide a full sample testcode that regenerates the issue. Better to provide a sample app as an attachment here. We will test the issue in our environment. Also, provide the SDK and CLI version you are testing on. Regards 
Axway Appcelerator Support
  3. Andreas Pingas 2018-11-15

JSON Source