Re: help understanding complicated client logs
You can test it locally if you use Chrome DevTools. When you open DevTools you can click on the small mobile device icon on the left side right next to the search icon. Once you have done that you should see a new dark toolbar at the top of your page which has a Network drop down which allows you to emulate slower network conditions in Chrome. Given your stack trace it seems like you called AbsolutePanel.add(childWidget) somewhere but your instance of AbsolutePanel was null. For your understanding how to read these stack frames: __gwt$exception: : Cannot read property 'com_google_gwt_user_client_ui_UIObject_element' of null at Unknown.com_google_gwt_user_client_ui_AbsolutePanel_$add__Lcom_google_gwt_user_client_ui_AbsolutePanel_2Lcom_google_gwt_user_client_ui_Widget_2V First line is the JavaScript exception message which says you have tried to access UIObject.element but UIObject was null. Since UIObject has a getElement() method that means your java code did call "null.getElement()". At the next line you see that this happened in AbsolutePanel.$add(AbsolutePanel, Widget). This method has been generated by the GWT compiler and is a static version of AbsolutePanel.add(Widget). These generated static methods are marked with "$" by GWT. Given the implementation of AbsolutePanel.add(Widget) it seems like your instance of AbsolutePanel was null. Your code did something like: AbsolutePanel myPanel = null; // somehow the variable was null myPanel.add(child); with AbsolutePanel.add() being implemented as: public void add(Widget w) { super.add(w, *getElement()*); } GWT compiler changed your method call to a static method call AbsolutePanel.$add(myPanel, w); And the implementation of $add is probably similar to public static void $add(AbsolutePanel instance, Widget w) { ComplexPanel.$add(w, *instance.getElement()*); } The bold code causes the exception. Since getElement() and the element field are defined on UiObject the exception message says you have tried to access UiObject.element with UiObject being null. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: help understanding complicated client logs
Thanks so much for the detailed response. And I'll give those dev tool suggestions a try. And what you say makes sense about dereferencing a null, but it doesn't explain how it would work most of the time, but sometimes it doesn't. If the code is dereferencing null it should always be an error, right? Anyway, thanks again, you've given me some things to try. On Sat, Jan 17, 2015 at 4:46 AM, Jens wrote: > You can test it locally if you use Chrome DevTools. When you open DevTools > you can click on the small mobile device icon on the left side right next > to the search icon. Once you have done that you should see a new dark > toolbar at the top of your page which has a Network drop down which allows > you to emulate slower network conditions in Chrome. > > Given your stack trace it seems like you called > AbsolutePanel.add(childWidget) somewhere but your instance of AbsolutePanel > was null. > > For your understanding how to read these stack frames: > > __gwt$exception: : Cannot read property > 'com_google_gwt_user_client_ui_UIObject_element' of null >at > Unknown.com_google_gwt_user_client_ui_AbsolutePanel_$add__Lcom_google_gwt_user_client_ui_AbsolutePanel_2Lcom_google_gwt_user_client_ui_Widget_2V > > First line is the JavaScript exception message which says you have tried > to access UIObject.element but UIObject was null. Since UIObject has a > getElement() method that means your java code did call "null.getElement()". > At the next line you see that this happened in > AbsolutePanel.$add(AbsolutePanel, Widget). This method has been generated > by the GWT compiler and is a static version of AbsolutePanel.add(Widget). > These generated static methods are marked with "$" by GWT. Given the > implementation of AbsolutePanel.add(Widget) it seems like your instance of > AbsolutePanel was null. > > Your code did something like: > > AbsolutePanel myPanel = null; // somehow the variable was null > myPanel.add(child); > > with AbsolutePanel.add() being implemented as: > > public void add(Widget w) { >super.add(w, *getElement()*); > } > > GWT compiler changed your method call to a static method call > > AbsolutePanel.$add(myPanel, w); > > And the implementation of $add is probably similar to > > public static void $add(AbsolutePanel instance, Widget w) { > ComplexPanel.$add(w, *instance.getElement()*); > } > > The bold code causes the exception. Since getElement() and the element > field are defined on UiObject the exception message says you have tried to > access UiObject.element with UiObject being null. > > -- J. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Google Web Toolkit" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-web-toolkit/PFyayaTVYbA/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > google-web-toolkit+unsubscr...@googlegroups.com. > To post to this group, send email to google-web-toolkit@googlegroups.com. > Visit this group at http://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: help understanding complicated client logs
> > If the code is dereferencing null it should always be an error, right? > Not really. Maybe a field becomes null while a server request is in progress and when the request finishes the onSuccess callback tries to use that field without any checks. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: help understanding complicated client logs
Thanks, true I guess, I'll try to sort it out. I was able to use the throttling to reproduce the problem as you suggested so thanks! Unfortunately dev mode isn't working for me so now I have to go figure out super dev mode I guess. Thanks again for the help. You certainly gave me a start! On Saturday, January 17, 2015, Jens wrote: > If the code is dereferencing null it should always be an error, right? >> > > Not really. Maybe a field becomes null while a server request is in > progress and when the request finishes the onSuccess callback tries to use > that field without any checks. > > -- J. > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Google Web Toolkit" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/google-web-toolkit/PFyayaTVYbA/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > google-web-toolkit+unsubscr...@googlegroups.com > > . > To post to this group, send email to google-web-toolkit@googlegroups.com > . > Visit this group at http://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Unable to delete text in TextFeild of Dialog box
How you are clearing the textfield,what is the code? On Friday, January 16, 2015 at 7:58:09 PM UTC+5:30, samina shaikh wrote: > > Hi, > > I am working on GWT project using libgdx. I used custom dialog box which > show with textfield,ok and cancel button. But I am not able to delete text > in TextFeild. > > Please help me for this. > > Thanks. > > > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.