Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25658] TableView NullPointerException on getOuterView Titanium 7.0.1 Android

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2018-01-17T17:03:22.000+0000
Affected Version/sRelease 7.0.0
Fix Version/sn/a
ComponentsAndroid
Labelsalloy, android, sdk-7, titanium
ReporterSaïd Liemlahi
AssigneeYordan Banev
Created2018-01-09T21:27:57.000+0000
Updated2018-01-17T17:03:22.000+0000

Description

I have a news application on Titanium that was working fine on SDK 6.3.0. Since the update to SDK 7.0.1, I am facing a NullPointerException on Android. I have narrowed down the issue so that I have now a simple test case to reproduce it. Enclosed are the crash logs and the sources used on this sample : - models/article.js : simple sql article model with id and status fields - index.xml and index.js : simple news list view and controller - article.xml and article.js : simple news detail view and controller The sample works as follows. At launch, a list of news is displayed as a TableView. Each row displays a title and a status. When you click on an item, a new window is opened to display the news details. In that screen, you must click on the view to set the news status to 1. When you go back, the list is displayed and the status has been updated on the selected row. Now as soon as you try to scroll down the screen, the application crashes. The issue is due to the Alloy Collection update to set the article status to 1.
function read() {
	var article = Alloy.Collections.article.at(index);
	article.save({status: 1});
}
Regards

Attachments

FileDateSize
app.zip2018-01-09T19:15:44.000+00002508
environment_check.txt2018-01-10T13:50:15.000+00004663
genymotion_console_logs.txt2018-01-10T13:50:17.000+000011317
log.txt2018-01-09T19:17:52.000+000021356
TableTest.zip2018-01-10T13:52:10.000+00009405134

Comments

  1. Mostafizur Rahman 2018-01-10

    Hello [~sliemlahi], Tested the issue on Android 7 device using SDK 7.0.1.GA. After running we do the following: 1)When click on an item, a new window is opened to display the news details. In that screen, we click on the view to set the news status to 1. 2)When you go back, the list is displayed and the status has been updated on the selected row. 3)Got the following error without any crash:
       
        [ERROR] :  BoostFramework: BoostFramework() : Exception_1 = java.lang.ClassNotFoundException: Didn't find class "com.qualcomm.qti.Performance" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /vendor/lib]]
       
       
    Can you please share the missing class *com.qualcomm.qti.Performance*? so that we can test again to reproduce the issue. *Console logs:*
       
       WARN] :   SELinux: SELinux selinux_android_compute_policy_index : Policy Index[2],  Con:u:r:zygote:s0 RAM:SEPF_SECMOBILE_7.0_0009, [-1 -1 -1 -1 0 1]
       [INFO] :   TiApplication: (main) [0,0] checkpoint, app created.
       [INFO] :   TiApplication: (main) [54,54] Titanium 7.0.1 (2017/12/18 10:42 undefined)
       [INFO] :   MultiDex: VM with version 2.1.0 has multidex support
       [INFO] :   MultiDex: install
       [INFO] :   MultiDex: VM has multidex support, MultiDex support library is disabled.
       [WARN] :   TiAndroid: (main) [1677,1731] Application instance no longer available. Unable to get current activity.
       [WARN] :   TiAndroid: (main) [2,1733] Application instance no longer available. Unable to get current activity.
       [WARN] :   TiAndroid: (main) [0,1733] Application instance no longer available. Unable to get current activity.
       [INFO] :   TiApplication: (main) [18,1751] Titanium Javascript runtime: v8
       [WARN] :   art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
       [INFO] :   TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null
       [WARN] :   TiApplication: (main) [120,120] Registering module with name already in use.
       [INFO] :   TiRootActivity: (main) [0,0] checkpoint, on root activity resume. activity = com.gsl.rakhiAlloy.RakhialloyActivity@a09424f
       [INFO] :   InputMethodManager: HSI ignore mServedView == null or mServedView.getWindowToken() != windowToken, mServedView :0
       [INFO] :   InputMethodManager: HSI ignore mServedView == null or mServedView.getWindowToken() != windowToken, mServedView :0
       [INFO] :   OpenGLRenderer: Initialized EGL, version 1.4
       [INFO] :   art: Do partial code cache collection, code=30KB, data=30KB
       [INFO] :   art: After code cache collection, code=29KB, data=30KB
       [INFO] :   art: Increasing code cache capacity to 128KB
       [INFO] :   Choreographer: Skipped 59 frames!  The application may be doing too much work on its main thread.
       [INFO] :   art: Do partial code cache collection, code=55KB, data=62KB
       [INFO] :   art: After code cache collection, code=55KB, data=62KB
       [INFO] :   art: Increasing code cache capacity to 256KB
       [INFO] :   APSAnalyticsService: Analytics Service Started
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   APSAnalyticsService: Stopping Analytics Service
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   APSAnalyticsService: Analytics Service Started
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [ERROR] :  BoostFramework: BoostFramework() : Exception_1 = java.lang.ClassNotFoundException: Didn't find class "com.qualcomm.qti.Performance" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib, /vendor/lib]]
       [INFO] :   APSAnalyticsService: Stopping Analytics Service
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering key to : action: 0x0 (0)
       [INFO] :   I/InputDispatcher( 2853): Delivering key to : action: 0x1 (0)
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   I/InputDispatcher( 2853): Delivering key to : action: 0x0 (0)
       [INFO] :   I/InputDispatcher( 2853): Delivering key to : action: 0x1 (0)
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   art: Do full code cache collection, code=106KB, data=121KB
       [INFO] :   art: After code cache collection, code=83KB, data=87KB
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   APSAnalyticsService: Analytics Service Started
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   APSAnalyticsService: Stopping Analytics Service
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   APSAnalyticsService: Analytics Service Started
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/InputDispatcher( 2853): Delivering key to : action: 0x0 (0)
       [INFO] :   I/InputDispatcher( 2853): Delivering key to : action: 0x1 (0)
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   APSAnalyticsService: Stopping Analytics Service
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   APSAnalyticsService: Analytics Service Started
       [INFO] :   APSAnalyticsService: Stopping Analytics Service
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   art: Background partial concurrent mark sweep GC freed 23575(823KB) AllocSpace objects, 0(0B) LOS objects, 40% free, 17MB/28MB, paused 936us total 114.488ms
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   APSAnalyticsService: Analytics Service Started
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   APSAnalyticsService: Stopping Analytics Service
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   APSAnalyticsService: Analytics Service Started
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   APSAnalyticsService: Stopping Analytics Service
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   art: Background partial concurrent mark sweep GC freed 130819(8MB) AllocSpace objects, 5(288KB) LOS objects, 40% free, 12MB/20MB, paused 1.152ms total 109.981ms
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   APSAnalyticsService: Analytics Service Started
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
       [INFO] :   APSAnalyticsService: Stopping Analytics Service
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   InputMethodManager: [IMM] startInputInner - mService.startInputOrWindowGainedFocus
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x0, toolType: 1
       [INFO] :   I/InputDispatcher( 2853): Delivering touch to : action: 0x1, toolType: 1
       
       
       
    Thanks
  2. Saïd Liemlahi 2018-01-10

    Hi, I don't know what it this com.qualcomm.qti.Performance class. I have no such class in the sample project. To make things easier, I uploaded a full Alloy sample project created simply like that below.
       appc new -t titanium
       Appcelerator Command-Line Interface, version 7.0.1
       Copyright (c) 2014-2018, Appcelerator, Inc.  All Rights Reserved.
       ? What's the project name? TableTest
       ? What's your application id (example: com.myapp)? com.test.table
       [INFO]  Creating app project
       [INFO]  Template directory: /Users/XXX/Library/Application Support/Titanium/mobilesdk/osx/7.0.1.GA/templates/app/default
       [INFO]  Writing tiapp.xml
       [INFO]  Project created successfully in 478ms
       ? Would you like to enable native API access with Hyperloop for this app? No
       *** new completed. ***
       
    I then copied the 5 files included previously : model, controllers and views. Then I launched the project by executing the following command line :
       appc run -p android -C "Google Nexus 5X - 7.1.0 - API 25 - 1080x1920"
       
    Also, please do not forget to scroll down the list in step 3 to make the application crash. I have attached the new following files : - full new alloy project as stated before - environment check output - genymotion console logs of this new project Regards
  3. Yordan Banev 2018-01-10

    [~sliemlahi] Thank you for the test case. I was able to reproduce the issue with it.
  4. Yordan Banev 2018-01-11

    -PR-: https://github.com/appcelerator/titanium_mobile/pull/9720 new PR: https://github.com/appcelerator/titanium_mobile/pull/9721

JSON Source