Saturday, 30 January 2010

OutOfMemoryError Exception caught in Display

Been developing with J2ME recently, fun as it is. Something changed in the code, ok so I changed something in the code and this error happened:

TRACE: , Exception caught in Display class
java.lang.OutOfMemoryError
   (stack trace incomplete)


...upon deploying to the emulator.

Turns out when I added the Motorola SDK to my configurations I had modified my canvas class overiding showNofity method:
/* How it was */    
protected void showNotify() {
 super.showNotify();
// My shizzles of code
}

However the Moto SDK declared this an error in someway and in my haste to go play hockey (game was cancelled btw :( ) I change the method to be this


protected void showNotify() {
 showNotify();
// My shizzles of code 
}

And this loop ( atleast I think it was a recursive loop) was causing the issue. I guess it was recursive calling... Bah!

No comments:

Post a Comment