strange stack trace in idea.log

Since a few eaps i'm seeing this in idea.log

2008-10-15 13:30:53,328 WARN - tellij.ide.HackyRepaintManager - Access to realized (ever shown) UI components should be done only from the AWT event dispatch thread, revalidate(), invalidate() & repaint() is ok from any thread
java.lang.Exception
at com.intellij.ide.IdeRepaintManager.a(IdeRepaintManager.java:32)
at com.intellij.ide.IdeRepaintManager.addDirtyRegion(IdeRepaintManager.java:2)
at javax.swing.JComponent.repaint(JComponent.java:4732)
at java.awt.Component.repaint(Component.java:2927)
at javax.swing.JLabel.setText(JLabel.java:326)
at org.intellij.vcs.mks.MKSChangeProvider.setStatusInfo(MKSChangeProvider.java:428)
at org.intellij.vcs.mks.MKSChangeProvider.getChanges(MKSChangeProvider.java:92)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.a(ChangeListManagerImpl.java:156)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.a(ChangeListManagerImpl.java:61)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl.access$500(ChangeListManagerImpl.java:163)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl$ActualUpdater.consume(ChangeListManagerImpl.java:5)
at com.intellij.openapi.vcs.changes.ChangeListManagerImpl$ActualUpdater.consume(ChangeListManagerImpl.java:2)
at com.intellij.openapi.vcs.changes.UpdateRequestsQueue$MyRunnable.run(UpdateRequestsQueue.java:29)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)


What's strange is that according to the stack trace, the method being called is indeed Component.repaint, thus, I don't understand the message. Is this just an information message ?

4 comments
Comment actions Permalink

Hello Thibaut,

No, this is not just an information message, this indicates a bug in your
plugin. You're calling JLabel.setText(), a Swing method, from a thread other
than the event dispatch thread. You need to wrap the call in invokeLater().

Since a few eaps i'm seeing this in idea.log

2008-10-15 13:30:53,328 WARN -
tellij.ide.HackyRepaintManager - Access to realized (ever shown) UI
components should be done only from the AWT event dispatch thread,
revalidate(), invalidate() & repaint() is ok from any thread
java.lang.Exception
at com.intellij.ide.IdeRepaintManager.a(IdeRepaintManager.java:32)
at
com.intellij.ide.IdeRepaintManager.addDirtyRegion(IdeRepaintManager.ja
va:2)
at javax.swing.JComponent.repaint(JComponent.java:4732)
at java.awt.Component.repaint(Component.java:2927)
at javax.swing.JLabel.setText(JLabel.java:326)
at
org.intellij.vcs.mks.MKSChangeProvider.setStatusInfo(MKSChangeProvider
.java:428)
at
org.intellij.vcs.mks.MKSChangeProvider.getChanges(MKSChangeProvider.ja
va:92)
at
com.intellij.openapi.vcs.changes.ChangeListManagerImpl.a(ChangeListMan
agerImpl.java:156)
at
com.intellij.openapi.vcs.changes.ChangeListManagerImpl.a(ChangeListMan
agerImpl.java:61)
at
com.intellij.openapi.vcs.changes.ChangeListManagerImpl.access$500(Chan
geListManagerImpl.java:163)
at
com.intellij.openapi.vcs.changes.ChangeListManagerImpl$ActualUpdater.c
onsume(ChangeListManagerImpl.java:5)
at
com.intellij.openapi.vcs.changes.ChangeListManagerImpl$ActualUpdater.c
onsume(ChangeListManagerImpl.java:2)
at
com.intellij.openapi.vcs.changes.UpdateRequestsQueue$MyRunnable.run(Up
dateRequestsQueue.java:29)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441
)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.a
ccess$301(ScheduledThreadPoolExecutor.java:98)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.r
un(ScheduledThreadPoolExecutor.java:207)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
tor.java:885)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:907)
at java.lang.Thread.run(Thread.java:619)
What's strange is that according to the stack trace, the method being
called is indeed Component.repaint, thus, I don't understand the
message. Is this just an information message ?

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

I can understand that, however
- I do not understand that part of hte message : "revalidate(), invalidate() & repaint() is ok from any thread"
- this is new right ? i had never seen this before 8890, and the text I was setting using that setText method has always been displayed correctly.

I'll modify this anyway but I'm trying to understand


edit : just to be sure, i just tested using IDEA 7, and indeed I can't see any message like this, nor is anything unexpected happening

Edited by: Thibaut on Oct 15, 2008 4:40 PM

0
Comment actions Permalink

Hello Thibaut,

I can understand that, however

- I do not understand that part of hte message : "revalidate(),
invalidate() & repaint() is ok from any thread"


If you're calling specifically these methods, you're allowed to call them
from any thread.

- this is new right ? i had never seen this before 8890, and the text
I was setting using that setText method has always been displayed
correctly.


The rule has been there forever, and it's defined by Sun, not by us. The
check enforcing that rule in our code is indeed new.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

thanks for clarifying

0

Please sign in to leave a comment.