Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Christophe
Posts: 39
Registered: ‎07-21-2008
My Device: Many
My Carrier: Many

verification error XXXX at offset yyyyy VS reboot loop.

[ Edited ]

Hi,

I got a MIDlet based application using some RIM API (keyboard detection, catch menu key, ...). The Application was working fine until recently when we did add some news screens.

When running the application on the simulator, we received a "verification error".

After various test, I found out that moving my "lngConst" static class from the Mylib.jar to MyProject did solve (temporally) the problem. (the only real diffence was the "import lib.LngConst" removed from a few files. I did notice that this small difference provokes a different separation of the sub-cod : 2 bigger sub-cod (not working) VS 3 smaller ones (working) )

But when adding new code, the simulator refuses to load the application (freez on "linking java" ) on the first run. On the second, the application execute fine. BUT if I deploy the application on a device, the device gets stuck in a reboot loop!

 

 

by changing some stuff in my code (remove debug code, move class from one packet to an other, adding/removing/changing obfuscation) I can "switch" between the two device's behaviours : Verification error VS reboot loop after deploy. But it is always one or the other.  :-C

 

The only solution I found was to reduce the cod size to his old size (it's working up to ~166K, bigger .cod do not work). Obviously, this is NOT a solution, since I cannot add the new features to the application... (with new features : ~210k)

 

I spend the last few days making blind test in the hope of understanding what is posing problems... ANY help will be VERY appreciated.

Thanks in advance,

 

 


Extra Info:
netBeans 6.1
JDE 4.2.1 / Sim model 8800 (try also with 8100)
device: BB 8800 Platform 2.3.0.54, App: 4.2.1.68
JDK 1.6.0_05
Verification error number was usually 1426, sometimes 2850, 1810, 2674. In the module without number (AppName.cod not appName-x.cod)
The project import 3 different lib.jar
The project work fine on Nokia & Sony Ericsson devices.

I compile the jar (with the lib inside) with NetBeans, then make a cod with rapc.
I do not use API which required a signed application (desactived by a define during development)
I tried with JDE 4.3   : same result.
I tried with a BB 8100 : same result.
I tried to deploy OTA or with javaloader / ALX : same result.

My Midlet is public and not obfuscated.

PS: I call "sub-cod" the .codS which are inside the "zip" .cod.

Message Edited by Christophe on 07-21-2008 04:09 PM
Please use plain text.
Developer
Christophe
Posts: 39
Registered: ‎07-21-2008
My Device: Many
My Carrier: Many

Re: verification error XXXX at offset yyyyy VS reboot loop.

well,

 

the only way I found is to create a JDE WS with one (library)project by imported jar and one normal (mildet) project for the rest of the code. Then use the JDE EDI to compile the codS (how practical...).

 

see http://www.blackberry.net/developers/javaknowledge/bbJDE/kpa0203143909.shtml

 

Note that in fct of the realtive path of the .jdp and the .jdw, the image path in the compiled .cod may be empty or not (and so, you may need to adapt the Image.createImage() ).

 

I m very interested in any other solution (I got a lot of project configuration and I don't feel like creating 20 JDE project files)

 

 Christophe

Please use plain text.
Developer
Christophe
Posts: 39
Registered: ‎07-21-2008
My Device: Many
My Carrier: Many

Re: verification error XXXX at offset yyyyy VS reboot loop.

small correction:

 

Note that in fct of the realtive path of the .jdp and the .jdw .rapc, the image path in the compiled .cod may be empty or not (and so, you may need to adapt the Image.createImage() ).

Please use plain text.
Developer
Christophe
Posts: 39
Registered: ‎07-21-2008
My Device: Many
My Carrier: Many

Re: verification error XXXX at offset yyyyy VS reboot loop.

well.... I am still fighting with the rapc compiler to try to convert my working jar in a valid cod.

 

I know this issue was encounter by many peoples (I found some article, blog and comment about this), but the only proposed solution was "random modifications of your code until its working again". I also try to light some incense and made a small pray, but this did not prove efficient either... :-(

 

any idea about the cause of this issue ?

 

 

PS: With the last version of my sources, sometimes, the cod is valide and I can load it in the simulator without error.

Please use plain text.
Administrator
MSohm
Posts: 14,310
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: verification error XXXX at offset yyyyy VS reboot loop.

Please see the following developers knowledge base article.

 

Support - MIDlet has verification error at offset
Article Number: DB-00073

http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800708/800647/Support...

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.
Developer
Christophe
Posts: 39
Registered: ‎07-21-2008
My Device: Many
My Carrier: Many

Re: verification error XXXX at offset yyyyy VS reboot loop.

@MSohm:
 

Christophe wrote:

Hi,

...

The Application was working fine until recently when we did add some news screens.
...
 

The only solution I found was to reduce the cod size to his old size

...

 

My Midlet is public and not obfuscated.


 

I could add that I do not sign the .cod (cause I do not use secure API during dev.)

 

 

The "variable"/factor which provoc the problem is not a "public MIDlet"/Obfuscation issue.

 

Please use plain text.
New Developer
mauroant
Posts: 2
Registered: ‎12-03-2008
My Device: Not Specified

Re: verification error XXXX at offset yyyyy VS reboot loop.

Hi all, I have a problem similar to the Christophe's.

I have a midled developed in Netbeans (without use of rim api) this midlet has a number of embedden images (.png) their total size is 160Kb, and the size of each image do not exceed 20Kb. The code size is about 200kb. I need to run this midled in an 8800 device, so i'm using JDE 4.2.1.

I'have tried to compile the jar file into cod using the command line tools (preverify and rapc), and I got an error like:

Error starting myApp: Module "myApp-2" has verification error 1426 at offset 019f

In both emulator and real device. I got the same error even using JDE to build the cod (following the relative knowledge base document).

The midlet run if I remove some part of code (any without preferences) or remove image files from the package, so it seem to be an error related to the cod packaging , not to the midlet code (that runs fine on a number of different hansets).

 

Any hint will be very appreciated!

Thanks

Mauro

 

Please use plain text.
Developer
Christophe
Posts: 39
Registered: ‎07-21-2008
My Device: Many
My Carrier: Many

Re: verification error XXXX at offset yyyyy VS reboot loop.

Hi,

 

At the end, I used a batch to compile the project to a .cod.

 

0. create by hand a .rapc for each config (basicaly a copy of the .jad file)

 

1. compile with netbeans

2. compile the "preprocessed" files from netbeans with a batch which call the rapc.exe (create a dyn file list, copy eventual lib .java files)

 

don't forget to import your lib .cod converted from .jar and the net_rim_api.jar

 

/!\ the .rapc file MUST be in the root folder of your source files ( "preprocessed" folder) if not, the image path will be wrong.

 

I spend a few day to get a working batch with all my config and I had to manage pretty much name issues. But it is possible.

 

I'am very busy, but wishing to help you if you get blocked. just post here.

 

good luck !

 

PS: for info, my batches are 14k with comments.

 

 

 

Please use plain text.
New Developer
mauroant
Posts: 2
Registered: ‎12-03-2008
My Device: Not Specified

Re: verification error XXXX at offset yyyyy VS reboot loop.

Thank you, I have follow your suggestions and solved my problem.

I have recompiled all my sources (libraryes included) with RAPC, to do this I have used this useful set of ant tasks: http://bb-ant-tools.sourceforge.net/

 

Regards

Please use plain text.
Developer
Christophe
Posts: 39
Registered: ‎07-21-2008
My Device: Many
My Carrier: Many

Re: verification error XXXX at offset yyyyy VS reboot loop.

oh yes, I forgot about this bb-ant-tools.

I don't remeber why, but I encounter some limitations with this tools. (which is why I made my batch system).

 

glad I could help you.

Please use plain text.