Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalArgException when using SwingScheduler #1193

Closed
epb-644 opened this issue May 12, 2014 · 3 comments
Closed

IllegalArgException when using SwingScheduler #1193

epb-644 opened this issue May 12, 2014 · 3 comments

Comments

@epb-644
Copy link

epb-644 commented May 12, 2014

I occasionally get this exception when using rx for Swing tasks. I'm not specifically using the SwingScheduler, so I assume it's being used automatically?

Not sure if it's relevant, but I currently have one observable using a delay of 20ms.

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: The swing timer only accepts non-negative delays up to 2147483647 milliseconds.
at rx.schedulers.SwingScheduler.assertThatTheDelayIsValidForTheSwingTimer(SwingScheduler.java:139)
at rx.schedulers.SwingScheduler.access$100(SwingScheduler.java:36)
at rx.schedulers.SwingScheduler$InnerSwingScheduler.schedule(SwingScheduler.java:68)
at rx.Scheduler$Worker$1.call(Scheduler.java:110)
at rx.schedulers.SwingScheduler$InnerSwingScheduler$1ExecuteOnceAction.actionPerformed(SwingScheduler.java:83)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:714)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

@akarnokd
Copy link
Member

Do you have any periodic tasks, i.e., using schedulePeriodic somewhere?

@epb-644
Copy link
Author

epb-644 commented May 12, 2014

I had a "delay" in there, but no periodic tasks.

@benjchristensen
Copy link
Member

I believe #1195 fixed this. Please re-open if it is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants