You Are Here:

Community: Wiki

This page was last modified on 12 June 2009, at 11:46.

KIJ001079 - Over 22 CustomItems on Form cause S60 3rd Edition, Feature Pack 2 devices to hang

From Forum Nokia Wiki


This known issue was originally created by Schoenke and has been verified by Forum Nokia.

ID KIJ001079 Creation date June 12, 2009
Platform S60 3rd Edition, FP2 Tested on devices S60 3rd Edition, FP2 Emulator, Nokia 6210 Navigator
Category Java Subcategory LCDUI


Description

If you add more than 22 CustomItems on a Form, the MIDlet will hang up when calling Display.setCurrent() or Display.setCurrentItem(). This means that the Form will not be displayed.

In the debugger you can see that one thread hangs in Form._setCurrentItem() and another one in CustomItemTest.handleSizeChanged().

How to reproduce

See the following code snippet. This code works fine in Series 40 and S60 3rd Edition, FP1 emulators; however, start-up in the latter ones is very slow.

For a cross check, comment out approximately 10 append() statements and rerun the MIDlet. This way it works.

package main;
 
import javax.microedition.lcdui.Display;
import javax.microedition.midlet.MIDlet;
 
public class MidletTest extends MIDlet
{
 
public void startApp() {
FormTest frmTest = new FormTest(Display.getDisplay(this));
frmTest.open(1);
}
 
public void destroyApp(boolean b) {
}
 
/**
* Pausing is not supported in NOKIA's Series 40 and
* S60 MIDP implementations.
*/

public void pauseApp() {
}
 
public void quit() {
notifyDestroyed();
}
}

The Form:

package main;
 
import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
 
import main.CustomItemTest;
 
public class FormTest extends Form {
 
private final Display display;
 
private final CustomItemTest item00;
private final CustomItemTest item01;
private final CustomItemTest item02;
private final CustomItemTest item03;
private final CustomItemTest item04;
private final CustomItemTest item05;
private final CustomItemTest item06;
private final CustomItemTest item07;
private final CustomItemTest item08;
private final CustomItemTest item09;
private final CustomItemTest item10;
private final CustomItemTest item11;
private final CustomItemTest item12;
private final CustomItemTest item13;
private final CustomItemTest item14;
private final CustomItemTest item15;
private final CustomItemTest item16;
private final CustomItemTest item17;
private final CustomItemTest item18;
private final CustomItemTest item19;
private final CustomItemTest item20;
private final CustomItemTest item21;
private final CustomItemTest item22;
private final CustomItemTest item23;
private final CustomItemTest item24;
private final CustomItemTest item25;
private final CustomItemTest item26;
private final CustomItemTest item27;
private final CustomItemTest item28;
private final CustomItemTest item29;
 
public FormTest(Display pDisplay) {
super("test screen");
 
this.display = pDisplay;
 
this.item00 = new CustomItemTest();
this.item01 = new CustomItemTest();
this.item02 = new CustomItemTest();
this.item03 = new CustomItemTest();
this.item04 = new CustomItemTest();
this.item05 = new CustomItemTest();
this.item06 = new CustomItemTest();
this.item07 = new CustomItemTest();
this.item08 = new CustomItemTest();
this.item09 = new CustomItemTest();
this.item10 = new CustomItemTest();
this.item11 = new CustomItemTest();
this.item12 = new CustomItemTest();
this.item13 = new CustomItemTest();
this.item14 = new CustomItemTest();
this.item15 = new CustomItemTest();
this.item16 = new CustomItemTest();
this.item17 = new CustomItemTest();
this.item18 = new CustomItemTest();
this.item19 = new CustomItemTest();
this.item20 = new CustomItemTest();
this.item21 = new CustomItemTest();
this.item22 = new CustomItemTest();
this.item23 = new CustomItemTest();
this.item24 = new CustomItemTest();
this.item25 = new CustomItemTest();
this.item26 = new CustomItemTest();
this.item27 = new CustomItemTest();
this.item28 = new CustomItemTest();
this.item29 = new CustomItemTest();
 
append(this.item00);
append(this.item01);
append(this.item02);
append(this.item03);
append(this.item04);
append(this.item05);
append(this.item06);
append(this.item07);
append(this.item08);
append(this.item09);
append(this.item10);
append(this.item11);
append(this.item12);
append(this.item13);
append(this.item14);
append(this.item15);
append(this.item16);
append(this.item17);
append(this.item18);
append(this.item19);
 
append(this.item20);
append(this.item21);
append(this.item22);
append(this.item23);
append(this.item24);
append(this.item25);
append(this.item26);
append(this.item27);
append(this.item28);
append(this.item29);
}
 
public void open(int pFocus) {
display.setCurrentItem(get(pFocus));
}
}

The CustomItem:

package main;
 
import javax.microedition.lcdui.CustomItem;
import javax.microedition.lcdui.Graphics;
 
public class CustomItemTest extends CustomItem {
 
public CustomItemTest() {
super("");
}
 
protected void paint(Graphics pGraphics, int pWidth, int pHeight) {
pGraphics.setColor(0x00ffffaa);
pGraphics.fillRect(1, 1, pWidth - 2, pHeight - 2);
pGraphics.setColor(0x00000000);
pGraphics.drawString("TEST", 0, 0, Graphics.TOP | Graphics.LEFT);
}
 
protected int getMinContentHeight() {
return 20;
}
 
protected int getMinContentWidth() {
return 40;
}
 
protected int getPrefContentHeight(int arg0) {
return 20;
}
 
protected int getPrefContentWidth(int arg0) {
return 40;
}
}

Solution

This issue is expected to be fixed in future software versions starting from S60 5th Edition.

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fKIJ001203E5fE2dE5fNewE5flineE5fcannotE5fbeE5finsertedE5fwithE5fE2527E255CnE2527E5fcharE5finE5fAlertE5fusingE5fJavaE5fME45E5finE5fS60X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZKnowledgeBaseContentQ qdcZtypeQUqfntypeZKnownIssueQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZKnowledgeBaseContentQ qfnZtypeQUqfntypeZKnownIssueQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZKnowledgeBaseContentQ qrdfZtypeQUqfntypeZKnownIssueQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ