Bug 754521 - NPE occurs when navigating away from Resource detail view before that view has finished loading
Summary: NPE occurs when navigating away from Resource detail view before that view ha...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: RHQ 4.3.0
Assignee: Charles Crouch
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: rhq41-ui rhq-uxd
TreeView+ depends on / blocked
 
Reported: 2011-11-16 17:56 UTC by Ian Springer
Modified: 2015-02-01 23:27 UTC (History)
3 users (show)

Fixed In Version: 4.3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-01 10:00:36 UTC
Embargoed:


Attachments (Terms of Use)

Description Ian Springer 2011-11-16 17:56:32 UTC
I went to a Resource detail view and then quickly clicked on the Dashboard link to navigate away before the Resource detail view had finished loading. I got the following globally uncaught exception:

java.lang.NullPointerException:null
--- STACK TRACE FOLLOWS ---
null
   at org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceTreeDatasource.introduceTypeAndCategoryNodes(ResourceTreeDatasource.java:244)
   at org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceTreeDatasource.buildNodes(ResourceTreeDatasource.java:197)
   at org.rhq.enterprise.gui.coregui.client.inventory.resource.detail.ResourceTreeDatasource$2.onResourceTypeLoaded(ResourceTreeDatasource.java:177)
   at org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository$1.onTypesLoaded(ResourceTypeRepository.java:140)
   at org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository$5.onSuccess(ResourceTypeRepository.java:438)
   at org.rhq.enterprise.gui.coregui.client.inventory.resource.type.ResourceTypeRepository$5.onSuccess(ResourceTypeRepository.java:1)
   at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:216)
   at org.rhq.enterprise.gui.coregui.client.util.rpc.TrackingRequestCallback.onResponseReceived(TrackingRequestCallback.java:89)
   at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
   at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:393)
   at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
   at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
   at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
   at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1714)
   at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
   at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
   at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
   at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
   at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
   at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
   at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
   at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
   at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
   at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
   at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1669)
   at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
   at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
   at java.lang.Thread.run(Thread.java:662)

Comment 1 Ian Springer 2012-02-15 15:28:26 UTC
Fixed in master:

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=b93446c

We now detect the condition and log a gwt DEBUG message like the following, rather than displaying an error message + stack trace to the user:

[INFO] (CoreGUI.java:160) 2012-02-15 10:21:49,493 [DEBUG] User navigated to view [Reports] before view [Resource/10079] was done rendering - rendering of view [Resource/10079] has been aborted.

QE, note, you would need to look at the browser's JavaScript console to see the DEBUG message.

Comment 2 Charles Crouch 2012-02-21 17:30:29 UTC
Setting Target Release correctly.

Comment 5 Heiko W. Rupp 2013-09-01 10:00:36 UTC
Bulk closing of items that are on_qa and in old RHQ releases, which are out for a long time and where the issue has not been re-opened since.


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