[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: URGENT: Need help with Class Loader hang

Well, PluginDescriptor.isPluginActivated() is synchronized. Are you sure
you're not locking the PluginDescriptor in the main thread?

"Jeffrey S. Kobal" wrote:

> I have a class that works fine stand-alone, but not when loaded from a
> plugin to the Eclipse IDE.  The main thread is starting another thread
> as a worker, and waits for it to initialize using the Object.Wait()
> method (which will wait indefinitely for a notify).
>
> The secondary thread is in its initialization, but gets hung up during
> the loading of a class.  This is the stack at the time of the hang:
>
>         PluginDescriptor.isPluginActivated()
>         PluginClassLoader.findClassParentsSelf(String, boolean,
> DelegatingURLClassLoader, boolean)
>         PluginClassLoader(DelegatingURLClassLoader).loadClass(String,
> boolean, DelegatingURLClassLoader, Vector, boolean)
>         PluginClassLoader(DelegatingURLClassLeader).loadClass(String,
> boolean)
>         Class1Impl.getInterface()
>         Class2.getInterface()
>         Class2.initialize(Thread)
>         Class1.run()
>
> Upon exiting from Class2.initialize(), the first thread would be
> notified and resume running.... but as it is, this thread never exits
> from the isPluginActivated() method.  What is especially strange is that
> the isPluginActivated() method looks like it should only return a simple
> value from a field.... certainly nothing that should be blocking.  The
> thread is still showing as "Alive", so I can't see why it wouldn't come
> back from the loadClass call.
>
> Once again, I don't have this problem running stand-alone, but the
> PluginClassLoader code wouldn't be involved at all in that case.  Please
> help if you can!  Thanks....
>
> Jeffrey S. Kobal
> IBM Corporation