Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4335360
Votes 26
Synopsis java.lang.IllegalArgumentException: Illegal Load: 0.75 at java.util.Hashtable
Category hotspot:compiler1
Reported Against 1.3 , kestrel-rc3
Release Fixed
State 11-Closed, duplicate of 4342148, bug
Priority: 4-Low
Related Bugs 4342148 , 4760131
Submit Date 03-MAY-2000
Description





This is an applet, so we run it using Netscape 4.7 and JRE 1.3RC3

In certain PC's (Compaq Presarios 2266), users start getting hashtable
exceptions:

This problem happens in different places without consistency.  The same code ran fine on the same PC's under JRE 1.22.  We
have noticed a change (the new Float.isNaN(loadFactor) check) in the Hashtable class (listed below) in JDK 1.3 RC3. 
Please forward the following exception traces to the developer(s) who modified the Hashtable class. 


Public Hashtable(int initialCapacity, float loadFactor) { 
     if (initialCapacity < 0) 
        throw new IllegalArgumentException("Illegal Capacity: "+ initialCapacity); 
     if (loadFactor <= 0 || Float.isNaN(loadFactor)) 
        throw new IllegalArgumentException("Illegal Load: "+loadFactor); 
     if (initialCapacity==0) 
        initialCapacity = 1; 
      this.loadFactor = loadFactor; 
      table = new Entry[initialCapacity]; 
     threshold = (int)(initialCapacity * loadFactor); 
} 

public Hashtable(int initialCapacity) { 
    this(initialCapacity, 0.75f); 
} 

public Hashtable() { 
    this(11, 0.75f); 
} 
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: Illegal Load: 0.75
at java.util.Hashtable.<init>(Unknown Source)
at java.util.Hashtable.<init>(Unknown Source)
at javax.swing.JComponent.registerWithKeyboardManager(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.JMenuBar.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.plaf.basic.BasicInternalFrameTitlePane.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addImpl(Unknown Source)
at javax.swing.JLayeredPane.addImpl(Unknown Source)
at java.awt.Container.add(Unknown Source)
at touchtone.jwintouch.JWintouchUtil.show(JWintouchUtil.java:1031)
at touchtone.jwintouch.JWintouchUtil.show(JWintouchUtil.java:1022)
at touchtone.jwintouch.AccountSearch.doActionPerformed(AccountSearch.java:173)
at
touchtone.jwintouch.JWintouch$JWintouchAction.actionPerformed(JWintouch.java:248
)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown
Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Item #10
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: Illegal Load: 0.75
at java.util.Hashtable.<init>(Unknown Source)
at java.util.Hashtable.<init>(Unknown Source)
at javax.swing.JComponent.getClientProperties(Unknown Source)
at javax.swing.JComponent.putClientProperty(Unknown Source)
at
touchtone.jwintouch.AccountSummary.createASUDComponents(AccountSummary.java:404)
at touchtone.jwintouch.AccountSummary.<init>(AccountSummary.java:109)
at touchtone.jwintouch.AccountSummarySubMDI.<init>(AccountSummarySubMDI.java:92)
at touchtone.jwintouch.AccountSummarySubMDI.<init>(AccountSummarySubMDI.java:75)
at touchtone.jwintouch.AccountSearch.showResult(AccountSearch.java:74)
at touchtone.jwintouch.ACSearch.finished(ACSearch.java:86)
at touchtone.jwintouch.SwingWorker$1.run(SwingWorker.java:46)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
 Item #11
Exception occurred during event dispatching:
java.lang.IllegalArgumentException: Illegal Load: 0.75
at java.util.Hashtable.<init>(Unknown Source)
at java.util.Hashtable.<init>(Unknown Source)
at javax.swing.text.AbstractDocument.getDocumentProperties(Unknown Source)
at javax.swing.text.AbstractDocument.putProperty(Unknown Source)
at javax.swing.text.AbstractDocument.<init>(Unknown Source)
at javax.swing.text.DefaultStyledDocument.<init>(Unknown Source)
at javax.swing.text.DefaultStyledDocument.<init>(Unknown Source)
at javax.swing.text.StyledEditorKit.createDefaultDocument(Unknown Source)
at javax.swing.JEditorPane.setEditorKit(Unknown Source)
at javax.swing.JTextPane.setEditorKit(Unknown Source)
at javax.swing.JTextPane.<init>(Unknown Source)
at touchtone.jwintouch.chat.XChannelWindow.<init>(XChannelWindow.java:22)
at touchtone.jwintouch.chat.XChatApp.onChannelJoin(XChatApp.java:409)
at org.relayirc.chatengine.ChatEngine$3.notify(ChatEngine.java:308)
at org.relayirc.chatengine.ChatEngine.notifyListeners(ChatEngine.java:115)
at org.relayirc.chatengine.ChatEngine.sendJoin(ChatEngine.java:307)
at
touchtone.jwintouch.chat.XChatApp$EnterMyChannelAction.actionPerformed(XChatApp.
java:661)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown
Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
t javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown
Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)



Exception occurred during event dispatching:
java.lang.IllegalArgumentException: Illegal Load: 0.75
at java.util.Hashtable.<init>(Unknown Source)
at java.util.Hashtable.<init>(Unknown Source)
at javax.swing.text.SimpleAttributeSet.<init>(Unknown Source)
at javax.swing.text.AbstractDocument$BidiElement.<init>(Unknown Source)
at javax.swing.text.AbstractDocument.<init>(Unknown Source)
at javax.swing.text.AbstractDocument.<init>(Unknown Source)
at javax.swing.text.PlainDocument.<init>(Unknown Source)
at javax.swing.text.PlainDocument.<init>(Unknown Source)
at javax.swing.text.DefaultEditorKit.createDefaultDocument(Unknown Source)
at javax.swing.plaf.basic.BasicTextUI.installUI(Unknown Source)
at javax.swing.JComponent.setUI(Unknown Source)
at javax.swing.text.JTextComponent.setUI(Unknown Source)
at javax.swing.text.JTextComponent.updateUI(Unknown Source)
at javax.swing.text.JTextComponent.<init>(Unknown Source)
at javax.swing.JTextField.<init>(Unknown Source)
at javax.swing.JTextField.<init>(Unknown Source)
at touchtone.lib.IntegerTextField.<init>(IntegerTextField.java:64)
at touchtone.lib.IntegerTextField.<init>(IntegerTextField.java:53)
at
touchtone.jwintouch.ExtendedProfile.createNStaticSDF(ExtendedProfile.java:294)
at touchtone.jwintouch.ExtendedProfile.<init>(ExtendedProfile.java:84)
at
touchtone.jwintouch.ExtendedProfileListing.selectOrAdd(ExtendedProfileListing.ja
va:126)
at
touchtone.jwintouch.ExtendedProfileListing.select(ExtendedProfileListing.java:14
1)
at
touchtone.jwintouch.ExtendedProfileListing.actionPerformed(ExtendedProfileListin
g.java:76)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown
Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)



 Exception occurred during event dispatching:
java.lang.IllegalArgumentException: Illegal Load factor: 0.75
at java.util.HashMap.<init>(Unknown Source)
at java.util.HashMap.<init>(Unknown Source)
at touchtone.jwintouch.MDIKernel.<init>(MDIKernel.java:89)
at touchtone.jwintouch.chat.XChatApp.<init>(XChatApp.java:61)
at touchtone.jwintouch.chat.XChatApp.getInstance(XChatApp.java:39)
at touchtone.jwintouch.chat.XChatRunner.getChatApp(XChatRunner.java:15)
at touchtone.jwintouch.chat.XChatRunner.startChat(XChatRunner.java:22)
at
touchtone.jwintouch.JWintouch$JWintouchAction.actionPerformed(JWintouch.java:287
)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown
Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at  java.awt.EventDispatchThread.run(Unknown Source)




Exception occurred during event dispatching:
java.lang.IllegalArgumentException: Illegal Load: 0.75
at java.util.Hashtable.<init>(Unknown Source)
at java.util.Hashtable.<init>(Unknown Source)
at javax.swing.JComponent.getClientProperties(Unknown Source)
at javax.swing.JComponent.putClientProperty(Unknown Source)
at javax.swing.JComponent.registerWithKeyboardManager(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at javax.swing.JRootPane.addNotify(Unknown Source)
at java.awt.Container.addNotify(Unknown Source)
at javax.swing.JComponent.addNotify(Unknown Source)
at java.awt.Container.addImpl(Unknown Source)
at javax.swing.JLayeredPane.addImpl(Unknown Source)
at java.awt.Container.add(Unknown Source)
at touchtone.jwintouch.JWintouchUtil.show(JWintouchUtil.java:1031)
at touchtone.jwintouch.JWintouchUtil.show(JWintouchUtil.java:1022)
at touchtone.jwintouch.chat.XChatApp.onChannelJoin(XChatApp.java:409)
at org.relayirc.chatengine.ChatEngine$2.notify(ChatEngine.java:279)
at org.relayirc.chatengine.ChatEngine.notifyListeners(ChatEngine.java:115)
at org.relayirc.chatengine.ChatEngine.sendJoin(ChatEngine.java:277)
at org.relayirc.chatengine.ChatEngine.sendJoin(ChatEngine.java:314)
at
touchtone.jwintouch.chat.XChatApp$EnterMyChannelAction.actionPerformed(XChatApp.
java:661)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown
Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at
javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown
Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Comp
onent.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
att java.awt.EventDispatchThread.run(Unknown Source)
(Review ID: 104316) 
======================================================================
Posted Date : 2005-07-22 03:26:06.0
Work Around




None
======================================================================
Evaluation
It would appear that Float.isNaN is not working properly on the architecture in question ("Certain PCs, Compaq Presarios 2266").  We may have difficulty reproducing this bug in house due to its platform-specific nature.

  xxxxx@xxxxx   2000-05-04


Robert, this bug is easily reproducible with the 4342163 in -Xcomp mode.
Comments
  
  Include a link with my name & email   

Submitted On 12-JUN-2000
McLennanN
This bug also existed in all versions of JDK/JRE 1.2 on 
Windows NT.


Submitted On 26-JUL-2000
peteC
I have found code running on Cyrix CPUs will encounter this
bug much more often than code running on other CPUs.  I have
a Cyrix 6x86MX that is used for testing which fails quite
often because of this bug.  However I have only begun after
I made the move to 1.3 on windows.

The poor quality of the Cyrix FPUs has been discussed in
newsgroups and forums across the net for some time so its
not surprising that they should trigger this bug.


Submitted On 16-AUG-2000
MichaelDawson
If this causes problems with your processor the only option 
is to remove the code that throws the exception.  Rem (//) 
out the throw statement and add a System.out.println(); 
call in it's place.  Then recompile and place in rt.jar.  
There appear to be problems with serialization.


Submitted On 04-JAN-2001
TorreC
It looks like this bug is showing up using JRE 1.3 on a Power 
Mac G4 running Virtual PC 4.0 (Windows 98).


Submitted On 03-FEB-2001
LeidelJ
This bug also exists on JDK 1.3 on 
Windows 95 with Cyrix 6X86MX.


Submitted On 06-FEB-2001
adolos
This also occurs running JRE 1.3 under Windows 2000 
on Virtual PC 4 on Macintosh.


Submitted On 12-FEB-2001
BerndPross
I encounter this Bug starting Forte on NT 4.0 with a cyric 
Processor. Is there any work around to start Forte 
propperly ?
Thanks for any hint.

Bernd


Submitted On 14-FEB-2001
TorreC
JRE 1.3.1 (beta) on my Mac G4 with Virtual PC 4.01 running 
Windows 98: no longer throws the exception on the applet that 
used to always crash with JRE 1.3.01. I did not see in the 
release notes that this bug was addressed in that (beta) 
release, but I am not complaining. I would be interested to 
see if anyone else has a similar experience.


Submitted On 22-FEB-2001
ScottEllsworth
1.3.1 beta did not help this problem for me on my Powerbook 
G4 with vpc.  I have sent the issue to Connectix, but I do 
not know what to do about it.

Any other suggestions?


Submitted On 11-MAR-2001
Hypnus
This bug occurs on my iMac G3 (384Mb RAM, 500Mhz) 
with VPC 4.0 Win98 and Forte for Java 1.0 (CE). Using 
the JDK 1.3.1 beta allows Forte to start up, but the 
control pallet is not initialised and the menus do not 
react.

Can anyone help?


Submitted On 16-SEP-2001
vy_ho
I have a Cyrix II 333 Mhz, and this problem crops up all 
them time.  I was searching desparately for a Cyrix fix.  
However, they were sold to Via, and Via has one of the 
worst customer support web site I've seen from a world 
class company.  I wonder if any of you know a fix any where 
please let me know.  Also, because my other application 
runs fine with this processor (I think so), only Java does 
not.  I wonder if it has something to do with Sun's 
implementation.  (My email is: st946tbf@drexel.edu)


Submitted On 01-OCT-2001
matthew22
I am experiencing this problem, when running deploytool in 
J2EE 1.3 with J2SE 1.3.1_01 on W2k(SP2). Is anybody in the 
Sun doing about this something?

matthew@centrum.sk


Submitted On 01-OCT-2002
vy_ho
Same problem on the HashMap, my work around is around line
163 of jdk1.4.1, I put:
if ((loadFactor <= 0) || (loadFactor > 1)){
            //throw new IllegalArgumentException("Illegal
load factor: " +
                                               loadFactor);//
			loadFactor = 0.75;
		}



PLEASE NOTE: JDK6 is formerly known as Project Mustang