IFeatureClass.Search hangs indefinitely

248
6
09-08-2011 07:48 AM
Highlighted
New Contributor
I'm experiencing issues where ESRI.ArcGIS.Geodatabase.IFeatureClass.Search with a spatial filter hangs indefinitely.  I've let this run for well over a 24 hour period and the call never returns. 

Even more perplexing is that the call typically returns in under a second but on some calls it ends up hanging forever.  There is no CPU, RAM, or Disk activity on the ArcMap client and no activity in the database.  The last call to the database appears to be the query that the FeatureClass.Search would have generated and returned successfully.  Arcmap must be exited by killing the ArcMap.exe process via the task manager.

I've been able to reproduce this against multiple client machines and multiple copies of the SDE data.

We are running 9.3.1 Sp1 of ArcMap and SDE.  I've reproduced this with both direct connect and sde connect.
6 Replies
Highlighted
New Contributor III
I believe that an exception has occurred.  Enclose this block with try / catch just to be sure if exception has or has not occurred.
Reply
0 Kudos
Highlighted
New Contributor
Unfortunately there isn't any exception being thrown, the call is surrounded in a try, catch, finally block. 

My next objective is to see if anything is happening within SDE, both the client and database are doing nothing.
Reply
0 Kudos
Highlighted
New Contributor III
It seems to me like the problem lies in data side not in app.
Doesn't have solution but been in simmilar situation and solved by recreating database from ground up by redefining precision, projection and loading valid spatial data.

Try to isolate feature class that produces problem, can't be that whole SDE is having this kind of problem.
And to simplify the features in FC this maybe repairs geometry.
Reply
0 Kudos
Highlighted
Regular Contributor II
Hi,
What you don't mention is what the query filter looks like, are you doing a whereclause?  Based on the description of the problem it sounds like and SDE/RDBMS problem.  You didn't mention what RDMS or what version of SDE.  Complex whereclause + SDE (especially with mismatch version) + RDMS (especially unsupported patches) can lead to this kind of problem.  Make sure your database is patched and matches supported versions of SDE and that SDE is patched too.  If all the versions line up, you will probably have to turn tracing on the RDBMS to track down the problem.  I have seen queries go from 5 seconds to 5 minutes because of the Oracle optimizer choosing the wrong path.  24h seems like something broken on the SDE side.  You may need to rebuild indexes and other SDE cleanup/administration tasks (I am not an SDE expert.)
Reply
0 Kudos
Highlighted
Occasional Contributor
yes, that would also my tip.
May you try a spatialFilter = null (will return all features). In this way you may can locate the problem to the filter. Maybe you programmed an endless-loop there, at least it sounds like this.
Reply
0 Kudos
Highlighted
New Contributor

is there any chance you solved the issue? I have the same one. Oracle + ArcGIS Add-in 10.3/2 + Spatial Search query... <_< 

Reply
0 Kudos