| Reply | « Previous Thread | Next Thread » |
|
I also have this identical problem. All the exception traps are there. Enough memory is there, but I still get "Unable To Run Application". Mine occur with PNG images usually around 150x150.
Is there a solution to this issue? |
|
Hi all.
Dunno if I can be much useful, but as far as I know the 7210 has a limit in the image size that can be loaded. The Nokia document "Nokia Wap Phone Characteristics v_1_6" says "MAX IMAGE SIZE: Restricted by max size in bytes" (table "WAP Screen Attributes" for the Nokia Series 40}. I guess the same goes for java applications. Note that the problem you are experiencing is noticeable even in the 7210 emulator. Big images (in terms of byte-size) can't be loaded. I'll try to find out how much is the "max size in bytes". Hope this helps regards davide <AtomicTag.com/> |
|
The problem is that if you have "enough memory" to have say a 200x200 image in memory ( approx 80kb ). then creating that image from a png source would require more available memory. remember its opening the stream to the resource, having the compressed PNG data in memory, AND creating the actual image object.
it is always best to load big images first as the heap is less fragmented and more memory for the overhead while loading is available. Also, if you store the images as raw data, 4444 format, you wont need as much memory when you are loading the image, just open a stream and fill an array of shorts. |
|
We have been noticing a problem that seems to exist on both the phone and on the emulator for the 7210. It seems that the program is crashing while it is trying to call Image.createImage. You can be creating either a mutable or immutable image. Prior to calling createImage, we have verified that plenty of memory does indeed exist (via Runtime.freeMemory). Note that the exception is not caught, even though code is there. The error message that is given is "Unable To Run Application".
Some of the images we are trying to load are large (496 x 16), while others are small or simply screen sized. For instance, it goes to never never land when it has free memory of 75K while trying to load a 496 x 16 image. This should require around 15K or so memory (496 x 16 x 2bytes), which should be ample. Does the 7210 have any issues with large sized (in one or both dimensions) images or with memory relating to images? Is this memory treated differently (like in a different memory page/bank)? The problem seems to manifest itself on both the emulator and the phone. Thanks. |
|
I seem to have the same problem... Did you solve it? My biggerst problem is that I don't know where to recive any information about the problem "Unable to run" I mean there is not stack trace or nothing.
|
|
The standard J2ME specification specifies a maximum image size of 255*255 pixels.
Hope this helps. :o) |
| mr_richard_x |
| View Public Profile |
| Find all posts by mr_richard_x |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|