Bug 991257 - Spurious Globally uncaught Exception: (TypeError): 'null' is not an object
Spurious Globally uncaught Exception: (TypeError): 'null' is not an object
Status: ON_QA
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.9
Unspecified Unspecified
unspecified Severity high (vote)
: ---
: ---
Assigned To: Mike Thompson
Mike Foley
:
Depends On:
Blocks: 993451
  Show dependency treegraph
 
Reported: 2013-08-01 22:08 EDT by Mike Thompson
Modified: 2013-08-05 20:47 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 993451 (view as bug list)
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mike Thompson 2013-08-01 22:08:07 EDT
Description of problem:
The new metrics page with the graphs has spurious errors with navigating different time ranges.

This code was just added on Friday(July 26) so its new to the codebase.


How reproducible:
Spurious bug. Does seem to happen more on Safari but I can make it happen in FireFox as well just not as much.


Steps to Reproduce:
1. Goto Monitor --> Metrics tab
2. Change the date range around a few times 1d, 4h, 8h, 1m, 12, 5d etc...
3. Observer the globally uncaught exception

Actual results:
Root Cause :	
(TypeError): 'null' is not an object (evaluating 'this.form.getSavedItemValue') stack: isc_FormItem_getValue@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:1370 isc_FormItem_updateValueMap@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:1273 isc_FormItem_setValueMap@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:1270 isc_c_Class_invokeSuper@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:284 isc_c_Class_Super@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:276 isc_SelectItem_setValueMap@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:2366 com_smartgwt_client_widgets_form_fields_FormItem_$setValueMapMethod__Lcom_smartgwt_client_widgets_form_fields_FormItem_2Lcom_google_gwt_core_client_JavaScriptObject_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:5648 com_smartgwt_client_widgets_form_fields_FormItem_$setValueMap__Lcom_smartgwt_client_widgets_form_fields_FormItem_2Ljava_util_LinkedHashMap_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:5643 com_smartgwt_client_widgets_form_fields_FormItem_setValueMap__Ljava_util_LinkedHashMap_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:5810 org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_table_AddToDashboardComponent$3_$onSuccess__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_table_AddToDashboardComponent$3_2Lorg_rhq_core_domain_util_PageList_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:119815 org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_table_AddToDashboardComponent$3_onSuccess__Ljava_lang_Object_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:119836 com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:6278 org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:48123 com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:1483 com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:1787 @http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:7277 com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:593 com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:623 @http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:608 [native code] line: 1370 sourceURL: http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js
Detail :	
com.google.gwt.core.client.JavaScriptException:(TypeError): 'null' is not an object (evaluating 'this.form.getSavedItemValue')
 stack: isc_FormItem_getValue@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:1370
isc_FormItem_updateValueMap@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:1273
isc_FormItem_setValueMap@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:1270
isc_c_Class_invokeSuper@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:284
isc_c_Class_Super@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:276
isc_SelectItem_setValueMap@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:2366
com_smartgwt_client_widgets_form_fields_FormItem_$setValueMapMethod__Lcom_smartgwt_client_widgets_form_fields_FormItem_2Lcom_google_gwt_core_client_JavaScriptObject_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:5648
com_smartgwt_client_widgets_form_fields_FormItem_$setValueMap__Lcom_smartgwt_client_widgets_form_fields_FormItem_2Ljava_util_LinkedHashMap_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:5643
com_smartgwt_client_widgets_form_fields_FormItem_setValueMap__Ljava_util_LinkedHashMap_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:5810
org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_table_AddToDashboardComponent$3_$onSuccess__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_table_AddToDashboardComponent$3_2Lorg_rhq_core_domain_util_PageList_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:119815
org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_table_AddToDashboardComponent$3_onSuccess__Ljava_lang_Object_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:119836
com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:6278
org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:48123
com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:1483
com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:1787
@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:7277
com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:593
com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:623
@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:608
[native code]
 line: 1370
 sourceURL: http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js
--- STACK TRACE FOLLOWS ---
(TypeError): 'null' is not an object (evaluating 'this.form.getSavedItemValue')
 stack: isc_FormItem_getValue@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:1370
isc_FormItem_updateValueMap@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:1273
isc_FormItem_setValueMap@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:1270
isc_c_Class_invokeSuper@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:284
isc_c_Class_Super@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:276
isc_SelectItem_setValueMap@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Forms.js:2366
com_smartgwt_client_widgets_form_fields_FormItem_$setValueMapMethod__Lcom_smartgwt_client_widgets_form_fields_FormItem_2Lcom_google_gwt_core_client_JavaScriptObject_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:5648
com_smartgwt_client_widgets_form_fields_FormItem_$setValueMap__Lcom_smartgwt_client_widgets_form_fields_FormItem_2Ljava_util_LinkedHashMap_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:5643
com_smartgwt_client_widgets_form_fields_FormItem_setValueMap__Ljava_util_LinkedHashMap_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:5810
org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_table_AddToDashboardComponent$3_$onSuccess__Lorg_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_table_AddToDashboardComponent$3_2Lorg_rhq_core_domain_util_PageList_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:119815
org_rhq_enterprise_gui_coregui_client_inventory_resource_detail_monitoring_table_AddToDashboardComponent$3_onSuccess__Ljava_lang_Object_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:119836
com_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_$onResponseReceived__Lcom_google_gwt_user_client_rpc_impl_RequestCallbackAdapter_2Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:6278
org_rhq_enterprise_gui_coregui_client_util_rpc_TrackingRequestCallback_onResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_Response_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:48123
com_google_gwt_http_client_Request_$fireOnResponseReceived__Lcom_google_gwt_http_client_Request_2Lcom_google_gwt_http_client_RequestCallback_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:1483
com_google_gwt_http_client_RequestBuilder$1_onReadyStateChange__Lcom_google_gwt_xhr_client_XMLHttpRequest_2V@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:1787
@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:7277
com_google_gwt_core_client_impl_Impl_apply__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:593
com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:623
@http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/49348B39888F947E663720EBDC15ED4B.cache.html:608
[native code]
 line: 1370
 sourceURL: http://192.168.1.4:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Fo

Expected results:
No Errors


Additional info:

Cause:
This is directly caused by the code:

toolstrip.addFormItem(dashboardSelectItem);

in AddToDashboardComponent.java:87

If you comment out this line you don't run into this problem. There is an internal form to Toolstrip that if you use addFormItem() instead of addMember() that eventually turns to null (not immediately though).
Comment 1 Mike Thompson 2013-08-04 23:18:01 EDT
The mentioned above code is the cause the problem line is in the custom destroy of an implicit regular form not an EnhancedForm by the EnhancedUtility.java:83:

 static public <T extends Layout> void destroyMembers(T layout) {
        if (null == layout) {
            return;
        }

        Canvas[] members = layout.getMembers();
        if (null == members) {
            return;
        }

        for (Canvas currentMember : members) {
 >>>>>      layout.removeMember(currentMember);          
            currentMember.destroy();
        }
    } 

Will consult with Jay on this Monday.
Comment 2 Mike Thompson 2013-08-05 18:27:46 EDT
I fixed this one to work on both FireFox and Chrome. Safari still throws the Globally uncaught exception, however everything actually works just fine. 
 
It will take some more difficult work to find out why this fails for Safari.I will create a separate BZ for Safari.


master commit id: 59eaa50

Note You need to log in before you can comment on or make changes to this bug.