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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
New Developer
cstarling
Posts: 7
Registered: ‎08-04-2008

Error starting xxx: Class 'xxx.xxx' ref member out of range

Hello!

 

I have a BlackBerry 8800 with firmware 4.2.1.68 (Platform 2.3.0.54) Prosumer from Vodafone.

 

I'm developing midlet-apllications with JDE 4.3.0. Most working fine, but one application throws the following error on start (creating without errors):
Error starting xxx: Class 'xxx.xxx' ref member out of range

 

The error occure on the device and on the simulator.
The same midlet created with the WTK from Sun working fine on Siemens- and Nokia-cellphones.

 

Any suggestions?

 

cstarling

 

ps: Maybe the main-file (code and/or data) is too big, but it would be a lot of work to put it in a few files only on spec.

Please use plain text.
Developer
Posts: 62
Registered: ‎07-14-2008

Re: Error starting xxx: Class 'xxx.xxx' ref member out of range

you should use JDE 4.2.1 if you also want to support 4.2.1 OS devices
Please use plain text.
Developer
simon_hain
Posts: 13,800
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: Error starting xxx: Class 'xxx.xxx' ref member out of range

you have too many variables in a single class
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
New Developer
cstarling
Posts: 7
Registered: ‎08-04-2008

Re: Error starting xxx: Class 'xxx.xxx' ref member out of range

@Ivanov

I tried JDE 4.2. and still got the error.

 

@all

Can somebody tell me something about the limitations of variables in a class?

 

Can I see the amount of the variables of a class at the build process?

Where is the limit?

Does variables of function also counts?

 

Please use plain text.
Administrator
MSohm
Posts: 12,957
Registered: ‎07-09-2008
My Carrier: Bell

Re: Error starting xxx: Class 'xxx.xxx' ref member out of range

Please refer to this thread:

 

http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=966#M966

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Please use plain text.
New Developer
kevindarling
Posts: 19
Registered: ‎11-26-2008

Re: Error starting xxx: Class 'xxx.xxx' ref member out of range

Sorry to resurrect this question, but does anyone know a way around this error, besides cutting back on variables in a class?

 

What's odd, is that a program that runs on a 8703, fails with this error on a later model 8803.

 

Did the JVM lose the ability to handle as many variables?

Please use plain text.
Developer
raksat
Posts: 40
Registered: ‎08-21-2008

Re: Error starting xxx: Class 'xxx.xxx' ref member out of range

According to Simon_hain : you have too many variables in a single class.

----

Simon_hain is right.

 

Though you can tryout this: For exampl(this is only a example)-

If you have this--->

private String str1 = null;

private String str2 = null;

private String str3 = null;

.....

.....

int var1;

int var2;

 

you can try this-->

private String str1 = null, str2 = null, str3 = null;

private String ......;

int var1,var2;

 

In short! avoid multiline declarations.

 

 

Raks
Please use plain text.
New Developer
shubhra
Posts: 39
Registered: ‎10-13-2009

Re: Error starting xxx: Class 'xxx.xxx' ref member out of range

I'm facing the same issue for a certain class but only on simulator 9530-Verizon (4.7.0.75).

 

On following simulators things are working fine:

  • 8130
  • Bold - 9000 (4.6.0.150)
  • Bold 2 - 9700 (5.0.0.228)
  • Storm 2 - 9550 (5.0.0.334)
  • Tour device - 9630 (4.7.1.40)

 

I'm compiling my code in JDE 4.3.

 

Why am I getting this Runtime Exception only on 4.7.0? On all other devices things are working fine. Does the JVM behavior change with OS? Is their any workaround for it?

 

Actually I have already reduced around 20 variables but still 9530 is giving me runtime exception.

Please use plain text.
Developer
nikhil_shravane2004
Posts: 109
Registered: ‎03-13-2010
My Carrier: -

Re: Error starting xxx: Class 'xxx.xxx' ref member out of range

Hi,

 

I am also facing the same problem after installing the application on 8530, but not on the 8530 emulator.

 

I thought instead of starting new thread, I should ask the question in the same thread just to avoid the redundancy of the same topic.

 

After reading some threads, I think I have to reduce the number of my variables. But, how can I do that? I mean all variable are introduced as they are required. Is there any way to reduce the number of variables.

 

For example: I have used 13 to 15 Spacers of the same height and width, on different forms in my application. Here, I can use only one object of spacer instead of 15. Does reducing variable means like this?

 

But in this case it will throw illegalStateException as the object is owned by different form.

 

So please guide me. Regards.

Please use plain text.
Visitor
jakkyl
Posts: 1
Registered: ‎05-04-2010
My Carrier: verizon

Re: Error starting xxx: Class 'xxx.xxx' ref member out of range

I'm also having this problem.

 

Well, not me, but some of my users.

 

I get no errors from the simulator or when running on my phone, but two of my users are getting this error on their Storm 1's.  Funny thing is, I own a Storm 1 and use it for testing and don't get any errors.

 

The error is the same, but has Class 'xxx.<private>' ref member out of range

Please use plain text.