02-21-2010 02:33 PM
I'm writing an app using the eclipse (3.4.1) , Blackberry JDE Component 126.96.36.199 and JDE plugin 188.8.131.52. 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?
Solved! Go to Solution.
02-21-2010 02:39 PM
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.
02-21-2010 09:15 PM
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);
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?
02-21-2010 09:31 PM - edited 02-21-2010 09:32 PM
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)?
02-21-2010 09:40 PM
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.