Re: Re: Stack size too large

Rajaraman Santhanam <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <12c4f634791.-4944665320303788882.8524137946434785589@zohocorp.com>
I had made a mistake on assigning the label for visitTryCatchBlock. On checking the cause for NPE in MethodWriter code, I went back and checked my code and I have assigned the same label for both end &amp; exception handler!

---- On Thu, 11 Nov 2010 07:20:07 +0530 Yao Qi &lt;[email protected]&gt; wrote ---- 

On Mon, Nov 8, 2010 at 9:18 PM, Rajaraman Santhanam &lt;[email protected]&gt; wrote: 
&gt; Hi, 
&gt; Getting Stack size too large error on inserting some code. 
&gt; 
&gt; java.lang.VerifyError: (class: org/apache/catalina/servlets/DefaultServlet, 
&gt; method: doGet signature: 
&gt; (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) 
&gt; Stack size too large 
&gt; 
&gt; My class writer is invoked as below: 
&gt; 
&gt; ClassWriter writer = new ClassWriter(reader, ClassWriter.COMPUTE_MAXS | 
&gt; ClassWriter.COMPUTE_FRAMES); 
&gt; 
&gt; I'm getting the error: 
&gt; 
&gt; java.lang.NullPointerException 
&gt;         at org.objectweb.asm.MethodWriter.visitMaxs(Unknown Source) 
&gt;         at 
&gt; com.manageengine.dpm.agent.instrumentation.BasicMethodAdapter.visitMaxs(BasicMethodAdapter.java:88) 
&gt;         at org.objectweb.asm.ClassReader.accept(Unknown Source) 
&gt;         at org.objectweb.asm.ClassReader.accept(Unknown Source) 
&gt;         at 
&gt; com.manageengine.dpm.agent.instrumentation.ClassTransformer.transform(ClassTransformer.java:93) 
&gt; 
 
Looks like you get two errors, NPE and too-large-stack. Which one 
happens earlier? 
I suggest that we can solve two errors one by one. 
 
&gt; BasicMethodAdapter is the class that extends AdviceAdapter. My 
&gt; implementation is something similar to the FinallyAdapter as mentioned 
&gt; in "Using ASM framework to implement common bytecode transformation 
&gt; patterns" 
&gt; Any pointer where the issue could be?? 
 
It is hard for us to figure out what is your problem unless you can show us what 
exactly you did. 
 
-- 
Yao Qi &lt;qiyaoltc AT gmail DOT com&gt; 
http://sites.google.com/site/duewayqi/
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.