threading issues

View: New views
2 Messages — Rating Filter:   Alert me  

threading issues

by Newcomb, Michael-P57487 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

threading issues

We have noticed some multi-threading issues with OpenMap, specifically deadlock.

One instance we just discovered was with ScaleTextPanel. It is a ProjectionListener and when the projection is changed it updates the text field with the new scale. The problem is that the projection changed event is propogated with a thread via ProjectionChangeNotifier. This is not necessarily the problem, but ScaleTextPanel should test to see if the current thread calling setProjection() is the AWT thread. If it is not, it needs to call EventQueue.invokeLater() with a task to update the text fields.

Might be a good idea to check all ProjectionListener.projectionChanged() implementations to see if they access any components.

Michael


Re: threading issues

by Don Dietrick :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Michael,

What version of OpenMap are you using, and on what JDK and OS?

- Don

On Oct 6, 2009, at 2:24 PM, Newcomb, Michael-P57487 wrote:

> We have noticed some multi-threading issues with OpenMap,  
> specifically deadlock.
>
> One instance we just discovered was with ScaleTextPanel. It is a  
> ProjectionListener and when the projection is changed it updates the  
> text field with the new scale. The problem is that the projection  
> changed event is propogated with a thread via  
> ProjectionChangeNotifier. This is not necessarily the problem, but  
> ScaleTextPanel should test to see if the current thread calling  
> setProjection() is the AWT thread. If it is not, it needs to call  
> EventQueue.invokeLater() with a task to update the text fields.
>
> Might be a good idea to check all  
> ProjectionListener.projectionChanged() implementations to see if  
> they access any components.
>
> Michael
>

--
[To unsubscribe to this list send an email to "majdart@..."
with the following text in the BODY of the message "unsubscribe openmap-users"]