*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();
Can someone from the team please validate this? Thx!
Just created a PR for this https://github.com/appcelerator/titanium_mobile/pull/12541
FR Passed, waiting on Jenkins build
merged to 9_3_X, master and 10_0_X for 10.0.0 target