Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28385

Android ListView crash error on SDK 9.3.X

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 9.3.0
    • Fix Version/s: Release 10.0.0, Release 9.3.3
    • Component/s: Android
    • Environment:
    • Story Points:
      2
    • Sprint:
      2021 Sprint 5, 2021 Sprint 10

      Description

      Platform Android only
      SDK 9.3.0.GA, 9.3.1.GA and 9.3.2.GA

      ListView is crashing while scrolling. This is reproducible if the ListItem has an ImageView that should load an image from url. If I roll back to 9.2.2.GA the ListView is working as expected.

      Crash error
      [{{ERROR] TiExceptionHandler: (main) [30297,30666] Attempt to invoke virtual method 'android.app.Activity org.appcelerator.kroll.KrollProxy.getActivity()' on a null object reference
      [ERROR] TiExceptionHandler:
      [ERROR] TiExceptionHandler: org.appcelerator.titanium.view.TiDrawableReference.fromUrl(TiDrawableReference.java:163)
      [ERROR] TiExceptionHandler: ti.modules.titanium.ui.widget.TiUIImageView$1.downloadTaskFinished(TiUIImageView.java:105)
      [ERROR] TiExceptionHandler: org.appcelerator.titanium.util.TiDownloadManager.handleFireDownloadMessage(TiDownloadManager.java:284)
      [ERROR] TiExceptionHandler: org.appcelerator.titanium.util.TiDownloadManager.handleMessage(TiDownloadManager.java:355)
      [ERROR] TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:103)
      [ERROR] TiExceptionHandler: android.os.Looper.loop(Looper.java:214)
      [ERROR] TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:7356)
      [ERROR] TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)
      [ERROR] TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
      [ERROR] TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)}}

      Example Code

      Example code in attachments

      <Alloy>
      	<Window class="container" onOpen="setupList">
      		<ListView id="listView" defaultItemTemplate="template">
      			<Templates>
      				<ItemTemplate name="customtemplate">
      					<View class="card">
      						<ImageView bindId="image" class="pic" defaultImage="/images/defaultimg.png" />
      						<Label bindId="title" class="title" />
      					</View>
      				</ItemTemplate>
      			</Templates>
      			<ListSection id="section" />
      		</ListView>
      	</Window>
      </Alloy>
      

      function setupList() {
      	var items = []
       
      	for (var x = 0; x < 50; x++) {
      		items.push({
      			template: 'customtemplate',
      			image: {
      				image: 'https://picsum.photos/200'
      			},
      			title: {
      				text: 'Item no.' + x
      			}
      		});
      	}
       
      	$.section.items = items;
      }
       
      $.index.open();
      

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              mcristina.mavila Cristina Avila
              Reviewer:
              Gary Mathews
              Tester:
              Samir Mohammed
            • Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Integration