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 153283

Summary: IllegalArgumentException: Color parameter outside of expected range: Alpha
Product: platform Reporter: tikluganguly <tikluganguly>
Component: Window SystemAssignee: David Simonek <dsimonek>
Status: RESOLVED FIXED    
Severity: blocker CC: callagga, saubrecht, sfehrman
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=4103
Issue Type: DEFECT Exception Reporter: 4103
Bug Depends on: 156357    
Bug Blocks:    
Attachments: stacktrace

Description tikluganguly 2008-11-16 18:58:38 UTC
Build: NetBeans IDE 6.5 Beta (Build 200808111757)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14
OS: Linux, 2.6.23.1-42.fc8, i386

User Comments:
tikluganguly: I was just starting netbeans after a system shutdown

pcw: <Finish> action in the debugger to stop debugging session.

amanjpro@yahoo.com: just, compiling and running (BTW, i changed my current date)..

the last compiled was done when my date/time (year) was set to the 2010...

but, i corrected it to 2008, and recompiled the class.. the exception occured

dkelly: Started NB6.5M1 and exception occurred pretty much from start without any interaction on my part.

tikluganguly: I was just starting netbeans after a system shutdown



Stacktrace: 
java.lang.IllegalArgumentException: Color parameter outside of expected range: Alpha
        at java.awt.Color.testColorValueRange(Color.java:298)
        at java.awt.Color.<init>(Color.java:382)
        at org.netbeans.core.windows.view.ui.StatusLine$Updater.actionPerformed(StatusLine.java:89)
        at javax.swing.Timer.fireActionPerformed(Timer.java:271)
        at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
Comment 1 tikluganguly 2008-11-16 18:58:43 UTC
Created attachment 73798 [details]
stacktrace
Comment 2 Lukas Hasik 2008-11-19 16:00:40 UTC
13 duplicates 
looks like http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6389798 
Comment 3 David Simonek 2008-11-21 15:58:22 UTC
I think it's not JDK bug, it's our bug probably in StatusLine where we are passing Alpha outside 0..255 range.
Comment 4 David Simonek 2008-12-03 16:52:55 UTC
hopefully fixed: #92253ba8fd4e
Comment 5 Quality Engineering 2008-12-05 06:13:21 UTC
Integrated into 'main-golden', will be available in build *200812050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/92253ba8fd4e
User: Dafe Simonek <dsimonek@netbeans.org>
Log: #153283: ensure that alpha is in 0-255 range
Comment 6 Exceptions Reporter 2009-01-18 20:50:20 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 200901121401)
http://statistics.netbeans.org/exceptions/detail.do?id=4103
Comment 7 Exceptions Reporter 2009-02-09 11:20:20 UTC
This issue has already 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=4103
Comment 8 David Simonek 2009-02-09 13:41:31 UTC
Color fading code was deleted as part of 156357, making this issue obsolete.

However, if anyone wants to put fading back, note that to get rid of bug in color fading code, you need to replace
following code:

int alpha = 256 * (int)(Math.max(0, t - startTime)) / 2000;

with:

int alpha = Math.min(255, Math.max(0, 256 * (int)(t - startTime) / 2000));