Skip to main content

LG CG225 :RMS problem

6 replies [Last post]
Anonymous

Hi

I'm trying to save in 3-5 record stores in LG CG225 ,data of size around
6KB.
But some times the device only stores in 2 record stores and gives
RecordStoreFull Exception while writing the 3rd one which is supposed to
be empty by then.

Please help!

Thanks

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Dan Ackroyd

Christophe Planty wrote:

>Have you tested to set field MIDlet-Data-Size in jad,

As an aside - do any phone object if you use more than this amount of data
store? i.e. do the phones treat it as a promise from you that you won't use
more than this data size, or is it just a request for the minimum storage
the application needs to run?

cheers
Dan
Ack

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Christophe Planty

Hi,

Some thought:

Have you tested to set field MIDlet-Data-Size in jad, to ensure RMS space is reserved for your MIDlet ( don't set it too high or handset will refuse install MIDlet)

Also to ensure the issue is not on your implementation and may be a specific behaviour related to the LG CG225, double check with other devices or simulator.

/Chris

-----Message d'origine-----
De : A mailing list for KVM discussion [mailto:KVM-INTEREST@JAVA.SUN.COM] De la part de SUBSCRIBE KVM-INTEREST Anonymous
Envoyé : jeudi 4 janvier 2007 16:22
À : KVM-INTEREST@JAVA.SUN.COM
Objet : Re: LG CG225 :RMS problem

Hi

after working on the issue for one more day here are the statistics:

Case 1: My application

I get the data from net,make new recordStore and store it in
it.Hence,every RecordStore has just one record.And after storing it is
closed immediately.

When i tried to trace it ,here are the figures that were returned to me:
1.Before storing ; size Available: 155KB
2.Record Size: 6KB
3.Size after storing: 149KB

4.Open new record;size Available: 96KB
5.Record Size: 6KB
6.Size after storing: 90KB

Hence and loss of 60KB is observed.
and so, when i try to store the 3rd set, i get RecordStoreFull Exception
when openRecordStore is called.

Case 2: My TEST Application
1.Before storing ; size Available: 155KB
2.Record Size: 6KB
3.Size after storing: 149KB

4.Before storing ; size Available: 149KB -100bytes
5.Record Size: 6KB
6.Size after storing: 149KB - 6KB - 100 bytes

Hence, only 100Bytes variance is observed.

So, where can the difference lie and why such a big loss of space in my
application as compared to my TEST application.

Please help!

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Robin Chaddock

Some handsets do have hardcoded limits on the number of record stores
allowed per midlet/midlet suite.

The NEC616 for example will not allow you to have more than 2 record stores.
I wouldn't be suprised if the crappy LG handset you're working on has a
similar limitation.

----- Original Message -----
From: "Christophe Planty"
To:
Sent: Thursday, January 04, 2007 8:27 PM
Subject: Re: LG CG225 :RMS problem

Hi,

Some thought:

Have you tested to set field MIDlet-Data-Size in jad, to ensure RMS space is
reserved for your MIDlet ( don't set it too high or handset will refuse
install MIDlet)

Also to ensure the issue is not on your implementation and may be a specific
behaviour related to the LG CG225, double check with other devices or
simulator.

/Chris

-----Message d'origine-----
De : A mailing list for KVM discussion [mailto:KVM-INTEREST@JAVA.SUN.COM] De
la part de SUBSCRIBE KVM-INTEREST Anonymous
Envoyé : jeudi 4 janvier 2007 16:22
À : KVM-INTEREST@JAVA.SUN.COM
Objet : Re: LG CG225 :RMS problem

Hi

after working on the issue for one more day here are the statistics:

Case 1: My application

I get the data from net,make new recordStore and store it in
it.Hence,every RecordStore has just one record.And after storing it is
closed immediately.

When i tried to trace it ,here are the figures that were returned to me:
1.Before storing ; size Available: 155KB
2.Record Size: 6KB
3.Size after storing: 149KB

4.Open new record;size Available: 96KB
5.Record Size: 6KB
6.Size after storing: 90KB

Hence and loss of 60KB is observed.
and so, when i try to store the 3rd set, i get RecordStoreFull Exception
when openRecordStore is called.

Case 2: My TEST Application
1.Before storing ; size Available: 155KB
2.Record Size: 6KB
3.Size after storing: 149KB

4.Before storing ; size Available: 149KB -100bytes
5.Record Size: 6KB
6.Size after storing: 149KB - 6KB - 100 bytes

Hence, only 100Bytes variance is observed.

So, where can the difference lie and why such a big loss of space in my
application as compared to my TEST application.

Please help!

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

________________________________________________________________________
E-mail is an informal method of communication and may be subject to data corruption, interception and unauthorised amendment for which I-play, a trading name of Digital Bridges Ltd will accept no liability. Therefore, it will normally be inappropriate to rely on information contained on e-mail without obtaining written confirmation.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

(C) 2005. I-play is a trademark and trading name of Digital Bridges Limited. All Rights Reserved.
________________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

SUBSCRIBE KVM-INTEREST Anonymous

Hi

after working on the issue for one more day here are the statistics:

Case 1: My application

I get the data from net,make new recordStore and store it in
it.Hence,every RecordStore has just one record.And after storing it is
closed immediately.

When i tried to trace it ,here are the figures that were returned to me:
1.Before storing ; size Available: 155KB
2.Record Size: 6KB
3.Size after storing: 149KB

4.Open new record;size Available: 96KB
5.Record Size: 6KB
6.Size after storing: 90KB

Hence and loss of 60KB is observed.
and so, when i try to store the 3rd set, i get RecordStoreFull Exception
when openRecordStore is called.

Case 2: My TEST Application
1.Before storing ; size Available: 155KB
2.Record Size: 6KB
3.Size after storing: 149KB

4.Before storing ; size Available: 149KB -100bytes
5.Record Size: 6KB
6.Size after storing: 149KB - 6KB - 100 bytes

Hence, only 100Bytes variance is observed.

So, where can the difference lie and why such a big loss of space in my
application as compared to my TEST application.

Please help!

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

SUBSCRIBE KVM-INTEREST Anonymous

Thanks, for that great tip Joe.

I tried to trace it and found that RecordStoreFullException is thrown when
i try to open 3rd record store.

And its a fresh recordStore so,how can it contain data and that to max.
limit.

and when i see the application information it says 477Kb and around don't
know what its storing to reach to that level.

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Joe Bowbeer

I'm not sure of your particular problem, but since RecordStore is the
Achilles Heel of MIDP development, I am painfully familiar with many
of the possibilities.

Are you deleting and recreating the record store every time you modify
it? If not, I recommend you give that a try. (More tips: Use as few
records as possible, close the record store after every access, and
delete the record store at the first sign of trouble.)

Here's sample code.

void store(String name, byte[] data) throws RecordStoreException {
try { RecordStore.deleteRecordStore(name);
} catch (RecordStoreNotFoundException ex) { }
RecordStore rs = RecordStore.openRecordStore(name, true);
boolean done = false;
try {
rs.addRecord(data, 0, data.length);
done = true;
} finally {
rs.closeRecordStore();
if (!done)
RecordStore.deleteRecordStore(name);
}
}

On 1/2/07, SUBSCRIBE KVM-INTEREST Anonymous wrote:
> Hi
>
> I'm trying to save in 3-5 record stores in LG CG225 ,data of size around
> 6KB.
> But some times the device only stores in 2 record stores and gives
> RecordStoreFull Exception while writing the 3rd one which is supposed to
> be empty by then.
>
> Please help!
>
> Thanks
>

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".