You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Sandro Martini <sa...@gmail.com> on 2010/08/18 02:25:19 UTC

application in error, but not visible

Hi to all,
during my tests on Pivot trunk (2.x), I've just seen that some of last
commits should have changed something in the way applications are
displayed, because trying to execute an application with a
not-existing colors file gives me an error (and this is ok), but now
the strange thing is that the application is still running but nothing
is displayed ... and this could give problems on end-users, before to
know that the process of the launched application has to be killed (in
eclipse it's easy, the run icon is still visible so I could make a
stop form there).
The old behavior was that the application was shown, and the best now
could be a similar behavior, but also with a modal dialog bod showing
the critical error and after pressing its Ok button, to exit.

In case would help, this is the log:

Exception in thread "main" java.lang.ExceptionInInitializerError
	at org.apache.pivot.wtk.Component.installThemeSkin(Component.java:775)
	at org.apache.pivot.wtk.Window.<init>(Window.java:444)
	at org.apache.pivot.wtk.Window.<init>(Window.java:439)
	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:1471)
	at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:698)
	at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:394)
	at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:559)
	at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:513)
	at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:479)
	at org.apache.pivot.tutorials.KitchenSink.startup(KitchenSink.java:942)
	at org.apache.pivot.wtk.DesktopApplicationContext.main(DesktopApplicationContext.java:611)
Caused by: java.lang.RuntimeException: Unable to locate color scheme
resource TerraTheme_windowsXP.json.
	at org.apache.pivot.wtk.skin.terra.TerraTheme.<init>(TerraTheme.java:192)
	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.util.Service.getProvider(Service.java:96)
	at org.apache.pivot.wtk.Theme.<clinit>(Theme.java:72)
	... 17 more

Tell me if you need more info.


What do you think ?

Bye,
Sandro

Re: application in error, but not visible

Posted by Greg Brown <gk...@mac.com>.
If you specify a non-existent color scheme file, we won't be able to display a Pivot alert dialog, because Pivot alerts need a color scheme. Other errors should display OK.

On Aug 17, 2010, at 8:25 PM, Sandro Martini wrote:

> Hi to all,
> during my tests on Pivot trunk (2.x), I've just seen that some of last
> commits should have changed something in the way applications are
> displayed, because trying to execute an application with a
> not-existing colors file gives me an error (and this is ok), but now
> the strange thing is that the application is still running but nothing
> is displayed ... and this could give problems on end-users, before to
> know that the process of the launched application has to be killed (in
> eclipse it's easy, the run icon is still visible so I could make a
> stop form there).
> The old behavior was that the application was shown, and the best now
> could be a similar behavior, but also with a modal dialog bod showing
> the critical error and after pressing its Ok button, to exit.
> 
> In case would help, this is the log:
> 
> Exception in thread "main" java.lang.ExceptionInInitializerError
> 	at org.apache.pivot.wtk.Component.installThemeSkin(Component.java:775)
> 	at org.apache.pivot.wtk.Window.<init>(Window.java:444)
> 	at org.apache.pivot.wtk.Window.<init>(Window.java:439)
> 	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:1471)
> 	at org.apache.pivot.beans.BXMLSerializer.processStartElement(BXMLSerializer.java:698)
> 	at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:394)
> 	at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:559)
> 	at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:513)
> 	at org.apache.pivot.beans.BXMLSerializer.readObject(BXMLSerializer.java:479)
> 	at org.apache.pivot.tutorials.KitchenSink.startup(KitchenSink.java:942)
> 	at org.apache.pivot.wtk.DesktopApplicationContext.main(DesktopApplicationContext.java:611)
> Caused by: java.lang.RuntimeException: Unable to locate color scheme
> resource TerraTheme_windowsXP.json.
> 	at org.apache.pivot.wtk.skin.terra.TerraTheme.<init>(TerraTheme.java:192)
> 	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.util.Service.getProvider(Service.java:96)
> 	at org.apache.pivot.wtk.Theme.<clinit>(Theme.java:72)
> 	... 17 more
> 
> Tell me if you need more info.
> 
> 
> What do you think ?
> 
> Bye,
> Sandro


Re: application in error, but not visible

Posted by Sandro Martini <sa...@gmail.com>.
I've just synchronized and retried my bad case, and ... thank you very
much Greg, now the application window is visible.

I think that the quality of our work is visible also on small things
like this (just fixed) :-) .

Thank you again,
Sandro

Re: application in error, but not visible

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,

> That's OK - this sort of error is most likely to be seen by developers, who will understand how to resolve it.
but so wouldn't it be better (if not to show something in GUI) at
least exit from the application (and in case of applets would be
different, too) to avoid an java process under, without nothing
visible ? Maybe this could be a safer and simpler solution ...
And to avoid something like "I launch a Pivot Application but it hangs
and stay in memory, and nothing is shown" from a typical user :-) .

Mine probably is a not-so-common case, but I fear that could be
revealed also in other combinations of startup parameters causing some
errors occurs in init/start methods of ApplicationContexts.

But in any case I agree with you that it's not a priority, programmers
can find a solve this.

Bye

Re: application in error, but not visible

Posted by Greg Brown <gk...@mac.com>.
That's OK - this sort of error is most likely to be seen by developers, who will understand how to resolve it.

On Aug 17, 2010, at 8:28 PM, Sandro Martini wrote:

> Sorry, a last thing on this:
> remember that on Windows it's possible to execute a Java Application
> also without the Text Console under, so in a case like this could be
> not-so-simple to understand that some error occurred.
> 
> Sandro


Re: application in error, but not visible

Posted by Sandro Martini <sa...@gmail.com>.
Sorry, a last thing on this:
remember that on Windows it's possible to execute a Java Application
also without the Text Console under, so in a case like this could be
not-so-simple to understand that some error occurred.

Sandro