Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] [jira] Created: (UDIG-1198) Deadlock in Catalog

Deadlock in Catalog
-------------------

                 Key: UDIG-1198
                 URL: http://jira.codehaus.org/browse/UDIG-1198
             Project: uDIG
          Issue Type: Bug
          Components: catalog
    Affects Versions: UDIG 1.1.RC8
            Reporter: Vitali Diatchkov
         Assigned To: Jody Garnett


When the user removes a service from Catalog view the deadlock is possible. The reason is GeometryProperty class and synchronized block in this method:

        public void changed( IResolveChangeEvent event ) {
            if( event.getType()!=Type.POST_CHANGE || isEvaluating )
                return;
            ILayer match;
            synchronized (GeometryProperty.this) {
                IResolveDelta delta = event.getDelta();
                match = match(delta.getResolve());
                if (match == null) {
                    List<IResolveDelta> children = delta.getChildren();
                    match = recursiveChanged(children);
                }
            }
            if (match != null)
                wrapped.notifyChange(match);

        }

The Display thread goes through catalog listener and this synchronized block, then in match(..) method calls LayerImpl.getGeoResources()  that in its own order leads to call of WFSServiceImpl.getDS() asynchronously in the new thread (because  of PlatformGIS.runBlockingOperation() ). In the end of this method again a ResolveChangeEvent is sent and finally the thread is blocked at synchronized place in GeometryProperty  at the time when Display thread has already come into the synchronized block and waits in PlatformGIS.runBlockingOperation() method.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


Back to the top