Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 138844 - Enormous messages.log and uigestures files due to ClassCastException
Enormous messages.log and uigestures files due to ClassCastException
Status: VERIFIED FIXED
Product: guibuilder
Classification: Unclassified
Component: Code
6.x
All All
: P2 (vote)
: 6.x
Assigned To: issues@guibuilder
issues@guibuilder
61fixes3-fixed
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-02 17:51 UTC by roger_rf
Modified: 2008-09-04 13:20 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description roger_rf 2008-07-02 17:51:33 UTC
Hi,
I noticed a few days ago that my messages.log and uigestures files had enormous sizes, up to hundreds of megabytes. Now
I delete them every day, before I start NetBeans, in order to keep them at reasonable sizes. Right now, at 1:43 PM GMT
-3:00, having worked with NB all day long, messages.log is weighing in at 18 MB, and uigestures has 47.5 MB. I believe
this bloat is due to a frequent ClassCastException in the form module. messages.log has many occurrences like the one below:

<record>
  <date>2008-07-02T13:26:18</date>
  <millis>1215015978182</millis>
  <sequence>49193</sequence>
  <logger></logger>
  <level>INFO</level>
  <thread>12</thread>
  <message>java.util.ArrayList cannot be cast to [Ljava.awt.Component;</message>
  <exception>
    <message>java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.awt.Component;</message>
    <frame>
      <class>org.netbeans.modules.form.fakepeer.FakePeerSupport</class>
      <method>getComponents</method>
      <line>163</line>
      <file>${netBeansDir}modules/org-netbeans-modules-form.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.form.fakepeer.FakePeerContainer</class>
      <method>paintFakePeersRecursively</method>
      <line>94</line>
      <file>${netBeansDir}modules/org-netbeans-modules-form.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.form.fakepeer.FakePeerContainer</class>
      <method>paintFakePeersRecursively</method>
      <line>121</line>
      <file>${netBeansDir}modules/org-netbeans-modules-form.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.form.fakepeer.FakePeerContainer</class>
      <method>paintFakePeersRecursively</method>
      <line>121</line>
      <file>${netBeansDir}modules/org-netbeans-modules-form.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.form.fakepeer.FakePeerContainer</class>
      <method>paintFakePeersRecursively</method>
      <line>121</line>
      <file>${netBeansDir}modules/org-netbeans-modules-form.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.form.fakepeer.FakePeerContainer</class>
      <method>paintFakePeersRecursively</method>
      <line>121</line>
      <file>${netBeansDir}modules/org-netbeans-modules-form.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.form.fakepeer.FakePeerContainer</class>
      <method>paint</method>
      <line>87</line>
      <file>${netBeansDir}modules/org-netbeans-modules-form.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paintChildren</method>
      <line>876</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paint</method>
      <line>1036</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.form.ComponentLayer$DesignerPanel</class>
      <method>paint</method>
      <line>187</line>
      <file>${netBeansDir}modules/org-netbeans-modules-form.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paintChildren</method>
      <line>864</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paint</method>
      <line>1036</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paintChildren</method>
      <line>864</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paint</method>
      <line>1036</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paintChildren</method>
      <line>864</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.modules.form.FormDesigner$1</class>
      <method>paintChildren</method>
      <line>228</line>
      <file>${netBeansDir}modules/org-netbeans-modules-form.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paint</method>
      <line>1036</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JLayeredPane</class>
      <method>paint</method>
      <line>564</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paintChildren</method>
      <line>864</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paint</method>
      <line>1036</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JViewport</class>
      <method>paint</method>
      <line>747</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paintToOffscreen</method>
      <line>5122</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.BufferStrategyPaintManager</class>
      <method>paint</method>
      <line>277</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.RepaintManager</class>
      <method>paint</method>
      <line>1213</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>_paintImmediately</method>
      <line>5070</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.JComponent</class>
      <method>paintImmediately</method>
      <line>4880</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.RepaintManager</class>
      <method>paintDirtyRegions</method>
      <line>799</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.RepaintManager</class>
      <method>paintDirtyRegions</method>
      <line>714</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.RepaintManager</class>
      <method>seqPaintDirtyRegions</method>
      <line>694</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>javax.swing.SystemEventQueueUtilities$ComponentWorkRequest</class>
      <method>run</method>
      <line>128</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>java.awt.event.InvocationEvent</class>
      <method>dispatch</method>
      <line>209</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>java.awt.EventQueue</class>
      <method>dispatchEvent</method>
      <line>597</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>org.netbeans.core.TimableEventQueue</class>
      <method>dispatchEvent</method>
      <line>104</line>
      <file>${netbeans.home}modules/org-netbeans-core.jar</file>
    </frame>
    <frame>
      <class>java.awt.EventDispatchThread</class>
      <method>pumpOneEventForFilters</method>
      <line>284</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>java.awt.EventDispatchThread</class>
      <method>pumpEventsForFilter</method>
      <line>184</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>java.awt.EventDispatchThread</class>
      <method>pumpEventsForHierarchy</method>
      <line>174</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>java.awt.EventDispatchThread</class>
      <method>pumpEvents</method>
      <line>169</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>java.awt.EventDispatchThread</class>
      <method>pumpEvents</method>
      <line>161</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
    <frame>
      <class>java.awt.EventDispatchThread</class>
      <method>run</method>
      <line>122</line>
      <file>${java.home}lib/rt.jar</file>
    </frame>
  </exception>
</record>


And uigestures has many occurrences like the one below:

INFO: java.util.ArrayList cannot be cast to [Ljava.awt.Component;
java.lang.ClassCastException: java.util.ArrayList cannot be cast to [Ljava.awt.Component;
[catch] at org.netbeans.modules.form.fakepeer.FakePeerSupport.getComponents(FakePeerSupport.java:163)
	at org.netbeans.modules.form.fakepeer.FakePeerContainer.paintFakePeersRecursively(FakePeerContainer.java:94)
	at org.netbeans.modules.form.fakepeer.FakePeerContainer.paintFakePeersRecursively(FakePeerContainer.java:121)
	at org.netbeans.modules.form.fakepeer.FakePeerContainer.paintFakePeersRecursively(FakePeerContainer.java:121)
	at org.netbeans.modules.form.fakepeer.FakePeerContainer.paintFakePeersRecursively(FakePeerContainer.java:121)
	at org.netbeans.modules.form.fakepeer.FakePeerContainer.paintFakePeersRecursively(FakePeerContainer.java:121)
	at org.netbeans.modules.form.fakepeer.FakePeerContainer.paint(FakePeerContainer.java:87)
	at javax.swing.JComponent.paintChildren(JComponent.java:876)
	at javax.swing.JComponent.paint(JComponent.java:1036)
	at org.netbeans.modules.form.ComponentLayer$DesignerPanel.paint(ComponentLayer.java:187)
	at javax.swing.JComponent.paintChildren(JComponent.java:864)
	at javax.swing.JComponent.paint(JComponent.java:1036)
	at javax.swing.JComponent.paintChildren(JComponent.java:864)
	at javax.swing.JComponent.paint(JComponent.java:1036)
	at javax.swing.JComponent.paintChildren(JComponent.java:864)
	at org.netbeans.modules.form.FormDesigner$1.paintChildren(FormDesigner.java:228)
	at javax.swing.JComponent.paint(JComponent.java:1036)
	at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
	at javax.swing.JComponent.paintChildren(JComponent.java:864)
	at javax.swing.JComponent.paint(JComponent.java:1036)
	at javax.swing.JViewport.paint(JViewport.java:747)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5122)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:277)
	at javax.swing.RepaintManager.paint(RepaintManager.java:1213)
	at javax.swing.JComponent._paintImmediately(JComponent.java:5070)
	at javax.swing.JComponent.paintImmediately(JComponent.java:4880)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:799)
	at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:714)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:694)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:104)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:284)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)


Cheers,
Roger
Comment 1 Jan Stola 2008-07-03 09:40:24 UTC
This is a known problem that was fixed already, see http://hg.netbeans.org/main/rev/00d7ac66725a
It happens on JDK 6 Update 10 only (since its build 23). Sub-components of container are not stored as Component[], but 
as List<Component> since this build. Unfortunately, we access the corresponding field using reflection (because of 
possible ugly behaviour of some user components) and we did expect the old (Component[]) type of the field.
Comment 2 roger_rf 2008-07-03 18:50:42 UTC
Thanks for the info, I reverted to JDK 1.6 u6 and everything's fine now.
Comment 3 Jana Maleckova 2008-07-08 11:39:33 UTC
under verification now. Tested on 1.6.0_10-rc-b26 and on older as well.
Comment 4 Jana Maleckova 2008-07-14 12:30:29 UTC
verified on
Product Version: NetBeans IDE Dev (Build 20080710042255)
Java: 1.6.0_10-rc; Java HotSpot(TM) Client VM 11.0-b13
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

Product Version: NetBeans IDE Dev (Build 20080710042255)
Java: 1.5.0_16-rev; Java HotSpot(TM) Client VM 1.5.0_16-rev-b03
Comment 5 rbalada 2008-07-17 13:36:45 UTC
I've transplanted the changeset http://hg.netbeans.org/main/rev/00d7ac66725a into release61_fixes repository as
http://hg.netbeans.org/release61_fixes/rev/94360335ffcc 


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo