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
Posts: 105
Registered: ‎07-24-2008
My Device: Not Specified

Code size limit in eclipse full plugin

Hi,

         Is there is any code size limit on button handlers in eclipse ?I am using BlackBerry_JDE_PluginFull_1.0.0.67.

 

I am writing some code in fieldChanged method and it throws verification error. Even if i write simple println statements, then also i get this error.

 

If i remove the code, ot works fine. The code is simple println statements Smiley Wink

 

Any pointers ?

 

Regards,

Abhijit Chandekar

Developer
Posts: 105
Registered: ‎07-24-2008
My Device: Not Specified

Re: Code size limit in eclipse full plugin

I am getting this error very frequently. If i write some code in the file i get this error.If i delete this code i am good again.

 

Simple int, string declarations are causing issues.

 

I bet this is causing the cod file to corrupt. But why does this happen at all ?How to fix this permanantly.

Developer
Posts: 105
Registered: ‎07-24-2008
My Device: Not Specified

Re: Code size limit in eclipse full plugin

I remember that MDS studio had similar issues earlier. I was working on a MDS app and we faced this issue.In the next release of MDS studio this issue was fixed.

 

Is this a known issue with this eclipse plugin also ?

Developer
Posts: 94
Registered: ‎10-01-2009
My Device: Not Specified

Re: Code size limit in eclipse full plugin

It's probably not a code size issue.  Take a look at this thread, particularly the reply from tbilisoft.

Developer
Posts: 105
Registered: ‎07-24-2008
My Device: Not Specified

Re: Code size limit in eclipse full plugin

But why is this behaviour inconsistent. Sometimes it shows this error and sometimes it works fine.

Also i think System.out.println is allowed in any version of JDE and RIM API.

 

what could be the reason behind this ? please see below link for verification errors section

 

http://www.j2mepolish.org/cms/leftsection/documentation/platforms/blackberry.html

Developer
Posts: 94
Registered: ‎10-01-2009
My Device: Not Specified

Re: Code size limit in eclipse full plugin

Here is a quote from the document you linked:

There are numerous reasons for this behaviour:

  • The signing went wrong. Please check the signing of the application.
  • A derived or subclass of another class tries to access a static variable directly. Create a get() method for this variable to access it.
  • Remove unused imports
  • Remove System.out.println() calls
  • Make sure every method has a valid qualifier like private/public/protected

No, I don't know why.  But if you're going to throw a book at me, the least you could do is read it.

 

In my experience, almost every time I've gotten inconsistent behavior, or I thought I found a compiler bug or exceeded some tool's limit, it has turned out to be something I was doing wrong.  Almost.  It is always possible that you really do have a legitimate complaint.

 

We can't really help you diagnose your problem because you haven't given us any real information about it.   I figure you're just throwing out a frustrated guess and hoping somebody will recognize it.  Try reducing the code to a very simple failing test case and posting it here.

 

Do you have some reason for believing it's a code size problem?  Try assuming it's not and looking sincerely for some other problem.  You might find one.  Sure it's frustrating.  Been there done that.  Allow yourself a d'oh! moment and move on.

 

Or maybe you'll get lucky and somebody who knows the BB API better than I do will come in and make me look very, very silly.

Highlighted
New Developer
Posts: 7
Registered: ‎02-27-2009
My Device: Bold

Re: Code size limit in eclipse full plugin

Hi ,

 

Some nostalgia for u . MDS Runtime code size issue:Smiley Sad. Any ways pls check that the eclipse plugin setting

 

are u deploying the code to platform version you developed for , check for os version in BB workspace setting and on the simulator

Developer
Posts: 105
Registered: ‎07-24-2008
My Device: Not Specified

Re: Code size limit in eclipse full plugin

Thanks for the pointers.

 

MDS studio had this code size issue whcih makes me think that this tool also has this issus.. May be this tool does not have it, but if this is the case of incorrectly preverification done,then is it a known issue with RIM.

 

It could be incompatible JDK /eclipse/ plugin issue.

 

It could be a code issue, but i can not believe this, as why the verification error  does not appear and , just adding a println statement gets this error.

 

It could be a design issue with the application, but how come verification has to do anything with the design of the app.

 

As the book that throws some pointers (which you have pointed above), is a collection of experience from many wonderful programmers, i am left with nop option but to keep trying to try them.

 

Hope me or someone like you comeup with a better resolution.

 

Regards,

Abhijit Chandekar