NOKIA 60 Image.createImage crash problem

xiaoxiao2021-03-06  59

2004.11.17

Tang Liang

NOKIA 60's Symbian 6.0 system mobile phone, that is, when the NOKIA 3650 and NOKIA 7650 are executing image.createImage (byte [] data, int off, int LEN) is prone to crash problems. This problem has been confirmed on the official development forum of Nokia.

My test is primarily a problem that appears when the image.createImage function is created when you create a GIF image. I used to create 1000 times for the memory block of a picture, the size of the picture is about 18x18, and the test results show that it will easily occur after creating 500 times. And if it is the same size PNG picture, it is created to 1000 times, and there is no error.

At the same time, I also found that if you create a GIF picture in the way using image.createImage (String filename), there is a small discipline, but there will be a chance to have a chance.

Mobile phones for NOKIA's latest Symbian 7.0 system, such as Nokia 7610, Nokia 6600, have no image.createImage (byte [] data, int off, int LEN) to create a GIF image error. Then, it is estimated that this is a bug that Symbian 6.0 is decoded for GIF.

Create a GIF image in memory in the RECordStore in J2ME (Byte [], int, int, int, int, ", no exception problem occurs.

Surprisingly, I don't know why, IMAGE.CREATEIMAGE (STRING FileName) in my 1000 creating trials also created a GIF picture. This may have a relationship with another problem.

Solve the way:

1. When the program is initialized, the mobile phone memory based on Nokia 60 is relatively large. You can create the image resources to the memory at one time. So, you will not be created again, which can greatly reduce the chance of error. (Magic Tour 2 practice)

2. Picture Resources in Local Packages Do not use the packaged images, use image.createImage (String FileName) to create a picture. (Xianjian practice)

3. Use the PNG picture. This approach has not been specifically tested in the project, but based on the previous 1000 repeated tests, it should be a way.

Another point, in the development of the Sword NOKIA 3650, found that if you read a resource repeatedly, if I am displaying the item properties, I will go to the local package to extract the resource attribute data every time, then in this high The random error was found during the resource extraction of the frequency. It is estimated that it is also caused by the instability of Symbian 6.0. The solution is to load into memory at a time, then take the property data directly from the memory every time it appears.

转载请注明原文地址:https://www.9cbs.com/read-90806.html

New Post(0)