This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 192390

Summary: Cells can't be edited on Ubuntu 10.10 64-bit with default java (1.6.0_20; OpenJDK 64-Bit)
Product: platform Reporter: soldatov <soldatov>
Component: JDK ProblemsAssignee: Antonin Nebuzelsky <anebuzelsky>
Status: VERIFIED WONTFIX    
Severity: normal CC: chunkyks, cordisvictor, dstrupl, issues, jlahoda, KaDMiO, mentlicher, mmirilovic, vkvashin
Priority: P2 Keywords: RELNOTE
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: A simple application that can be used to reproduce the bug
Source code for the application.

Description soldatov 2010-11-24 08:37:11 UTC
A lot of automatic tests fail on Ubuntu 10.10 with default java.

These problems can be reproduced very easy in Java and C/C++ projects. For example:
1)
- Call "Change Method Parameters" wizard
- Press Add button
==> Name, Type, Default Value columns can't be edited

2)
- Call "Encapsulate Fields" wizard
==> I can't switch off check boxes in 2th and 4th columns
Comment 1 Vladimir Kvashin 2010-11-24 09:08:01 UTC
Isn't it a duplicate of the issue 192010?
Comment 2 soldatov 2010-11-24 09:30:32 UTC
Yes. But 192010 is C/C++ specific bug and it is filed into "cnd" category. These scenarios can be reproduced in Java and C/C++ projects and it is filed into "ide" category
Comment 3 Marian Mirilovic 2010-11-24 13:48:58 UTC
Hmm quiet serious and reproducible for me with NB 6.9.1, Ubuntu 10.10 x64 & JDK6u22 .... I think both issues are one problem with our tree table view and particular JDK version
Comment 4 Marian Mirilovic 2010-11-24 13:53:27 UTC
*** Bug 192010 has been marked as a duplicate of this bug. ***
Comment 5 Martin Entlicher 2010-11-24 14:46:39 UTC
I have no idea what C/C++ is using, but refactoring.java/src/org/netbeans/modules/refactoring/java/ui/ChangeParametersPanel.java uses JTable. It has nothing to do with our tree tables.
Comment 6 Jan Becicka 2010-11-24 15:02:47 UTC
it works for me:
Product Version: NetBeans IDE 6.9 (Build 201007282301)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03
System: Linux version 2.6.31.14-0.1-desktop running on amd64; UTF-8; en_US (nb)

Product Version: NetBeans IDE Dev (Build 101122-82b1bf580a49)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03
System: Linux version 2.6.31.14-0.1-desktop running on amd64; UTF-8; en_US (nb)

Hardly P1. Never heard of such bug.
Comment 7 Marian Mirilovic 2010-11-24 17:27:26 UTC
I am sorry but it doesn't work for me, either for at least 5 other people so far :
Product Version: NetBeans IDE 6.9.1 (Build 201007282301)
Java: 1.6.0_23; Java HotSpot(TM) Client VM 19.0-b09
System: Linux version 2.6.32-22-generic running on i386; UTF-8; en_US (nb)
Comment 8 Jan Becicka 2010-11-25 07:31:28 UTC
guys, 
1. 192010 is marked as duplicate of this bug. Interesting. 192010 is cnd bug not related to refactoring. Interesting also is, that cnd bug is not p1. Never mind, I will change it.
2. those 2 refactoring dialogs did not have any changes for several years, as far as I know. This regression was introduced in update 22. Did you file p1 against jdk?
Comment 9 Jan Becicka 2010-11-25 08:45:17 UTC
still cannot reproduce
Product Version: NetBeans IDE 6.9.1 (Build 201007282301)
Java: 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03
System: Linux version 2.6.31.14-0.1-desktop running on amd64; UTF-8; en_US (nb)
Comment 10 Leonid Lenyashin 2010-11-25 10:01:23 UTC
It looks obvious that difference is in Linux Kernel. Bug is reported on 32(-22) and you are trying to reproduce on 31(-14). It is not the only bug that is only seen on newer kernel.

BTW, please do not upgrade cnd bug, as by it's sense it is not more than P3.
Comment 11 Jan Becicka 2010-11-25 10:46:20 UTC
All you guys are using ubuntu 10.10, right? Always reproducible on ubuntu 10.10 with any JDK. Not reproducible on other linuxes. Right?
Comment 12 soldatov 2010-11-25 10:58:40 UTC
(In reply to comment #11)
> All you guys are using ubuntu 10.10, right? Always reproducible on ubuntu 10.10
> with any JDK. Not reproducible on other linuxes. Right?
But you uses Ubuntu 9.10 (karmic). Right?
Comment 13 Leonid Lenyashin 2010-11-25 10:59:35 UTC
I do not think anyone performed testing of this depth.
Take into account that Ubuntu users usually use jdk that is available in Ubuntu
repository and do not tend to experiment with anything else as it causes
autoupdate issues.
Comment 14 soldatov 2010-11-25 11:56:37 UTC
Wizard works correctly if I use java from java.sun.com:

  Product Version         = NetBeans IDE Dev (Build 201011240001) (#584595eb363f)
  Operating System        = Linux version 2.6.35-23-generic running on amd64
  Java; VM; Vendor        = 1.6.0_22; Java HotSpot(TM) 64-Bit Server VM 17.1-b03; Sun Microsystems Inc.
  Runtime                 = Java(TM) SE Runtime Environment 1.6.0_22-b04
  Java Home               = /export/home/tester/jdk1.6.0_22/jre
  System Locale; Encoding = ru_RU (nb); UTF-8
Comment 15 Jan Becicka 2010-11-25 12:27:04 UTC
I have opensuse 11.3
Comment 16 Jan Becicka 2010-11-25 12:32:01 UTC
This is JDK bug. Please file a bug against jdk.
Comment 17 Marian Mirilovic 2010-11-25 12:44:45 UTC
Honza, 
I am sorry it doesn't work this way. In case this is an JDK bug, please add here a number. We need to mention it in Release Notes.
Comment 18 Vladimir Voskresensky 2010-11-25 13:38:32 UTC
Marian to make Jan happy I'd propose to move this bug under general ide category, because
1) it's clearly not java/refactoring issue
2) not only refactoring dialogs are affected, but other dialogs as well (i.e. issue #192010)

but I agree it's P1 and must be in release notes with advice to install sun java
Comment 19 soldatov 2010-11-25 13:49:32 UTC
Now I can understand why mouse click in "Plugins" window doesn't work on my home Ubuntu machine (I use "space" in order to select any pug-in)
Comment 20 Jan Lahoda 2010-11-25 13:58:09 UTC
platform/JDK Problems might be a better place. If this happens only on OpenJDK, it might be related to:
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=590
Comment 21 Marian Mirilovic 2010-11-25 14:10:39 UTC
step by step :
0. IDE/Code or UI it's just 'not yet evaluated' category of bugs
1. this problem is reproducible on some parts of the IDE, but not on all!
2. I am not using openjdk, so this is not openJDK issue
3. regular JFrame with JTable works as expected on the same JDK/OS

so reassign back to Refactoring... I am in touch with Honza, I think he is trying to find out what is wrong.
Comment 22 Jaromir Uhrik 2010-11-25 23:51:09 UTC
Since I was unable to reproduce this problem on 32-bit Ubuntu 10.10 I have decided to install 64-bit Ubuntu 10.10 to the VBox. Then I installed the jdkbundle (NetBeans + Sun JDK 6 u22) and all works fine. Finally I used Synaptic to install OpenJDK and the problem is reproducible finally with that JDK. So no matter whether I run on 32 or 64 bit ubuntu the only requirement to reproduce it is OpenJDK. And now let me say what is reproducible:
1/Refactor|Change Method Parameters then Add new parameter -> It is not possible to edit cells of newly added parameter. Marian, here I would like to stress that it is not about existing parameters, these have intentionally not editable cells. 
2/Refactor|Encapsulate Fields - in the dialog it is not possible to change status of checkboxes by clicking on them.


Marian, are you still convinced that 1/ and 2/ are reproducible on Sun JDK?
Thanks.
Comment 23 David Strupl 2010-11-26 10:17:00 UTC
This is definitely not a P1 bug. Only from respect to Marian I am making it P2 instead of more appropriate P3. Please note that the very same bug in CND is marked as P3.
Comment 24 Jan Lahoda 2010-11-26 13:57:31 UTC
I believe there is a bug in OpenJDK6 in Ubuntu 10.10 that prevents JTable cell editing in certain cases. The cause is inability to find the default cell editor. The reason is that:
-OpenJDK 6 uses UIDefaults.ProxyLazyValue to lazily represent the JTable's cell editor for pre-defined classes (see line 5312 of openjdk-6 sources from Ubuntu). Note that the default cell editors are package private classes (e.g. JTable$GenericEditor).
-OpenJDK 6's UIDefaults.ProxyLazyValue has been recently changed so that it checks that the cell editor's class has public access if a security manager is installed see the Ubuntu sources and:
http://hg.openjdk.java.net/jdk6/jdk6/jdk/diff/bb1c74cae929/src/share/classes/javax/swing/UIDefaults.java

The net effect is that the cell editor cannot be resolved for String.class and the table cell is not editable. The code around JTable.setLazyValue (some versions use sun.swing.SwingLazyValue instead of UIDefaults.ProxyLazyValue, which does not contain this check) and UIDefaults.ProxyLazyValue is slightly different in different revisions of JDK. So in most JDKs this bug does not exist because they either do not contain the security check or use SwingLazyValue. Even current tip of OpenJDK6 uses SwingLazyValue instead of ProxyLazyValue (see changeset 826806a193c8), and so likely does not contain this bug (although I am unable to verify it). Also JTables that use custom cell editors will not be affected, AFAIK, as won't be applications without a SecurityManager.

Does not seem to be related to (Java) refactoring, so moving to platform/JDK Problems which is IMO the most appropriate category. Not sure what should be done now or where to report it - the bug is unlikely to appear in current versions of OpenJDK6/7. Might be reasonable to file a bug against Ubuntu.
Comment 25 Jan Lahoda 2010-11-26 14:07:42 UTC
Created attachment 103374 [details]
A simple application that can be used to reproduce the bug

Run java -jar JavaApplication7.jar
a table is shown - all cells are expected to be editable.
Comment 26 Jan Lahoda 2010-11-26 14:08:40 UTC
Created attachment 103375 [details]
Source code for the application.
Comment 27 Tomas Stupka 2010-11-29 16:08:00 UTC
*** Bug 191755 has been marked as a duplicate of this bug. ***
Comment 28 chunkyks 2010-11-29 17:23:33 UTC
In addition to the problems described, I'm also unable to check checkboxes in tables. It may be a different bug, I'm not sure.

Open tools->plugins, and go to select a checkbox. Nothing happens.
I can click on rows to select them, but clicking on the checkbox itself is ignored.

I get around this by pushing the space bar with the right row selected. That appears to set the checkbox.

This manifests on 6.9.1 as well as the current 7.0 beta
Comment 29 Thomas Preisler 2010-12-03 18:16:48 UTC
*** Bug 192010 has been marked as a duplicate of this bug. ***
Comment 30 Jan Lahoda 2011-01-21 18:36:04 UTC
*** Bug 194290 has been marked as a duplicate of this bug. ***
Comment 31 cordisvictor 2011-01-27 19:28:08 UTC
The Linux update manager had a list for me today containing openJDK and some
fixes: "SecurityManager bypass". Now all symptoms NetBeans had (because of
openJDK) are gone :-)

I just hope "bypass" doesn't stand for "hacked to make it work"... this
would make me wish sun-jre6 would still be the default JRE for Linux.
Comment 32 soldatov 2011-01-27 20:18:38 UTC
I saw same update in latest Fedora also
Comment 33 Antonin Nebuzelsky 2011-01-28 12:07:13 UTC
Thanks for the confirmation! Good to hear it is now fixed on OpenJDK side.

Closing WONTFIX on our side.
Comment 34 Marian Mirilovic 2011-06-08 20:04:05 UTC
(In reply to comment #31)
> The Linux update manager had a list for me today containing openJDK and some
> fixes: "SecurityManager bypass". Now all symptoms NetBeans had (because of
> openJDK) are gone :-)
Comment 35 Jiri Rechtacek 2011-10-10 23:46:05 UTC
*** Bug 191791 has been marked as a duplicate of this bug. ***