[jboss-user] [Javassist user questions] - Inconsistent or missing stackmap error in midlet class files

shivurx do-not-reply at jboss.com
Tue May 5 22:37:45 EDT 2009


Hi I am using Javassist to modify a MIDlet class. I was successfully able to change the midlet class file.

The changes i did are as follows
1. copied the startApp() method body to a new method and set new body for startApp().
2. add 2 additional methods.
3. I then called methods.getMethodInfo().rebuildStackMap(classPool) on all the methods of the midlet class
4. called rebuildClassFile()
5. called writeFile() to finally write the class file out to the disk.

I could view the changes in Bytecode viewer. 

But when i try to run the application with WTK emulator it gives me an error as follows:

Error verifying method com/test/TestApp commandAction(Ljavax/microedition/lcdui/Command;Ljavax/microedition/lcdui/Displayable;)V
Approximate bytecode offset 9: Inconsistent or missing stackmap at target
Method............: 10233084 'com/sun/midp/midlet/MIDletState.createMIDlet (static)' 

I have not made any changes to commandAction() method.

I am not sure what is wrong, I would really appreciate if someone could shed some light on this.

Thanks



View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4228810#4228810

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4228810



More information about the jboss-user mailing list