JDK-6347370 : ArrayIndexOutOfBoundsException in GTKEngine._paintFocus when using NetBeans with 5.0
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0u5
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • CPU: unknown
  • Submitted: 2005-11-08
  • Updated: 2014-02-27
  • Resolved: 2006-01-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0u7 b01Fixed
Description
Netbeans 5.0 recent builds (200511061900), Ubuntu Linux 5.10 (kernel
2.6.12-9-686), Gnome 2.12.1, "Glider" Theme.

Java tested: 1.5 (1.5.0_05-b05)

Both worked fine if NetBeans was not given the requirement to use GTK
(-J-DuseGtk=true), but probs occurred with if I turned the Gtk flag
on: simplest test that exhibited problems was to create a new project,
choose Enterprise, EJB module, hit Next, then Finish.

Got attached messages-1.5.log - had to kill the process.

Comments
SUGGESTED FIX Webrev: http://javaweb.sfbay/jcg/5.0u7/swing/6347370/
22-12-2005

EVALUATION "" actually means "\0" which in turn means solid line rather than dashed. We don't support "\0" either -- GTKEngine falls into an infinite loop. Our support for one-part focus patterns is generally lame: we treat e.g. "\1" as solid line while GTK treats it as "\1\1". So there're several cases we should handle in FOCUS_LINE_PARSER: Given "" -- it should return { Integer.MAX_VALUE } "\0" -- { Integer.MAX_VALUE } "\x" -- { x, x } "\x\y" -- { x, y } {Integer.MAX_VALUE} results in a solid border. In fact, any number greater then zero would do. {Integer.MAX_VALUE} just paints the whole border at once, while e.g. {2} would iterate and paint by 2-pixel chunks. Currently we support the latter case only, others either work incorrectly or not at all.
12-12-2005

EVALUATION Glider defines focus-line-pattern property as "" which is probably intended to mean default value. We expect a valid definition. Need to make this code more defensive.
14-11-2005

EVALUATION The complaints about not supporting engine "smooth" are expected since we only support a couple of engines in 5.0. This will dissapear in Mustang. Also, the code that is failing also goes away in Mustang. Therefore, this bug is about fixing 5.0 update only.
08-11-2005