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 226537 - Problems when mixing heavyweight and lightweight components
Summary: Problems when mixing heavyweight and lightweight components
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-22 13:27 UTC by nhoffmann
Modified: 2013-05-10 14:06 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Shows how lightweight / heavyweight mixing worked in NetBeans 7.2 (476.01 KB, image/png)
2013-02-22 13:27 UTC, nhoffmann
Details
Shows how lightweight / heavyweight mixing fails in NetBeans 7.3, menu is behind the AWT canvas (446.97 KB, image/png)
2013-02-22 13:28 UTC, nhoffmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nhoffmann 2013-02-22 13:27:34 UTC
Created attachment 131735 [details]
Shows how lightweight / heavyweight mixing worked in NetBeans 7.2

This seems to be a regression, since the mixing works without problems in NetBeans 7.2. Both version with the following java version:

java version "1.7.0_15"
OpenJDK Runtime Environment (IcedTea7 2.3.7) (7u15-2.3.7-0ubuntu1~12.04)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

Steps to reproduce the bug:

Clone the git repository at https://github.com/nilshoffmann/netbeans-jogl2.git.
This contains a NetBeans platform project defining two TopComponents. They are registered under Window->Jogl2 Demo and Window->Jzy3DDemo, respectively. If any of those is opened, selecting any of the longer menus in the menubar, like "Tools" will show the problem.
Comment 1 nhoffmann 2013-02-22 13:28:34 UTC
Created attachment 131736 [details]
Shows how lightweight / heavyweight mixing fails in NetBeans 7.3, menu is behind the AWT canvas
Comment 2 nhoffmann 2013-02-22 13:33:54 UTC
The attached screenshots show the undesired behaviour in comparison between NetBeans 7.2 and 7.3 when the NewtCanvasAWT is embedded in a TopComponent and a menu is selected. The project was properly cleaned and rebuilt for each invocation and the target platform was manually set/reset beforehand to 7.2 and 7.3 respectively.
Comment 3 Stanislav Aubrecht 2013-02-22 13:37:05 UTC
Please reopen if the problem is reproducible with the latest update of Oracle JDK, thanks.
Comment 4 nhoffmann 2013-02-22 13:54:36 UTC
The problem persists, even with the latest Oracle VM. The symptoms are exactly the same.

This is from the application startup log to prove usage of the oracle VM.

  System Info: 
  Product Version         = NetBeans IDE 7.3 (Build 201302132200) (#93e87decaddf)
  Operating System        = Linux version 3.2.0-38-generic running on amd64
  Java; VM; Vendor        = 1.7.0_15; Java HotSpot(TM) 64-Bit Server VM 23.7-b01; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_15-b03
  Java Home               = /usr/lib/jvm/java-7-oracle/jre
  System Locale; Encoding = de_DE (nb); UTF-8
Comment 5 nhoffmann 2013-02-26 13:42:22 UTC
I found the root cause and a workaround for the issue:

The "regression" relates to the addition of a setting in /etc/netbeans.conf:

If
-J-Dsun.awt.disableMixing=false

then lightweight/heavyweight mixing works. If

-J-Dsun.awt.disableMixing=true

which is the default in 7.3, then lightweight/heavyweight mixing is obviously disabled.

However, it would be nice to have this documented somewhere, since it may not be obvious to other developers where this is set or where it comes from.
Comment 6 nhoffmann 2013-02-26 14:12:10 UTC
I updated the developer FAQ wiki page and added a new page on the issue:

http://wiki.netbeans.org/DevFaqMixingLightweightHeavyweight
Comment 7 Stanislav Aubrecht 2013-02-26 15:07:57 UTC
This is a regression from issue #218346

Ondro, any particular reason why we have -J-Dsun.awt.disableMixing=true in netbeans.conf?
Comment 8 Ondrej Vrabec 2013-02-26 15:35:05 UTC
(In reply to comment #7)
> This is a regression from issue #218346
> 
> Ondro, any particular reason why we have -J-Dsun.awt.disableMixing=true in
> netbeans.conf?
I am sorry, Stando, i was just solving a stupidly merged file with (now as it seems) also a stupid merge. Please remove the setting if it's not supposed to be there. Thanks.
Comment 9 Stanislav Aubrecht 2013-02-27 14:44:56 UTC
core-main fd13c633d1d7
Comment 10 Quality Engineering 2013-03-02 01:52:54 UTC
Integrated into 'main-golden', will be available in build *201303012300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/fd13c633d1d7
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #226537 - there's no reason to disable heavy/light-weight mixing
Comment 11 Tomas Danek 2013-03-11 15:50:15 UTC
Unfortunately, this change cannot be delivered via autoupdate mechanism - this wil be delivered by installation - targeted to 7.3.1 AKA 73patch2.
Comment 12 Tomas Danek 2013-05-03 07:05:22 UTC
please backport to 7.3.1.
Comment 13 Stanislav Aubrecht 2013-05-06 09:42:09 UTC
backported to release73 branch as 8270b34a236e
Comment 14 Quality Engineering 2013-05-07 00:19:53 UTC
Integrated into 'releases', will be available in build *201305062200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/8270b34a236e
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #226537 - backport of fd13c633d1d7
Comment 15 mbukovsky 2013-05-10 14:06:46 UTC
Verified in Netbeans 7.3.1 201305092200