Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

UiThreadingViolationException after start #473

Closed
kparal opened this issue May 24, 2015 · 11 comments
Closed

UiThreadingViolationException after start #473

kparal opened this issue May 24, 2015 · 11 comments

Comments

@kparal
Copy link
Owner

kparal commented May 24, 2015

What steps will reproduce the problem?
1. start of programm
2.
3.

What is the expected output? What do you see instead?

See below...

What version of Esmska are you using? On what operating system?

Version 1.4, Linux Mint 13 Mate

If you have problem with a gateway, what its exact name and version is?
(see gateway tooltip)


Please provide any additional information below.

org.pushingpixels.substance.api.UiThreadingViolationException: Component state change
must be done on Event Dispatch Thread
    at org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities.testComponentStateChangeThreadingViolation(SubstanceCoreUtilities.java:1939)
    at org.pushingpixels.substance.internal.ui.SubstanceProgressBarUI$SubstanceChangeListener.stateChanged(SubstanceProgressBarUI.java:86)
    at javax.swing.JProgressBar.fireStateChanged(JProgressBar.java:730)
    at javax.swing.JProgressBar$ModelListener.stateChanged(JProgressBar.java:652)
    at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:365)
    at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:302)
    at javax.swing.DefaultBoundedRangeModel.setMaximum(DefaultBoundedRangeModel.java:219)
    at javax.swing.JProgressBar.setMaximum(JProgressBar.java:899)
    at esmska.gui.SMSPanel.updateProgressBars(SMSPanel.java:341)
    at esmska.gui.SMSPanel.access$3000(SMSPanel.java:94)
    at esmska.gui.SMSPanel$SMSTextPaneDocumentFilter.updateUI(SMSPanel.java:969)
    at esmska.gui.SMSPanel$SMSTextPaneDocumentFilter.access$2500(SMSPanel.java:924)
    at esmska.gui.SMSPanel$SMSTextPaneDocumentFilter$1.actionPerformed(SMSPanel.java:933)
    at javax.swing.Timer.fireActionPerformed(Timer.java:313)
    at javax.swing.Timer$DoPostEvent.run(Timer.java:244)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
    at java.awt.EventQueue.access$300(EventQueue.java:96)
    at java.awt.EventQueue$2.run(EventQueue.java:634)
    at java.awt.EventQueue$2.run(EventQueue.java:632)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:108)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)


Original issue reported on code.google.com by jklimosz on 2013-08-20 18:20:01

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

> Component state change must be done on Event Dispatch Thread

Hmm, that doesn't sound right. I'm using a standard javax.swing.Timer, and the documentation
says:

"
Although all Timers perform their waiting using a single, shared thread (created by
the first Timer object that executes), the action event handlers for Timers execute
on another thread -- the event-dispatching thread. This means that the action handlers
for Timers can safely perform operations on Swing components. However, it also means
that the handlers must execute quickly to keep the GUI responsive.
"

I have never seen this error. Do you get it always when you start the program, or just
sometimes? How often?

Does it happen if you change your program look to System or Multiplatform?

Original issue reported on code.google.com by kamil.paral on 2013-08-21 17:52:40

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

I have never seen this error. Do you get it always when you start the program, or just
sometimes? How often?
- Everytime if program is started...

Does it happen if you change your program look to System or Multiplatform?
- No, only if Substance is set (looks best on my screen). Sorry, I had not tried other
settings. Now I am using Multiplatform without problems. Thanks for solution and regards.

Original issue reported on code.google.com by jklimosz on 2013-08-21 20:25:34

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

What Java do you use? Please run "java -version" and paste the output here.

Original issue reported on code.google.com by kamil.paral on 2013-08-21 20:54:04

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

java version "1.6.0_27"
OpenJDK Runtime Environment (IcedTea6 1.12.6) (6b27-1.12.6-1ubuntu0.12.04.2)
OpenJDK Server VM (build 20.0-b12, mixed mode)

Original issue reported on code.google.com by jklimosz on 2013-08-22 05:37:54

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

I reproduced the issue, it occurs just with Java 6. Java 7 works well. If you installed
from a repository:
https://code.google.com/p/esmska/wiki/Download?tm=2#Ubuntu
then just update esmska package and you should get Java 7 (and I suppose it's going
to set itself as the default java in system, or you can use update-java-alternatives
command).

Let me know if it doesn't help.

Original issue reported on code.google.com by kamil.paral on 2013-08-24 16:02:52

  • Labels added: OpSys-Linux

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

I'm sorry, the upgrade does not install Java 7 as default on my system. Update-java-alternatives
also does not make any change and problem (of course) persists. I'll look how to upgrade
my Java installation to version 7.

Original issue reported on code.google.com by jklimosz on 2013-08-26 06:42:08

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

Probably the best and simplest way:
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
and esmska works perfectly with Substance appearance.
Thanks!

Original issue reported on code.google.com by jklimosz on 2013-08-26 07:12:14

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

No, I strongly recommend to use OpenJDK Java, and not Oracle Java.

If you provide some information, I can try to help you. What does

update-java-alternatives -l

print? Do you have openjdk-7-jre package installed?

Original issue reported on code.google.com by kamil.paral on 2013-08-26 12:43:33

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

 # update-java-alternatives -l
java-1.6.0-openjdk-i386 1061 /usr/lib/jvm/java-1.6.0-openjdk-i386
java-1.7.0-openjdk-i386 1051 /usr/lib/jvm/java-1.7.0-openjdk-i386
java-7-oracle 1062 /usr/lib/jvm/java-7-oracle
----
just now...

Original issue reported on code.google.com by jklimosz on 2013-08-26 12:52:59

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

See, you _have_ OpenJDK 7 installed. You just need to set it as the default one:

$ sudo update-java-alternatives -s java-1.7.0-openjdk-i386

I recommend you to uninstall Oracle Java, it's very dangerous.

Original issue reported on code.google.com by kamil.paral on 2013-08-27 12:57:00

@kparal
Copy link
Owner Author

kparal commented May 24, 2015

Thanks Kamil for help. Now:

$ java -version
java version "1.7.0_25"
OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
OpenJDK Server VM (build 23.7-b01, mixed mode)

and all is OK.

Original issue reported on code.google.com by jklimosz on 2013-08-28 07:32:20

@kparal kparal closed this as completed May 24, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant