Nail down blackberry verification error 2214 at / JVM Error 104
Sometimes on “old” BlackBerry devices strange errors occur without any particular reason. One of those feared errors is “verification error 2214 at / JVM Error 104″ which can be translated to “You have valid java code, but you use interfaces/abstracts/statics/synchronized/super/this/protected/foo in a combination i dont like. Screw you!”.
The JDE wont give any helpful information out of the box. It will just print something like:
VM:-DA 0
Starting rim_BBE_7130_de_DE
VM:LINK rim_BBE_7130_de_DE
Module 'rim_BBE_7130_de_DE-1' has verification error 2214 at offset 7ba9
Linker error: 'VerifyError' for rim_BBE_7130_de_DE
CMM: set CRC
NVS: write 2(152)
Error starting rim_BBE_7130_de_DE: Module 'rim_BBE_7130_de_DE-1' has verification error 2214 at offset 7ba9
But there is hope. You can at least find the offending method which caused the error:
1. Detach the JDE debugger
2. Run your application
3. The emulator shows "JVM Error 104 / Uncaught: RuntimeException"
4. Select last entry in the dropdown box "Print GC info"
5. Save "failure.zip"
6. Open the devicename.log in the zipfile
7. Search for "VM:VECPs=", "VM:VECCs=" and "VM:VECMm="
8. Modify your code and retry
9. Profit!
Example:
VM:VECPs=com.your.stylish.package.name.here
VM:VECCs=ThisIsTheFailingClass
VM:VECMm=fancyMethodWhichFails()
Good luck!
