You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Piotr Kołaczkowski (JIRA)" <ji...@apache.org> on 2011/07/30 13:41:09 UTC
[jira] [Created] (PIVOT-780) Can't use BXMLSerializer from non-AWT
threads makes background resource loading impossible
Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
------------------------------------------------------------------------------------------
Key: PIVOT-780
URL: https://issues.apache.org/jira/browse/PIVOT-780
Project: Pivot
Issue Type: Bug
Components: core-beans, wtk
Affects Versions: 2.0.1
Reporter: Piotr Kołaczkowski
Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
<code>
An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
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.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
at org.apache.pivot.wtk.Container$1.run(Container.java:864)
at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
at org.apache.pivot.wtk.Window.<init>(Window.java:453)
at org.apache.pivot.wtk.Window.<init>(Window.java:448)
at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
... 11 more
</code>
Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
Re: [jira] [Issue Comment Edited] (PIVOT-780) Can't use
BXMLSerializer from non-AWT threads makes background resource loading impossible
Posted by Chris Bartlett <cb...@gmail.com>.
Noel - Any comments?
Is this something that has to be enforced perhaps to remove the
possibility of deadlocks? Or is it a warning that could be sent to
syserr or something?
On 31 July 2011 07:20, Chris Bartlett (JIRA) <ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073269#comment-13073269 ]
>
> Chris Bartlett edited comment on PIVOT-780 at 7/31/11 12:18 AM:
> ----------------------------------------------------------------
>
> This sounds like it is related to PIVOT-740 / r1101054
> http://svn.apache.org/viewvc?view=revision&revision=1101054
>
> was (Author: cbartlett):
> This sounds like it is related to PIVOT-740 / r1101054
>
>> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
>> ------------------------------------------------------------------------------------------
>>
>> Key: PIVOT-780
>> URL: https://issues.apache.org/jira/browse/PIVOT-780
>> Project: Pivot
>> Issue Type: Bug
>> Components: core-beans, wtk
>> Affects Versions: 2.0.1
>> Reporter: Piotr Kołaczkowski
>> Labels: background, initialization, thread
>>
>> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
>> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
>> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
>> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
>> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
>> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
>> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
>> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
>> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
>> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
>> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
>> 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.lang.Thread.run(Thread.java:662)
>> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
>> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
>> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
>> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
>> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
>> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
>> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
>> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
>> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
>> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
>> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
>> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>> at java.lang.Class.newInstance0(Class.java:355)
>> at java.lang.Class.newInstance(Class.java:308)
>> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
>> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
>> ... 11 more
>> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
>> Doing this in AWT thread, blocks what is currently displayed.
>
> --
> This message is automatically generated by JIRA.
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073517#comment-13073517 ]
Greg Brown commented on PIVOT-780:
----------------------------------
Wasn't there some discussion about allowing a caller to disable these EDT checks?
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Chris Bartlett (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073269#comment-13073269 ]
Chris Bartlett commented on PIVOT-780:
--------------------------------------
This sounds like it is related to PIVOT-740 / r1101054
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (PIVOT-780) Can't use BXMLSerializer
from non-AWT threads makes background resource loading impossible
Posted by "Chris Bartlett (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073269#comment-13073269 ]
Chris Bartlett edited comment on PIVOT-780 at 7/31/11 12:18 AM:
----------------------------------------------------------------
This sounds like it is related to PIVOT-740 / r1101054
http://svn.apache.org/viewvc?view=revision&revision=1101054
was (Author: cbartlett):
This sounds like it is related to PIVOT-740 / r1101054
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Noel Grandin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079359#comment-13079359 ]
Noel Grandin commented on PIVOT-780:
------------------------------------
Checked in a fix in rev 1153866
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Chris Bartlett (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080806#comment-13080806 ]
Chris Bartlett commented on PIVOT-780:
--------------------------------------
I haven't had a chance to test this yet. Perhaps Piotr or others have?
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Noel Grandin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073612#comment-13073612 ]
Noel Grandin commented on PIVOT-780:
------------------------------------
We could weaken the check so that it reads like this:
if (the component is attached to a Display
AND this thread is not the event dispatch thread)
{
throw exception
}
that would allow background loading, whilst still catching problems with modifying currently "live" components from outside the EDT.
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (PIVOT-780) Can't use BXMLSerializer from non-AWT
threads makes background resource loading impossible
Posted by "Piotr Kołaczkowski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Piotr Kołaczkowski updated PIVOT-780:
-------------------------------------
Description:
Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
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.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
at org.apache.pivot.wtk.Container$1.run(Container.java:864)
at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
at org.apache.pivot.wtk.Window.<init>(Window.java:453)
at org.apache.pivot.wtk.Window.<init>(Window.java:448)
at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
... 11 more
Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
Doing this in AWT thread, blocks what is currently displayed.
was:
Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
<code>
An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
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.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
at org.apache.pivot.wtk.Container$1.run(Container.java:864)
at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
at org.apache.pivot.wtk.Window.<init>(Window.java:453)
at org.apache.pivot.wtk.Window.<init>(Window.java:448)
at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
... 11 more
</code>
Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
Doing this in AWT thread, blocks what is currently displayed.
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (PIVOT-780) Can't use BXMLSerializer from non-AWT
threads makes background resource loading impossible
Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sandro Martini updated PIVOT-780:
---------------------------------
Fix Version/s: 2.0.1
We have to verify what to do with this (fix or if won't fix), and if fix in 2.0.1 or in 2.1 (maybe providing an extension of BXMLSerializer for handling this).
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073520#comment-13073520 ]
Sandro Martini commented on PIVOT-780:
--------------------------------------
>Wasn't there some discussion about allowing a caller to disable these EDT checks?
Yes, and should be this issue (already closed for 2.0.1): https://issues.apache.org/jira/browse/PIVOT-747
maybe Noel can have more info.
But I'd like to have a way (or a flag or something other) to turn this off (default on) in BXMLSerializer, what do you think ?
Bye
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Chris Bartlett (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079276#comment-13079276 ]
Chris Bartlett commented on PIVOT-780:
--------------------------------------
Noel - The Display check sounds good to me, but as mentioned elsewhere I would prefer the check to be optional if it makes sense.
Is the purpose to prevent threading issues like deadlocks, or just to ensure that updates will be visible without an explicit repaint or some kind of layout change, or something else?
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (PIVOT-780) Can't use BXMLSerializer from non-AWT
threads makes background resource loading impossible
Posted by "Noel Grandin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Noel Grandin resolved PIVOT-780.
--------------------------------
Resolution: Fixed
Assignee: Noel Grandin
Marking this as closed for now. Can be re-opened if there is some corner case we missed.
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Assignee: Noel Grandin
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Sandro Martini (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080795#comment-13080795 ]
Sandro Martini commented on PIVOT-780:
--------------------------------------
Noel (and others),
can we mark this as resolved now ?
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Greg Brown (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073524#comment-13073524 ]
Greg Brown commented on PIVOT-780:
----------------------------------
This has nothing to do with BXMLSerializer. You'd run into the same problem if you created components programmatically on a background thread.
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (PIVOT-780) Can't use BXMLSerializer
from non-AWT threads makes background resource loading impossible
Posted by "Chris Bartlett (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079276#comment-13079276 ]
Chris Bartlett edited comment on PIVOT-780 at 8/4/11 8:50 AM:
--------------------------------------------------------------
Noel - The Display check sounds good to me, but as mentioned elsewhere I would prefer the EDT check to be optional if it makes sense.
Is the purpose to prevent threading issues like deadlocks, or just to ensure that updates will be visible without an explicit repaint or some kind of layout change, or something else?
was (Author: cbartlett):
Noel - The Display check sounds good to me, but as mentioned elsewhere I would prefer the check to be optional if it makes sense.
Is the purpose to prevent threading issues like deadlocks, or just to ensure that updates will be visible without an explicit repaint or some kind of layout change, or something else?
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIVOT-780) Can't use BXMLSerializer from
non-AWT threads makes background resource loading impossible
Posted by "Noel Grandin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIVOT-780?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13079354#comment-13079354 ]
Noel Grandin commented on PIVOT-780:
------------------------------------
Modifying any WTK object from outside the event thread could lead to data-corruption, which tends to show up as weird errors far away from the misbehaving code.
That is why we try to catch the offending code early on, to save ourselves from that debugging.
You can already override the check - see Container#setEventDispatchThreadChecker()
> Can't use BXMLSerializer from non-AWT threads makes background resource loading impossible
> ------------------------------------------------------------------------------------------
>
> Key: PIVOT-780
> URL: https://issues.apache.org/jira/browse/PIVOT-780
> Project: Pivot
> Issue Type: Bug
> Components: core-beans, wtk
> Affects Versions: 2.0.1
> Reporter: Piotr Kołaczkowski
> Labels: background, initialization, thread
> Fix For: 2.0.1
>
>
> Calling bxmlSerializer.readObject from a non-AWT thread causes the following exception:
> An error occurred at line number 5 in file /C:/Users/Piotr/Projekty/viungo/viungo-editor/target/scala_2.9.0/classes/com/viungo/editor/CircuitEditor.bxml:
> org.apache.pivot.serialization.SerializationException: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:769)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:441)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:624)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:579)
> at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:540)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:21)
> at com.viungo.editor.CircuitEditor$$anon$1.execute(CircuitEditor.scala:18)
> at org.apache.pivot.util.concurrent.Task$ExecuteCallback.run(Task.java:42)
> 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.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.IllegalStateException: this method can only be called from the AWT event dispatch thread
> at org.apache.pivot.wtk.Container$1.run(Container.java:864)
> at org.apache.pivot.wtk.Container.assertEventDispatchThread(Container.java:871)
> at org.apache.pivot.wtk.WTKListenerList.add(WTKListenerList.java:36)
> at org.apache.pivot.wtk.skin.ComponentSkin.install(ComponentSkin.java:96)
> at org.apache.pivot.wtk.skin.ContainerSkin.install(ContainerSkin.java:129)
> at org.apache.pivot.wtk.skin.WindowSkin.install(WindowSkin.java:66)
> at org.apache.pivot.wtk.Component.setSkin(Component.java:749)
> at org.apache.pivot.wtk.Component.installSkin(Component.java:812)
> at org.apache.pivot.wtk.Window.<init>(Window.java:453)
> at org.apache.pivot.wtk.Window.<init>(Window.java:448)
> at com.viungo.editor.EditorWindow.<init>(EditorWindow.scala:20)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> at java.lang.Class.newInstance0(Class.java:355)
> at java.lang.Class.newInstance(Class.java:308)
> at org.apache.pivot.beans.BXMLSerializer.newTypedObject(BXMLSerializer.java:1556)
> at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:767)
> ... 11 more
> Loading objects in background is very important, so that the user can see e.g. a progress indicator while the rest of the UI is deserialized.
> Doing this in AWT thread, blocks what is currently displayed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira