Skip to main content

Bug in MethodAccessorGenerator.emitInvoke()

1 reply [Last post]
cowwoc
Offline
Joined: 2003-08-24

There is some sort of bug in MethodAccessorGenerator.emitInvoke().

Under certain conditions (hard to explain but easy for me to reproduce on my end), I get this stack-trace:

java.lang.StackOverflowError
at java.lang.ClassLoader.check(Unknown Source)
at java.lang.ClassLoader.findLoadedClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at com.be.desktopbeautifier.client.Desktop.getInstance(Desktop.java:57)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.be.desktopbeautifier.client.Desktop.getInstance(Desktop.java:52)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.be.desktopbeautifier.client.Desktop.getInstance(Desktop.java:52)

What is happening is that:

1) My code in Desktop.getInstance() calls Method.invoke() on a class that is *not* Desktop. That is, I am not invoking a method within the same class.

2) When Method.invoke() is run internally some sort of bug occurs which leads to a StackOverflowError. It makes no sense to me that Method.invoke() within Desktop.getInstance() ends up invoking itself somehow. What makes the matter worse is that the method I am trying to invoke is never reached or executed.

Can someone familiar with the JRE code take a look at MethodAccessorGenerator.emitInvoke() and try to figure out under what conditions this might occur? Any ideas?

Thanks,
Gili

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cowwoc
Offline
Joined: 2003-08-24

This seems to be a ProGuard bug. I have contacted the author and will know more in a couple of days.

Gili