Skip to main content

LG CG225 , OutofMemory Error while Installing

3 replies [Last post]
Anonymous

Hi

I'm trying to install a game with around 40 classes distibuted in 5
packages.The highest class file size is 23Kb.I'm also using KXML for
parsing xml related data.So, that adds arounds 15-20 more class files in
my jar.
The total jar size is 173KB with 80Kb of resources and rest taken by the
class files.

Whenever i try to install it , i get OutofMemory error when the device
compiles.

Couple of iterations that i have tried are:
1.Removed all the resources from the jar, but the device was still unable
to install and gave same error.

2. Removed many class files and brought down the jar size to 97KB , it got
installed, but since i have removed so many class files, hence was unable
to execute it.In this iteration, i have also removed the classes that were
taking a lot of space.e.g: those class files which took more 10Kb.

Please,help me solve this error.!

===========================================================================
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.
Fly Home

The problem may not be the number of classes it could also be
the fact that the LG compiler does not like the way you have written your code and tries to compile it
and gets in an infinite loop hence the outofmemory error.
The LG compiler optimizes the code to run on the phone and we have had a jar under 200k jump to over 300k after it has compiled.

If the app compiles on another LG phone with more memory that goes through this process (ie kg800 etc) then it is probably more likely to be the number of classes (or similar memory issue) but if it doesn't then you may have to do a fair bit of hacking to find out what in your code it doesn't like.

----- Original Message ----
From: Stefan Haustein
To: KVM-INTEREST@JAVA.SUN.COM
Sent: Tuesday, 8 May, 2007 10:06:43 PM
Subject: Re: LG CG225 , OutofMemory Error while Installing

Hi,

you can probably leave out several kXML classes that are not needed,
depending on your application. Are you already using an obfuscator, e.g.
proguard? It will omit unneeded classes for you. Also, instead of using
the XmlPull factory, you can create a parser/writer instance directly.

Best regards,
Stefan Haustein

SUBSCRIBE KVM-INTEREST Anonymous wrote:
> Hi
>
> I'm trying to install a game with around 40 classes distibuted in 5
> packages.The highest class file size is 23Kb.I'm also using KXML for
> parsing xml related data.So, that adds arounds 15-20 more class files in
> my jar.
> The total jar size is 173KB with 80Kb of resources and rest taken by the
> class files.
>
> Whenever i try to install it , i get OutofMemory error when the device
> compiles.
>
> Couple of iterations that i have tried are:
> 1.Removed all the resources from the jar, but the device was still unable
> to install and gave same error.
>
> 2. Removed many class files and brought down the jar size to 97KB , it got
> installed, but since i have removed so many class files, hence was unable
> to execute it.In this iteration, i have also removed the classes that were
> taking a lot of space.e.g: those class files which took more 10Kb.
>
>
> Please,help me solve this error.!
>
> ===========================================================================
> 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".

Send instant messages to your online friends http://au.messenger.yahoo.com

===========================================================================
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".
[att1.html]

Stefan Haustein

Hi,

you can probably leave out several kXML classes that are not needed,
depending on your application. Are you already using an obfuscator, e.g.
proguard? It will omit unneeded classes for you. Also, instead of using
the XmlPull factory, you can create a parser/writer instance directly.

Best regards,
Stefan Haustein

SUBSCRIBE KVM-INTEREST Anonymous wrote:
> Hi
>
> I'm trying to install a game with around 40 classes distibuted in 5
> packages.The highest class file size is 23Kb.I'm also using KXML for
> parsing xml related data.So, that adds arounds 15-20 more class files in
> my jar.
> The total jar size is 173KB with 80Kb of resources and rest taken by the
> class files.
>
> Whenever i try to install it , i get OutofMemory error when the device
> compiles.
>
> Couple of iterations that i have tried are:
> 1.Removed all the resources from the jar, but the device was still unable
> to install and gave same error.
>
> 2. Removed many class files and brought down the jar size to 97KB , it got
> installed, but since i have removed so many class files, hence was unable
> to execute it.In this iteration, i have also removed the classes that were
> taking a lot of space.e.g: those class files which took more 10Kb.
>
>
> Please,help me solve this error.!
>
> ===========================================================================
> 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".

Fly Home

The best you can do is use trail and error to find out what in the code the lg compiler doesn't like.
We've had to do this some times and you either don't bother with these handsets or spend days finding out
which if statements, expressions etc it can't handle.

if someone knows a quicker way to find the problem i would also be interested.

----- Original Message ----
From: SUBSCRIBE KVM-INTEREST Anonymous
To: KVM-INTEREST@JAVA.SUN.COM
Sent: Tuesday, 8 May, 2007 1:30:42 AM
Subject: LG CG225 , OutofMemory Error while Installing

Hi

I'm trying to install a game with around 40 classes distibuted in 5
packages.The highest class file size is 23Kb.I'm also using KXML for
parsing xml related data.So, that adds arounds 15-20 more class files in
my jar.
The total jar size is 173KB with 80Kb of resources and rest taken by the
class files.

Whenever i try to install it , i get OutofMemory error when the device
compiles.

Couple of iterations that i have tried are:
1.Removed all the resources from the jar, but the device was still unable
to install and gave same error.

2. Removed many class files and brought down the jar size to 97KB , it got
installed, but since i have removed so many class files, hence was unable
to execute it.In this iteration, i have also removed the classes that were
taking a lot of space.e.g: those class files which took more 10Kb.

Please,help me solve this error.!

===========================================================================
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".

Send instant messages to your online friends http://au.messenger.yahoo.com

===========================================================================
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".
[att1.html]