Shawn.in.Tokyo
21 Feb 2009, 4:49 AM
I can't run hosted mode under gwt-1.2.3 as I get an inexplicable error, a really really inexplicable error. It works fine under 1.2.2.
At one point in my code, I access a static variable. Fine. A moment later I use the same getter method to access it again and get a null value erroneously returned.
There is nothing in my code that could be setting the value to null. Again it works under 1.2.2. It's just whack.
java.lang.NullPointerException
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.google.gwt.user.client.Timer.clearTimeout(Timer.java)
at com.google.gwt.user.client.Timer.cancel(Timer.java:93)
at com.google.gwt.user.client.Timer.schedule(Timer.java:114)
at com.google.gwt.user.client.CommandExecutor.maybeStartExecutionTimer(CommandExecutor.java:355)
at com.google.gwt.user.client.CommandExecutor.submit(CommandExecutor.java:230)
at com.google.gwt.user.client.DeferredCommand.addCommand(DeferredCommand.java:57)
I did notice a very odd thing that if I comment out the following code to clear a Viewport from the RootPanel that immediatly precedes my getter call, my unrelated getter call works as it should:
//try{
//RootPanel.get("main").remove(auto_resize);// auto_resize is a Viewport
// }catch(Exception e) {
// Log.info(e.getMessage());
// }catch(Error e) {
// Log.info(e.getMessage());
// }
But if there were an error, why doesn't the try catch clause contain it? Am I not catching correctly?
There is no way my getter can be returning null. Actually, the getting is throwing the strange error above. Why does removing a Viewport from the RootPanel cause an unrelated static to be unaccesable?
Shawn
At one point in my code, I access a static variable. Fine. A moment later I use the same getter method to access it again and get a null value erroneously returned.
There is nothing in my code that could be setting the value to null. Again it works under 1.2.2. It's just whack.
java.lang.NullPointerException
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.google.gwt.user.client.Timer.clearTimeout(Timer.java)
at com.google.gwt.user.client.Timer.cancel(Timer.java:93)
at com.google.gwt.user.client.Timer.schedule(Timer.java:114)
at com.google.gwt.user.client.CommandExecutor.maybeStartExecutionTimer(CommandExecutor.java:355)
at com.google.gwt.user.client.CommandExecutor.submit(CommandExecutor.java:230)
at com.google.gwt.user.client.DeferredCommand.addCommand(DeferredCommand.java:57)
I did notice a very odd thing that if I comment out the following code to clear a Viewport from the RootPanel that immediatly precedes my getter call, my unrelated getter call works as it should:
//try{
//RootPanel.get("main").remove(auto_resize);// auto_resize is a Viewport
// }catch(Exception e) {
// Log.info(e.getMessage());
// }catch(Error e) {
// Log.info(e.getMessage());
// }
But if there were an error, why doesn't the try catch clause contain it? Am I not catching correctly?
There is no way my getter can be returning null. Actually, the getting is throwing the strange error above. Why does removing a Viewport from the RootPanel cause an unrelated static to be unaccesable?
Shawn