Issue 754 in google-guice: Guice hangs injecting members on objects whose class exteds from abstract classes

10 views
Skip to first unread message

google...@googlecode.com

unread,
Jun 18, 2013, 2:31:26 PM6/18/13
to google-g...@googlegroups.com
Status: New
Owner: ----

New issue 754 by rpvi...@gmail.com: Guice hangs injecting members on
objects whose class exteds from abstract classes
http://code.google.com/p/google-guice/issues/detail?id=754

I'm trying to Injector.injectMembers(Object) on an object that extends from
an abstract class and Guice simply hangs the thread. I tried the same with
a simple class and it works. Is this a known issue?

Steps to reproduce:
1. Creates an abstract class.
2. Creates a new class that extends from the abstract one and add some
@Inject members
3. Create an instance of the extending class
4. Try to call injector.injectMembers() on an instance of the class


--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

google...@googlecode.com

unread,
Jun 18, 2013, 2:50:44 PM6/18/13
to google-g...@googlegroups.com

Comment #1 on issue 754 by mccu...@gmail.com: Guice hangs injecting members
on objects whose class exteds from abstract classes
http://code.google.com/p/google-guice/issues/detail?id=754

I can't recreate the hang locally just by following the above steps, the
instance is injected as expected. Can you add an example testcase that
shows the problem? ie. a standalone project that can be compiled and run
locally.

google...@googlecode.com

unread,
Jun 18, 2013, 3:05:01 PM6/18/13
to google-g...@googlegroups.com

Comment #2 on issue 754 by rpvi...@gmail.com: Guice hangs injecting members
on objects whose class exteds from abstract classes
http://code.google.com/p/google-guice/issues/detail?id=754

I'm not sure if it's relavant but when I perform the
injector.injectMemebers(Object) the inject instance is also injected in
another class, i.e.:

class A {
@Inject
Injector injector;

// the class to inject the members was created in another class.
void method(SomeClass a) {
injector.injectMembers(a);
}
}

I'll try to reproduce but I'm really tight on time right now. Sorry!

google...@googlecode.com

unread,
Jun 18, 2013, 3:10:54 PM6/18/13
to google-g...@googlegroups.com

Comment #3 on issue 754 by mccu...@gmail.com: Guice hangs injecting members
on objects whose class exteds from abstract classes
http://code.google.com/p/google-guice/issues/detail?id=754

You can always take a thread dump which should show whether it's a deadlock
or livelock. A thread dump should also reveal any cycles in the
application/setup logic that might be contributing to the problem.

google...@googlecode.com

unread,
Jun 19, 2013, 5:10:52 AM6/19/13
to google-g...@googlegroups.com

Comment #4 on issue 754 by rpvi...@gmail.com: Guice hangs injecting members
on objects whose class exteds from abstract classes
http://code.google.com/p/google-guice/issues/detail?id=754

Please ignore this (shame). I was running in an application server and the
STDERR was being suppressed :/

google...@googlecode.com

unread,
Jun 19, 2013, 7:10:49 AM6/19/13
to google-g...@googlegroups.com
Updates:
Status: Invalid

Comment #5 on issue 754 by mccu...@gmail.com: Guice hangs injecting members
on objects whose class exteds from abstract classes
http://code.google.com/p/google-guice/issues/detail?id=754

OK, no worries
Reply all
Reply to author
Forward
0 new messages