You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by bu...@apache.org on 2005/01/25 13:13:44 UTC

DO NOT REPLY [Bug 33235] New: - "Illegal Opcode Detected" exception thrown in "new MethodGen( m, classname, cpgen );"

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33235>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33235

           Summary: "Illegal Opcode Detected" exception thrown in "new
                    MethodGen( m, classname, cpgen );"
           Product: BCEL
           Version: 5.1
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Main
        AssignedTo: bcel-dev@jakarta.apache.org
        ReportedBy: gerald.oltmanns@siemens.com


REPRODUCIBLE ERROR:
"Illegal Opcode Detected" exception is thrown in "new MethodGen( m, classname, 
cpgen );" when methods are read using a further (String) constant when a bunch 
of other fields was previously declared. 

Example:
The following code 

   Method[] methods = JavaClass.getMethods();
   for(int j=0;  j < methods.length;  j++) {
      try {
         mg = new MethodGen(methods[j], _ClassName, _CPGen);
      }
      catch(Exception ex) {
         ...
      }
   }

throws exception "Illegal Opcode Detected" in method 'test' 
when the class file representing the following code is parsed:

class IllOpcode {
   private String a0 = "a";
   private String a1 = "a";
   ... please insert all other 246 declarations 'a2="a";' to 'a247="a";' ...
   private String a248 = "a";

   private int    i249 = 1;
   private int    i250 = 1;
   private int    i251 = 1;    // This one blasts! --> "Illegal Opcode Detected"


   private void test() {
      String     l252 = "aa";
   }
} //class

If e.g. field "i251" is commented out 
no exception is thrown and the code works fine.

I'm using jdk1.4.2 with my jbuilder SE 7.0.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org