Symbian
Symbian OS Library

FAQ-0566 My app crashes with message "EIKON-LISTBOX 4". What does this mean?

[Index][spacer] [Previous] [Next]



 

Classification: Java Category: AWT
Created: 01/31/2001 Modified: 09/01/2001
Number: FAQ-0566
Platform: ER5

Question:
When I click on my List or try to display it with the last index selected, my Java app crashes, displaying a dialog box containing:
Program AWT_Server 00
Reason Code EIKON-LISTBOX
Reason Number 4
My program runs fine on JDK 1.1.8. What's going on? And what can I do about it?


Answer:
This relates to a defect in the native CEikListBox class on which Symbian's implementation of java.awt.List depends. Basically what happens is if, when the List tries to calculate how many items it can display, the answer is zero or less than the List's selected index, it gets into an inconsistent state and causes the Panic observed. This can occur in a java app when, for example, setFont() is used to set the font so tall that no items can be displayed in the List at its current size.

The problem should be ameliorated if pack() is called on the container to which the List was added, allowing the List to be resized. This should be done before assigning a selected index. If you are working in a fixed-size Frame, the best you can probably do is to take care that the screen space allocated to the List is not too small.