AW: D500 memory problem on startup

Michael Flad <[email protected]> Tue, 29 Apr 2008 21:13:15 +0200
Newsgroups gmane.comp.java.sun.kvm
Message-ID <[email protected]>
Hi,

I had to fight that problem twice during the past few months.
Two steps that helped in my case were ... I deferred some
initial resource loading for one frame and I just split my
big fat game class (this was a port from some other plattform
so it wasn't at all designed with classes in mind) into
several smaller ones resulting in .class files of only
around 40kb - I started with an almost 200kb .class (obfuscated).

The interesting point is that I didn't even separate anything
but split it just into a inheritance chain like:

Original:
class Game : extends Canvas ...

Split:
class Game1 extends Canvas
class Game2 extends Game1
class Game3 extends Game2
class Game extends Game3

Kind of a pain due to all the scope problems but this was
the only way I managed to get it to work.

What's interesting is that I know other games with .class files
of ~135kb working perfectly on that device.

Best regards,
Michael 

> -----Ursprüngliche Nachricht-----
> Von: A mailing list for KVM discussion 
> [mailto:[email protected]] Im Auftrag von James Closs
> Gesendet: Dienstag, 29. April 2008 17:25
> An: [email protected]
> Betreff: Re: D500 memory problem on startup
> 
> Hello Kirwan,
> 
> I've just found your post below whilst searching the 
> KVM-Interest archives and wondered if you ever found a 
> solution - I'm having the same problem with an app I'm 
> developing. I'm sure this is nothing 'normal' to do with 
> resource loading/heap as the game is not loading anything at 
> all demanding and quits right away.
> 
> best regards
> 
> > Having previously had a working 73KB MIDlet on the Samsung 
> D500, the 
> > new version displays the message below on start up and then 
> returns to 
> > the downloads menu.
> >
> > "The application has unexpectedly quit because it ran out of memory"
> >
> > This started with a JAR of about 135KB, well below the 
> 300KB maximum.
> > Having removed all images and some classes I'm down to 
> 95KB. I've also 
> > removed all references to RecordStores but still the same message 
> > appears every time.
> >
> > Has anyone else had this problem and found a way to resolve it?
> 
> ====
> 
> James Closs, Director, bitBull Ltd
> 
> http://www.bitbull.com
> 
> 07771 991171
> 
> ====
> 
> ==============================================================
> =============
> To unsubscribe, send email to [email protected] and 
> include in the body of the message "signoff KVM-INTEREST".  
> For general help, send email to [email protected] and 
> include in the body of the message "help".
> 

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff KVM-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".