Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326704

Summary: There is a timing issue when call hierarchy queries callees, sometime the list is empty.
Product: [Tools] PTP Reporter: John Liu <john_ws_liu>
Component: RDTAssignee: Chris Recoskie <recoskie>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ptp-inbox, recoskie, vivkong
Version: unspecified   
Target Milestone: 4.0.4   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch applied to org.eclipse.ptp.internal.rdt.core.miners.CDTMiner recoskie: iplog+

Description John Liu CLA 2010-09-30 14:42:32 EDT
Build Identifier: 

Sometime call hierarchy doesn't return anything for callees, especially for a long list.

Reproducible: Always
Comment 1 John Liu CLA 2010-09-30 16:02:57 EDT
The bug is caused by handleGetCallees() function in CDTMiner class, the
function sets the miner request status to 'done' before the return result is
set completely, so when the result is small, it may be finished before the
status is set, then the call hierarchy function works as expected, but when the
result is big, the 'done' status may be sent back before the result, then we
get an empty list for callees in this case.
Comment 2 John Liu CLA 2010-09-30 16:10:13 EDT
Created attachment 179996 [details]
Patch applied to org.eclipse.ptp.internal.rdt.core.miners.CDTMiner

The patch contains these fixes:

1, Fix the function handleGetCallees() by moving the call of "statusDone(status);" to its finally block.

2, A bunch of functions call "statusDone(status);" in try block, this may cause a deadlock in the client side when there is an exception happens before the status is set in the server side. So update all of these functions by moving the call of "statusDone(status);" to their finally block.
Comment 3 Chris Recoskie CLA 2010-10-01 13:22:24 EDT
Applied to ptp_4_0 and HEAD