Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326704 - There is a timing issue when call hierarchy queries callees, sometime the list is empty.
Summary: There is a timing issue when call hierarchy queries callees, sometime the lis...
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: RDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.0.4   Edit
Assignee: Chris Recoskie CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-30 14:42 EDT by John Liu CLA
Modified: 2010-10-01 13:23 EDT (History)
3 users (show)

See Also:


Attachments
Patch applied to org.eclipse.ptp.internal.rdt.core.miners.CDTMiner (6.90 KB, text/plain)
2010-09-30 16:10 EDT, John Liu CLA
recoskie: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
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