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
Highlighted
Developer
Posts: 44
Registered: ‎02-21-2010
My Device: Z10
My Carrier: AT&T
Accepted Solution

jvm 104 only on 81xx simulator

I'm writing an app using the eclipse (3.4.1) , Blackberry JDE Component 4.5.0.16 and  JDE plugin 1.0.0.67. I've successfully run my app on 83xx and 87xx and 88xx simulators (plus on a physical 8310), but I get a JVM 104 Uncaught: IllegalArgumentException when trying to run my app on the 81xx simulators.

 

I've traced through my code with the debugger and everything is fine until  running theApp.enterEventDispatcher();

 

A BorderBitmap.paint(Graphics, XYRext) line: 143 tab is displayed in eclipse with a "Source not found" message.

 

I don't even have a BorderBitmap.paint call in my code, so I assume that the problem is somewhere in the RIM code itself.

 

Are there any 81xx specific restrictions that I need to be aware of in order to avoid this problem?

 

 

Thanks,


 

 

Developer
Posts: 466
Registered: ‎03-04-2009
My Device: 8520
My Carrier: some

Re: jvm 104 only on 81xx simulator

It is likely that the problem is in a code responsible for your screen layout operation.

Surrond with try-catch you layout code (where you arrange your fields) and try to catch the exception.

 

Hopes it will help.

Got resolved! Press kudo icon!
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: jvm 104 only on 81xx simulator

What OS level is running on this simulator?

 

If it is 4.2 or 4.3, that would explain the issue.

 

Developer
Posts: 44
Registered: ‎02-21-2010
My Device: Z10
My Carrier: AT&T

Re: jvm 104 only on 81xx simulator

I get the failure both on 8130 v4.5.0.44 and 8100 v4.5.0.110

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: jvm 104 only on 81xx simulator

Are you using any type of Border classes? (Border or BorderFactory)?

 

Developer
Posts: 44
Registered: ‎02-21-2010
My Device: Z10
My Carrier: AT&T

Re: jvm 104 only on 81xx simulator

I've surrounded all add and fieldmanager calls with try and catch sections, but I am still getting the unhandled exception error

Developer
Posts: 44
Registered: ‎02-21-2010
My Device: Z10
My Carrier: AT&T

Re: jvm 104 only on 81xx simulator

I do not.  I think that's only supported from 4.6 onward, right?  I'm using 4.5.

 

 

Developer
Posts: 44
Registered: ‎02-21-2010
My Device: Z10
My Carrier: AT&T

Re: jvm 104 only on 81xx simulator

I isolated  the problem by commenting out several lines until the app ran cleanly.   I was creating a HorizontalManager and adding several buttons to it :

 

 HorizontalFieldManager buttonManager=new HorizontalFieldManager(Field.FIELD_HCENTER);
                
      buttonManager.add(previousMonth);
      buttonManager.add(previousDay);
      buttonManager.add(previousHour);
      buttonManager.add(today);
      buttonManager.add(nextHour);
      buttonManager.add(nextDay);
      /*
      buttonManager.add(nextMonth);
      */

 

If I try and add one more button to the manager, I get the unhandled exception.  I suppose this makes sense since the 81xx blackberries have narrower displays than most.   But shouldn't situations like this be handled more cleanly than throwing an exception?

Developer
Posts: 562
Registered: ‎09-30-2009
My Device: Not Specified

Re: jvm 104 only on 81xx simulator

[ Edited ]

The documentation says Manager.add throws:

"IllegalArgumentException - If the field is being added to itself."

 

Have you verified whether the nextMonth reference is valid or not, or whether any other errors could occur that could yield that result (or perhaps this is an OS bug)?

Developer
Posts: 44
Registered: ‎02-21-2010
My Device: Z10
My Carrier: AT&T

Re: jvm 104 only on 81xx simulator

Yes....the problem appears to be based on the number of buttons added (or maybe the total amount of space they take up on the screen).   I can uncomment the nextMonth button and comment out another button and the app still works.