Closed kieran- closed 11 years ago
Can you post the complete disassembly of the class? That error shouldn't be possible if all you did was change the constant in an ldc_w instruction.
Also post the original class files if you can.
Sure but it's about 75k lines let me pastebin it.
Here's the uppit link, pastebin freezes when I try to post it
Can you post the original classfile too please?
just need to change the extension
That is weird. I'll see if I can figure out what the problem is.
Thanks, please do get back to me, I've been looking for a working assembler/disassembler for a long time
Ok, I figured out what the problem is. The disassembler doesn't bother trying to disassemble LocalVariableTable attributes (or LineNumberTable or LocalVariableTypeTable), instead leaving them as binary blobs. I assumed that this would be ok as long as the method isn't altered, but I forgot that the local variable tables have constant pool references and the order of constant pool entries isn't preserved by reassembly. I'm not sure what the best option here is.
Do you think I should just have it remove the attributes entirely for now?
I don't know, from here anything is a step in the right direction? But if things are removed then it might not function correctly, that's the only problem
It should be working now.
Anyway, the removed information is only used for debugging. So it won't affect execution at all, unless the code does something weird like inspect it's own stack traces.
I literally changed one value from "www." to "wwwh7.", re-assembled it with no errors, tried to run it in my program and I get this error.
http://oi43.tinypic.com/sbmw5g.jpg