pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandro Martini <sandro.mart...@gmail.com>
Subject Re: Launching application from SBT.
Date Wed, 19 Dec 2012 10:57:03 GMT
Hi Mustafa,
welcome to Pivot ...

> java.lang.IllegalStateException: this method can only be called from the AWT
> event dispatch thread, and not from "run-main"
> at org.apache.pivot.wtk.Container$1.check(Container.java:949)
> at
> org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:957)
> ...

> Could have to do with the way SBT forks the JVM to launch an application,
> but still - not entirely certain.
> Don't see this if I create a launcher script to launch the application.
> However, I still feel that it might have something to do with the way pivot
> determines the thread context.
>
you have reason, and this is due to a feature added in 2.0 (or 2.0.1
if I remember well) to ensure that code is run in the right thread
(some in the EDT and other not in the EDT).

The same problem happen if you run a Pivot project done with maven
(for example using our archetype under apache-extras).
Some related info here (I have to remember to update even this to
Pivot-2.0.3 after released):
http://apache-pivot-users.399431.n3.nabble.com/Pivot-Quickstart-Maven-archetype-updated-to-Pivot-2-0-1-td3675416.html


> Just want to know if this is a bug/known bug or a feature & will need to be worked
around.
probably we should find a way to let common build tools like maven,
sbt and gradle to bypass (or white-list related launchers) this check
(if possible).
To not forget it, could you create a JIRA issue for this ?

Last, could you attach in the issue (and/or here) a minimal sample sbt
project to simplify my tests ? This would be a great speedup for my
tests ...

Thanks a lot.

Bye,
Sandro

Mime
View raw message