java.lang.IllegalArgumentException: Capacity: -2147483647

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • IllegalArgumentException: Capacity error
    via Stack Overflow by Leggit
    ,
  • Limiting the max size of a HashMap in Java
    via Stack Overflow by andandandand
    ,
  • Minecraft Server stürzt ständig ab. (Plugin)
    via by Unknown author,
  • An overflow bug exists in PhysicalStateClassLoader#createGetObjectReferencesMethod (line 551). When the number of fields in a managed object is sufficiently large, the generated getObjectReferences() method attempts to invoke the HashSet constructor with an overflowed byte value. This results in a server crash when retrieval of the managed object is attempted. java.lang.IllegalArgumentException: Illegal initial capacity: -128 at java.util.HashMap.<init>(HashMap.java:172) at java.util.HashMap.<init>(HashMap.java:199) at java.util.HashSet.<init>(HashSet.java:125) at com.tc.state.idx1.ObjectWithFields_V1.getObjectReferences(Unknown Source) at com.tc.objectserver.managedobject.PhysicalManagedObjectState.addObjectReferencesTo(PhysicalManagedObjectState.java:112) at com.tc.objectserver.managedobject.ManagedObjectImpl.addObjectReferencesTo(ManagedObjectImpl.java:146) at com.tc.objectserver.managedobject.ManagedObjectTraverser.markProcessed(ManagedObjectTraverser.java:42) at com.tc.objectserver.managedobject.ManagedObjectTraverser.traverse(ManagedObjectTraverser.java:33) at com.tc.objectserver.impl.ObjectManagerImpl.addReachableObjectsIfNecessary(ObjectManagerImpl.java:521) at com.tc.objectserver.impl.ObjectManagerImpl.basicLookupObjectsFor(ObjectManagerImpl.java:497) at com.tc.objectserver.impl.ObjectManagerImpl.lookupObjectsForOptionallyCreate(ObjectManagerImpl.java:196) at com.tc.objectserver.impl.ObjectManagerImpl.lookupObjectsAndSubObjectsFor(ObjectManagerImpl.java:180) at com.tc.objectserver.impl.ObjectRequestManagerImpl.basicRequestObjects(ObjectRequestManagerImpl.java:119) at com.tc.objectserver.impl.ObjectRequestManagerImpl.splitAndRequestObjects(ObjectRequestManagerImpl.java:98) at com.tc.objectserver.impl.ObjectRequestManagerImpl.requestObjects(ObjectRequestManagerImpl.java:85) at com.tc.objectserver.impl.ObjectRequestManagerRestartImpl.requestObjects(ObjectRequestManagerRestartImpl.java:118) at com.tc.objectserver.handler.ManagedObjectRequestHandler.handleEventFromClient(ManagedObjectRequestHandler.java:93) at com.tc.objectserver.handler.ManagedObjectRequestHandler.handleEvent(ManagedObjectRequestHandler.java:52) at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:142)
    via by Jeffrey Samarziya,
  • Saw this on one of the logs: {code} java.lang.IllegalArgumentException: Illegal initial capacity: -1 at java.util.HashMap.<init>(HashMap.java:172) at java.util.HashMap.<init>(HashMap.java:199) at com.aptana.internal.index.core.DiskIndex.readCategoryTable(DiskIndex.java:1101) at com.aptana.internal.index.core.DiskIndex.mergeCategory(DiskIndex.java:795) at com.aptana.internal.index.core.DiskIndex.mergeCategories(DiskIndex.java:768) at com.aptana.internal.index.core.DiskIndex.mergeWith(DiskIndex.java:929) at com.aptana.index.core.Index.save(Index.java:698) at com.aptana.index.core.Index.save(Index.java:671) at com.aptana.core.internal.build.IndexBuildParticipant.buildEnding(IndexBuildParticipant.java:66) at com.aptana.core.internal.build.LazyBuildParticipant.buildEnding(LazyBuildParticipant.java:67) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.runParticipants(CommonReconcilingStrategy.java:341) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:277) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.reconcile(CommonReconcilingStrategy.java:235) at com.aptana.editor.common.text.reconciler.CommonReconcilingStrategy.fullReconcile(CommonReconcilingStrategy.java:477) at com.aptana.editor.common.text.reconciler.CompositeReconcilingStrategy.fullReconcile(CompositeReconcilingStrategy.java:125) at com.aptana.editor.common.text.reconciler.CommonReconciler.process(CommonReconciler.java:162) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206) {code}
    via by Shalom Gibly,
  • An overflow bug exists in PhysicalStateClassLoader#createGetObjectReferencesMethod (line 551). When the number of fields in a managed object is sufficiently large, the generated getObjectReferences() method attempts to invoke the HashSet constructor with an overflowed byte value. This results in a server crash when retrieval of the managed object is attempted. java.lang.IllegalArgumentException: Illegal initial capacity: -128 at java.util.HashMap.<init>(HashMap.java:172) at java.util.HashMap.<init>(HashMap.java:199) at java.util.HashSet.<init>(HashSet.java:125) at com.tc.state.idx1.ObjectWithFields_V1.getObjectReferences(Unknown Source) at com.tc.objectserver.managedobject.PhysicalManagedObjectState.addObjectReferencesTo(PhysicalManagedObjectState.java:112) at com.tc.objectserver.managedobject.ManagedObjectImpl.addObjectReferencesTo(ManagedObjectImpl.java:146) at com.tc.objectserver.managedobject.ManagedObjectTraverser.markProcessed(ManagedObjectTraverser.java:42) at com.tc.objectserver.managedobject.ManagedObjectTraverser.traverse(ManagedObjectTraverser.java:33) at com.tc.objectserver.impl.ObjectManagerImpl.addReachableObjectsIfNecessary(ObjectManagerImpl.java:521) at com.tc.objectserver.impl.ObjectManagerImpl.basicLookupObjectsFor(ObjectManagerImpl.java:497) at com.tc.objectserver.impl.ObjectManagerImpl.lookupObjectsForOptionallyCreate(ObjectManagerImpl.java:196) at com.tc.objectserver.impl.ObjectManagerImpl.lookupObjectsAndSubObjectsFor(ObjectManagerImpl.java:180) at com.tc.objectserver.impl.ObjectRequestManagerImpl.basicRequestObjects(ObjectRequestManagerImpl.java:119) at com.tc.objectserver.impl.ObjectRequestManagerImpl.splitAndRequestObjects(ObjectRequestManagerImpl.java:98) at com.tc.objectserver.impl.ObjectRequestManagerImpl.requestObjects(ObjectRequestManagerImpl.java:85) at com.tc.objectserver.impl.ObjectRequestManagerRestartImpl.requestObjects(ObjectRequestManagerRestartImpl.java:118) at com.tc.objectserver.handler.ManagedObjectRequestHandler.handleEventFromClient(ManagedObjectRequestHandler.java:93) at com.tc.objectserver.handler.ManagedObjectRequestHandler.handleEvent(ManagedObjectRequestHandler.java:52) at com.tc.async.impl.StageImpl$WorkerThread.run(StageImpl.java:142)
    via by Jeffrey Samarziya,
    • java.lang.IllegalArgumentException: Capacity: -2147483647 at java.util.HashMap.<init>(HashMap.java:140) at java.util.HashMap.<init>(HashMap.java:174) at java.util.LinkedHashMap.<init>(LinkedHashMap.java:119) at java.util.LinkedHashMap.<init>(LinkedHashMap.java:97) at java.util.LinkedHashMap.<init>(LinkedHashMap.java:81) at com.jjoe64.graphview.GridLabelRenderer.adjustVertical(GridLabelRenderer.java:768) at com.jjoe64.graphview.GridLabelRenderer.adjustSteps(GridLabelRenderer.java:932) at com.jjoe64.graphview.GridLabelRenderer.draw(GridLabelRenderer.java:1067) at com.jjoe64.graphview.GraphView.drawGraphElements(GraphView.java:299) at com.jjoe64.graphview.GridLabelRenderer.draw(GridLabelRenderer.java:1062) at com.jjoe64.graphview.GraphView.drawGraphElements(GraphView.java:299) at com.jjoe64.graphview.GraphView.onDraw(GraphView.java:323) at android.view.View.draw(View.java:16302) at android.view.View.updateDisplayListIfDirty(View.java:15284) at android.view.View.draw(View.java:16072) at android.view.ViewGroup.drawChild(ViewGroup.java:3622) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409) at android.view.View.draw(View.java:16305) at android.view.View.updateDisplayListIfDirty(View.java:15284) at android.view.View.draw(View.java:16072) at android.view.ViewGroup.drawChild(ViewGroup.java:3622) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409) at android.view.View.updateDisplayListIfDirty(View.java:15279) at android.view.View.draw(View.java:16072) at android.view.ViewGroup.drawChild(ViewGroup.java:3622) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409) at android.view.View.updateDisplayListIfDirty(View.java:15279) at android.view.View.draw(View.java:16072) at android.view.ViewGroup.drawChild(ViewGroup.java:3622) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3409) at android.view.View.draw(View.java:16305) at com.android.internal.policy.PhoneWindow$DecorView.draw(PhoneWindow.java:2760) at android.view.View.updateDisplayListIfDirty(View.java:15284) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:295) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:301) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:345) at android.view.ViewRootImpl.draw(ViewRootImpl.java:2686) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2495) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2120) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1138) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6227) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:884) at android.view.Choreographer.doCallbacks(Choreographer.java:696) at android.view.Choreographer.doFrame(Choreographer.java:631) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:870) at android.os.Handler.handleCallback(Handler.java:743) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:150) at android.app.ActivityThread.main(ActivityThread.java:5546) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)
    No Bugmate found.