| Summary: | Unload profiling data results in an exception | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Valentina Popescu <popescu> | ||||||||||
| Component: | TPTP | Assignee: | Marius Slavescu <slavescu> | ||||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||||
| Severity: | critical | ||||||||||||
| Priority: | P1 | CC: | apnan, ewchan | ||||||||||
| Version: | unspecified | Flags: | slavescu:
review+
|
||||||||||
| Target Milestone: | --- | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | closed460 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Valentina Popescu
I am getting this exception: java.lang.NullPointerException at org.eclipse.hyades.trace.ui.internal.util.PerftraceUtil.hasExecutionInfo(PerftraceUtil.java:1356) at org.eclipse.hyades.trace.views.adapter.internal.ExecutionStatisticPage2.isEmpty(ExecutionStatisticPage2.java:145) at org.eclipse.hyades.trace.ui.TraceViewer.addViewPage(TraceViewer.java:218) at org.eclipse.hyades.trace.ui.TraceViewer.addViewPage(TraceViewer.java:230) at org.eclipse.hyades.trace.ui.TraceViewer.selectionChanged(TraceViewer.java:519) at org.eclipse.tptp.platform.common.ui.trace.internal.helpers.TraceUIManager.selectionChanged(TraceUIManager.java:348) and an Eclipse error dialog. I assume this is the error in question. There was no error message in the log so I am not sure I'll attach a screen cap of the UI as I received from the user Created attachment 72703 [details]
error image
So what I did, I opened the agent with the Execution stats view then I unloaded the agent and then I again clicked on it in the Profiling monitors view, while the Execution stats view was open and the Link with viewer was on. The exception below is logged and an error dialog is displayed. I have no way to check that but looking at your steps this should be the same problem as reported here I cannot reproduce the error dialog that you have attached. If no view is opened the unload operation doesn't cause any errors, but the problem is it doesn't seem to unload the resource from memory, probably some action, possibly a cached selection is keeping the resource in memory. Memory is not decreasing as a result of the unload. If unloading the agent and then opening the agent in the execution view no error occurrs. The leak issue will be addressed under https://bugs.eclipse.org/bugs/show_bug.cgi?id=194544 Created attachment 72741 [details]
Patch for 194543
This patch is avoiding the null pointer exception is the views as well as in the the save action but doesn't solve the root cause of the problem, i.e. the fact that the unload fails to remove the agents from memory, the agents are still in memory as proxy objects with no associated resource.
Marius, can you review this fix please I think Eugene is on vacation until Wednesday Created attachment 72756 [details]
patch
Thanks Alex for your help and the patch. I review your patch and it looks safe to me. There is however a use case that still breaks. When users profile with Execution Analysis till it exits, save the resource, and then unload. View shows default page(gray page) but double clicking or right click>open view does not open the execution view anymore. Users will have to close the execution statistic view and reopen again.
I am attaching a patch here with the addition to fix the mentioned problem. Marius and Alex, please review. Thanks!
Strange, I cannot seem to get an exception in this case, and I'm pretty sure I have tested this scenario. Can you tell me where the code is throwing the exception? I don't have more data than what I've already attached to the defect Created attachment 72803 [details] Latest patch for 194543. Here is a patch which solves some more problems that I found during testing. The fix for the bug 194544 hopefully will resolve the root cause of these UI issues. I may be wrong, but I believe this is supposed ot be targeted and done in 4.4.0.1 I reviewed and tested the patch from Alex. Partial fix in CVS. Eugene please apply the remaining two files: /org.eclipse.hyades.trace.views/src/org/eclipse/hyades/trace/views/adapter/internal/ExecutionStatisticPage2.java /org.eclipse.hyades.trace.views/src/org/eclipse/hyades/trace/views/adapter/internal/PatternPage.java (In reply to comment #17) > Partial fix in CVS. > > Eugene please apply the remaining two files: > /org.eclipse.hyades.trace.views/src/org/eclipse/hyades/trace/views/adapter/internal/ExecutionStatisticPage2.java > /org.eclipse.hyades.trace.views/src/org/eclipse/hyades/trace/views/adapter/internal/PatternPage.java > patch are submitted. As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open. |