Bug 760185

Summary: Global Exception in Events view
Product: [Other] RHQ Project Reporter: Heiko W. Rupp <hrupp>
Component: Core UIAssignee: Charles Crouch <ccrouch>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: high    
Version: 4.2CC: ccrouch, hbrock, hrupp
Target Milestone: ---   
Target Release: RHQ 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-31 10:11:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 730796, 760116    

Description Heiko W. Rupp 2011-12-05 15:45:44 UTC
I have 100k events collected. 
The events tab shows the first few. 
When I was quickly scrolling down with the mouse wheel, the lower half of the screen went blank (empty lines; as exepected when making space for more to come), then the exception showed and the remaining 
lines of the screen showed

Message is harmless, as the UI continues to work, but the message is annoying



com.google.gwt.core.client.JavaScriptException:(TypeError): sourceLocation is null
 stack: org_rhq_enterprise_gui_coregui_client_inventory_common_event_EventCompositeDatasource$5_hoverHTML__Ljava_lang_Object_2Lcom_smartgwt_client_widgets_grid_ListGridRecord_2IILjava_lang_String_2("&nbsp;",[object Object],138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html:134652
("loading","&nbsp;",138,3,[object Object])@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html:23812
com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2((function (record, value, rowNum, colNum, grid) {var recordJ = com_smartgwt_client_widgets_grid_ListGridRecord_getOrCreateRef__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_smartgwt_client_widgets_grid_ListGridRecord_2(record);var valueJ = $wnd.SmartGWT.convertToJavaType(value);return hoverCustomizer.hoverHTML__Ljava_lang_Object_2Lcom_smartgwt_client_widgets_grid_ListGridRecord_2IILjava_lang_String_2(valueJ, recordJ, rowNum, colNum);}),[object Object],[object Object])@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html:2474
("loading","&nbsp;",138,3,[object Object])@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html:2463
isc_ListGrid_cellHoverHTML("loading",138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Grids.js:1557
anonymous("loading",138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Grids.js:927
isc_GridRenderer__showHover("loading",138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Grids.js:718
isc_GridRenderer__cellHover(138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Grids.js:717
isc_c_Hover__doAction()@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:3764
isc_c_Class_fireCallback([object Object],(void 0),[object Array],[object Object],true)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:296
isc_c_Timer__fireTimeout("$ir32283")@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:1186
@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:1181

 fileName: http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html
 lineNumber: 134652
--- STACK TRACE FOLLOWS ---
(TypeError): sourceLocation is null
 stack: org_rhq_enterprise_gui_coregui_client_inventory_common_event_EventCompositeDatasource$5_hoverHTML__Ljava_lang_Object_2Lcom_smartgwt_client_widgets_grid_ListGridRecord_2IILjava_lang_String_2("&nbsp;",[object Object],138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html:134652
("loading","&nbsp;",138,3,[object Object])@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html:23812
com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2((function (record, value, rowNum, colNum, grid) {var recordJ = com_smartgwt_client_widgets_grid_ListGridRecord_getOrCreateRef__Lcom_google_gwt_core_client_JavaScriptObject_2Lcom_smartgwt_client_widgets_grid_ListGridRecord_2(record);var valueJ = $wnd.SmartGWT.convertToJavaType(value);return hoverCustomizer.hoverHTML__Ljava_lang_Object_2Lcom_smartgwt_client_widgets_grid_ListGridRecord_2IILjava_lang_String_2(valueJ, recordJ, rowNum, colNum);}),[object Object],[object Object])@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html:2474
("loading","&nbsp;",138,3,[object Object])@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html:2463
isc_ListGrid_cellHoverHTML("loading",138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Grids.js:1557
anonymous("loading",138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Grids.js:927
isc_GridRenderer__showHover("loading",138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Grids.js:718
isc_GridRenderer__cellHover(138,3)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Grids.js:717
isc_c_Hover__doAction()@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:3764
isc_c_Class_fireCallback([object Object],(void 0),[object Array],[object Object],true)@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:296
isc_c_Timer__fireTimeout("$ir32283")@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:1186
@http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/sc/modules/ISC_Core.js:1181

 fileName: http://snert:7080/coregui/org.rhq.enterprise.gui.coregui.CoreGUI/CE2276AC5BAC83316A1FFD8E5A1EDAB3.cache.html
 lineNumber: 134652
   at Unknown.org_rhq_enterprise_gui_coregui_client_inventory_common_event_EventCompositeDatasource$5_hoverHTML__Ljava_lang_Object_2Lcom_smartgwt_client_widgets_grid_ListGridRecord_2IILjava_lang_String_2(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.com_google_gwt_core_client_impl_Impl_entry0__Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2Ljava_lang_Object_2(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.isc_ListGrid_cellHoverHTML(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.isc_GridRenderer__showHover(Unknown source:0)
   at Unknown.isc_GridRenderer__cellHover(Unknown source:0)
   at Unknown.isc_c_Hover__doAction(Unknown source:0)
   at Unknown.isc_c_Class_fireCallback(Unknown source:0)
   at Unknown.isc_c_Timer__fireTimeout(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)
   at Unknown.anonymous(Unknown source:0)

Comment 1 Ian Springer 2011-12-14 20:32:28 UTC
Fixed in master - http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=4f832a4

The key to preventing such NPEs is to know that the value and/or record parameters may be null when the following method in a ListGridField HoverCustomizer is invoked while the ListGrid's data is still loading:
 
            public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum)

So always check for null before trying to access value or record. If they are null, just return null, which tells the ListGrid not to show a tooltip at all.

Comment 3 Heiko W. Rupp 2013-08-31 10:11:21 UTC
Bulk close of old bugs in VERIFIED state.