Re: GWT Logging
Never see that problem, but... if you think that might be a log-to-console problem, you can just create a simple app which produces a lot of console logs and see what happens, if thats the problem you can always disable logging for the ios permutation. On Thursday, September 15, 2016 at 4:54:19 PM UTC+2, James Galliford wrote: > > Hello, > > I've recently been having some native app crashes with my company's app on > iOS devices. It seems to be a memory allocation issue, given the crash log > says: > > Exception Type: EXC_BAD_ACCESS (SIGSEGV) > Exception Subtype: KERN_INVALID_ADDRESS at 0xbbadbeef > > I was doing some testing, and I found that we do a lot of logging to the > console, which is great when we're using chrome or a chromium based desktop > app that we have to test with, but I was wondering if this would be > persisted on an iPad running a native app which runs our GWT app by default > or where I would be able to check this setting, as I was not the one who > set this up. Our app has a synchonisation process which can upload and > download a relatively large amount of data, and all of this is logged as it > happens, with the exception of raw data for images. I am wondering whether > this, in combination with the images we are occasionally sending, is enough > to put us over the limit that iOS allows individual apps. > > I am sure that this is not an issue with the native app. This is a > relatively recent issue, while the native app has been running without > changes for a long time, and it isn't an issue with a new version of iOS on > the device either. > > Have any of you seen this error happen in your own apps and was there an > issue that you found that might be of some help to me trying to diagnose my > own issue? I'd appreciate any help or answers that can be offered. > > Thanks, > > James > -- You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Do something when clicking on suggestion
Hello everybody, I have sort of a conversation system integrated in my application. The class ConversationWidget represents the main widget for the conversation system. Somewhere there I have a suggestion box, which I want to use to search through all the available conversations based on some patterns, like subject, user, and so on. I want, when the suggestion is clicked, to parse the String, and to open the desired conversation. The ideea is, that I have some methods in my ConversationWidget class, like viewConversation(int id, final SimplePanel convPanel) which repaints the convPanel with the new conversation. What would be a way to implement that ? To call viewConversation() in my ConversationWidget based on which Suggestion is clicked? Thanks in advance, Andrei public class ConversationWidget extends Composite implements CustomWidget { public ConversationWidget(UserInfo userInfo) { this.userInfo = userInfo; initWidget(initializeWidget()); } @Override public Widget initializeWidget() { . . . MultiWordSuggestOracle oracle = getDBSuggestions(); // Suggestions come from the DB final CustomTexBox searchBox = new CustomTexBox(); searchBox.getElement().getStyle().setMarginTop(15.0, Unit.PX); searchBox.getElement().getStyle().setMarginRight(10.0, Unit.PX); CustomSuggestionDisplay display = new CustomSuggestionDisplay(); SuggestBox suggestBox = new SuggestBox(oracle, searchBox, display); . . . } } public class CustomSuggestionDisplay extends SuggestBox.DefaultSuggestionDisplay { @Override protected void showSuggestions(SuggestBox suggestBox, Collection suggestions, boolean isDisplayStringHTML, boolean isAutoSelectEnabled, SuggestionCallback callback) { callback = new SuggestionCallback() { @Override public void onSuggestionSelected(Suggestion suggestion) { // TODO } }; super.showSuggestions(suggestBox, suggestions, isDisplayStringHTML, isAutoSelectEnabled, callback); } } -- You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
GWT Logging
Hello, I've recently been having some native app crashes with my company's app on iOS devices. It seems to be a memory allocation issue, given the crash log says: Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0xbbadbeef I was doing some testing, and I found that we do a lot of logging to the console, which is great when we're using chrome or a chromium based desktop app that we have to test with, but I was wondering if this would be persisted on an iPad running a native app which runs our GWT app by default or where I would be able to check this setting, as I was not the one who set this up. Our app has a synchonisation process which can upload and download a relatively large amount of data, and all of this is logged as it happens, with the exception of raw data for images. I am wondering whether this, in combination with the images we are occasionally sending, is enough to put us over the limit that iOS allows individual apps. I am sure that this is not an issue with the native app. This is a relatively recent issue, while the native app has been running without changes for a long time, and it isn't an issue with a new version of iOS on the device either. Have any of you seen this error happen in your own apps and was there an issue that you found that might be of some help to me trying to diagnose my own issue? I'd appreciate any help or answers that can be offered. Thanks, James -- You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: GWT2.8RC2 : compile time user.agent value (safari) does not match the runtime user.agent value (gecko1_8) ?
Thanks for the information. It makes sense if it spoofing, I will dig into it. Thomas -- You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Strange (BAD?) code generated
With GWT 2.8 yes. It's been suggested that there could be some regexp (or other kind of pattern) matching added later to whitelist/blacklist some @JsType(isNative=false) that you would/wouldn't want to see exported. In the mean time, don't over-use @JsType without isNative=true (in libraries), better (if possible) separate exported types to a specific "application" project to be compiled to a standalone JS script. Note that for the java.util.List et al. currently annotated with @JsType, the overhead was deemed small enough (because that's only 4 classes without that many subclasses). My suggestion would be, for GWT 2.8, to only use JsInterop for mapping native objects (i.e. only isNative=true). Google likely uses JsInterop with isNative=false but with -closureFormattedOutput and an additional round of Closure Compiler optimisations that would prune unused code and re-obfuscate the names. On Thursday, September 15, 2016 at 11:01:14 AM UTC+2, Vassilis Virvilis wrote: > > So > What you say is: It is not possible to have a page with: > *** gwtapp + gwtlib + js_export + optimization *** > > What is possible to have is either or > > 1) gwtapp + gwtlib + optimization > > or (xor actually) > > 2) gwtapp + gwtlib + js_export > > right? > > a) We assume gwtlib has @JsType(isNative=false) types > b) Optimization is used in the broad sense for method and properties > renaming, removal and other optimization steps > > Jens, Thomas thanks a lot for the education. > >Vassilis > > > On Thu, Sep 15, 2016 at 11:44 AM, Thomas Broyer wrote: > >> Let me try: without -generateJsInteropExports, GWT acts as if >> @JsType(isNative=false) wasn't there at all. >> Why'd you want this? >> >>- when @JsType(isNative=false) is applied to types you didn't write >>yourself (third-party). For example, java.util.Collection, >> java.util.List, >>java.util.Map, java.util.Set, and java.lang.Enum are annotated with >>@JsType. If you don't use -generateJsInteropExports, their >> non-@JsIgnore⋅d >>public members won't be renamed, and the @JsProperty and >>@JsMethod-specified names won't be honored, so you'll have very short >>(obfuscated) names in your app. If you use -generateJsInteropExports, the >>given js-names will be honored and your code will be slightly bigger, but >>then you can pass a java.util.List to JS and you can call getAtIndex and >>removeAtIndex (for example) on it from JS code. >>- when you want to possibly export your project as a standalone JS >>lib, but have it consumable by GWT apps with all the GWT optimization >>goodness: your types will be annotated with @JsType, apps that use your >> GWT >>library without using -generateJsInteropExports will have >> highly-optimized >>code; but you can use -generateJsInteropExports to export your annotated >>types to create a standalone JS lib. GWT apps consuming your GWT library >>and using -generateJsInteropExports will pay the price for your @JsType >>though (see example above about java.util.List), so you'll probably want >> to >>separate out some of your code into a project specific to exporting your >> JS >>lib (similarly to how GWTUpload/JSUpload did it) >>That was Jens' example. >> >> >> On Thursday, September 15, 2016 at 10:18:55 AM UTC+2, Vassilis Virvilis >> wrote: >>> >>> Jens sorry - one more round if you please >>> >>> > The library exists as GWT library (*.jar file with *.gwt.xml)... >>> >>> This GWT library is source right? That means it is compiled by the >>> compilation session of MyApplication right? >>> >>> Unless (light bulb goes on) >>> >>> In some cases you want the library to act as JS library for one Page but >>> for another page you only plan to link it with the GWT MyApplication (and >>> not export is as a JS library) where normal optimization techniques apply. >>> >>> Is that it? If so tricky... >>> >>> >>> Vassilis >>> >>> >>> >>> >>> >>> >>> On Thu, Sep 15, 2016 at 1:54 AM, Jens wrote: >>> Is this GWT library exported as JS only? ... > So I don't get it. What am I missing? > The library exists as GWT library (*.jar file with *.gwt.xml) so you can use it right away in your GWT app, but the library is also exported by the library maintainer to JavaScript so that JavaScript people can also use it right away by including a *.js file. In that case your app does not want to use -generateJsInteropExports because it directly uses the GWT library which has @JsType(isNative = false) all over the place in its Java files. If you would use -generateJsInteropExport in your app, it would have a negative impact on your code size because these @JsType classes would not be optimized/pruned then. Now imagine you have several of such libraries in your app. -- J. >>> >>> >>> >>> -- >>> Vassilis Virvilis >>> >> >> > > >
Re: GWT2.8RC2 : compile time user.agent value (safari) does not match the runtime user.agent value (gecko1_8) ?
On Thursday, September 15, 2016 at 11:07:42 AM UTC+2, Thomas Lacroix wrote: > > Hi, > I have an app that automatically reports "Uncaught exception" encountered > by users. > It has been compiled with GWT2.8RC2 and in prod for a few days and it has > been reporting a couple of "Uncaught exception" as follow: > > - Uncaught exception: > com.google.gwt.useragent.client.UserAgentAsserter$UserAgentAssertionError: > Possible problem with your *.gwt.xml module file. > The compile time user.agent value (safari) does not match the runtime > user.agent value (gecko1_8). > Expect more errors. > > - User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 > (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 > > I am not sure what that means, if this is a serious error and I am not > able to reproduce it in my environnement. Any help ? > I didn't get this error reported prior to compliation with GWT2.8RC2 (I > used 2.4, 2.6, and 2.7) but that might be a coincidence. > That error generally means that you have compiled your app with a limited set of supported user.agent values (e.g. only one, during development) but run it in a user agent that's not in the list. The "compile time user.agent value" comes from the permutation that's being used, and the "runtime user.agent value" is computed at runtime. They should generally be the same value, because the same computation is done to select the appropriate permutation; but if you somehow "bypass" that computation by only compiling for a single user.agent (generally to speed up compilation during development / debugging), then you might be in that situation that they're different. What's strange here is that the "runtime user.agent value" is gecko1_8 whereas you're using Chrome (so should be "safari"). Could it be, maybe, someone spoofing his user agent in Chrome to look like Firefox and only reloading the hidden iframe after changing the user agent? (so the permutation has already been selected for Chrome, but the runtime value is now for Firefox) Or maybe a Firefox user spoofing to look like Chrome but in a broken way such that the hidden iframe the GWT code runs in does not see the spoofed user.agent (so the top-level window looks like Chrome and selects the 'safari' permutation –compile time user.agent value– but the iframe sees the real user.agent and looks like Firefox –runtime user.agent value) ? (that very old Chrome version hints that this could be the case) FYI, you can disable this with but I would keep it if I were you. Maybe add the permutation ID ( http://www.gwtproject.org/javadoc/latest/com/google/gwt/core/client/GWT.html#getPermutationStrongName()) to the log so you can later compare with your compilation-mappings.txt and access logs to see if it's possibly a bug in GWT (I doubt it, but who knows?) Also, based on compilation-mappings.txt, maybe have a look at your access logs to see if some user agents load an unexpected permutation, and possibly cross-check with other requests from the same user agent (or if you trace users with a cookie and have that in your logs, use that to possibly find if some people are spoofing the user agent: multiple requests by the same user/session with different user agents for instance) -- You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
GWT2.8RC2 : compile time user.agent value (safari) does not match the runtime user.agent value (gecko1_8) ?
Hi, I have an app that automatically reports "Uncaught exception" encountered by users. It has been compiled with GWT2.8RC2 and in prod for a few days and it has been reporting a couple of "Uncaught exception" as follow: - Uncaught exception: com.google.gwt.useragent.client.UserAgentAsserter$UserAgentAssertionError: Possible problem with your *.gwt.xml module file. The compile time user.agent value (safari) does not match the runtime user.agent value (gecko1_8). Expect more errors. - User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 I am not sure what that means, if this is a serious error and I am not able to reproduce it in my environnement. Any help ? I didn't get this error reported prior to compliation with GWT2.8RC2 (I used 2.4, 2.6, and 2.7) but that might be a coincidence. Thomas -- You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Strange (BAD?) code generated
So What you say is: It is not possible to have a page with: *** gwtapp + gwtlib + js_export + optimization *** What is possible to have is either or 1) gwtapp + gwtlib + optimization or (xor actually) 2) gwtapp + gwtlib + js_export right? a) We assume gwtlib has @JsType(isNative=false) types b) Optimization is used in the broad sense for method and properties renaming, removal and other optimization steps Jens, Thomas thanks a lot for the education. Vassilis On Thu, Sep 15, 2016 at 11:44 AM, Thomas Broyer wrote: > Let me try: without -generateJsInteropExports, GWT acts as if > @JsType(isNative=false) wasn't there at all. > Why'd you want this? > >- when @JsType(isNative=false) is applied to types you didn't write >yourself (third-party). For example, java.util.Collection, java.util.List, >java.util.Map, java.util.Set, and java.lang.Enum are annotated with >@JsType. If you don't use -generateJsInteropExports, their non-@JsIgnore⋅d >public members won't be renamed, and the @JsProperty and >@JsMethod-specified names won't be honored, so you'll have very short >(obfuscated) names in your app. If you use -generateJsInteropExports, the >given js-names will be honored and your code will be slightly bigger, but >then you can pass a java.util.List to JS and you can call getAtIndex and >removeAtIndex (for example) on it from JS code. >- when you want to possibly export your project as a standalone JS >lib, but have it consumable by GWT apps with all the GWT optimization >goodness: your types will be annotated with @JsType, apps that use your GWT >library without using -generateJsInteropExports will have highly-optimized >code; but you can use -generateJsInteropExports to export your annotated >types to create a standalone JS lib. GWT apps consuming your GWT library >and using -generateJsInteropExports will pay the price for your @JsType >though (see example above about java.util.List), so you'll probably want to >separate out some of your code into a project specific to exporting your JS >lib (similarly to how GWTUpload/JSUpload did it) >That was Jens' example. > > > On Thursday, September 15, 2016 at 10:18:55 AM UTC+2, Vassilis Virvilis > wrote: >> >> Jens sorry - one more round if you please >> >> > The library exists as GWT library (*.jar file with *.gwt.xml)... >> >> This GWT library is source right? That means it is compiled by the >> compilation session of MyApplication right? >> >> Unless (light bulb goes on) >> >> In some cases you want the library to act as JS library for one Page but >> for another page you only plan to link it with the GWT MyApplication (and >> not export is as a JS library) where normal optimization techniques apply. >> >> Is that it? If so tricky... >> >> >> Vassilis >> >> >> >> >> >> >> On Thu, Sep 15, 2016 at 1:54 AM, Jens wrote: >> >>> >>> Is this GWT library exported as JS only? ... >>> So I don't get it. What am I missing? >>> >>> The library exists as GWT library (*.jar file with *.gwt.xml) so you can >>> use it right away in your GWT app, but the library is also exported by the >>> library maintainer to JavaScript so that JavaScript people can also use it >>> right away by including a *.js file. >>> >>> In that case your app does not want to use -generateJsInteropExports >>> because it directly uses the GWT library which has @JsType(isNative = >>> false) all over the place in its Java files. If you would use >>> -generateJsInteropExport in your app, it would have a negative impact on >>> your code size because these @JsType classes would not be optimized/pruned >>> then. Now imagine you have several of such libraries in your app. >>> >>> -- J. >>> >>> >> >> >> >> -- >> Vassilis Virvilis >> > -- > You received this message because you are subscribed to the Google Groups > "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout. > -- Vassilis Virvilis -- You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Strange (BAD?) code generated
Let me try: without -generateJsInteropExports, GWT acts as if @JsType(isNative=false) wasn't there at all. Why'd you want this? - when @JsType(isNative=false) is applied to types you didn't write yourself (third-party). For example, java.util.Collection, java.util.List, java.util.Map, java.util.Set, and java.lang.Enum are annotated with @JsType. If you don't use -generateJsInteropExports, their non-@JsIgnore⋅d public members won't be renamed, and the @JsProperty and @JsMethod-specified names won't be honored, so you'll have very short (obfuscated) names in your app. If you use -generateJsInteropExports, the given js-names will be honored and your code will be slightly bigger, but then you can pass a java.util.List to JS and you can call getAtIndex and removeAtIndex (for example) on it from JS code. - when you want to possibly export your project as a standalone JS lib, but have it consumable by GWT apps with all the GWT optimization goodness: your types will be annotated with @JsType, apps that use your GWT library without using -generateJsInteropExports will have highly-optimized code; but you can use -generateJsInteropExports to export your annotated types to create a standalone JS lib. GWT apps consuming your GWT library and using -generateJsInteropExports will pay the price for your @JsType though (see example above about java.util.List), so you'll probably want to separate out some of your code into a project specific to exporting your JS lib (similarly to how GWTUpload/JSUpload did it) That was Jens' example. On Thursday, September 15, 2016 at 10:18:55 AM UTC+2, Vassilis Virvilis wrote: > > Jens sorry - one more round if you please > > > The library exists as GWT library (*.jar file with *.gwt.xml)... > > This GWT library is source right? That means it is compiled by the > compilation session of MyApplication right? > > Unless (light bulb goes on) > > In some cases you want the library to act as JS library for one Page but > for another page you only plan to link it with the GWT MyApplication (and > not export is as a JS library) where normal optimization techniques apply. > > Is that it? If so tricky... > > > Vassilis > > > > > > > On Thu, Sep 15, 2016 at 1:54 AM, Jens wrote: > >> >> Is this GWT library exported as JS only? ... >>> >> So I don't get it. What am I missing? >>> >> >> The library exists as GWT library (*.jar file with *.gwt.xml) so you can >> use it right away in your GWT app, but the library is also exported by the >> library maintainer to JavaScript so that JavaScript people can also use it >> right away by including a *.js file. >> >> In that case your app does not want to use -generateJsInteropExports >> because it directly uses the GWT library which has @JsType(isNative = >> false) all over the place in its Java files. If you would use >> -generateJsInteropExport in your app, it would have a negative impact on >> your code size because these @JsType classes would not be optimized/pruned >> then. Now imagine you have several of such libraries in your app. >> >> -- J. >> >> > > > > -- > Vassilis Virvilis > -- You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.
Re: Strange (BAD?) code generated
Jens sorry - one more round if you please > The library exists as GWT library (*.jar file with *.gwt.xml)... This GWT library is source right? That means it is compiled by the compilation session of MyApplication right? Unless (light bulb goes on) In some cases you want the library to act as JS library for one Page but for another page you only plan to link it with the GWT MyApplication (and not export is as a JS library) where normal optimization techniques apply. Is that it? If so tricky... Vassilis On Thu, Sep 15, 2016 at 1:54 AM, Jens wrote: > > Is this GWT library exported as JS only? ... >> > So I don't get it. What am I missing? >> > > The library exists as GWT library (*.jar file with *.gwt.xml) so you can > use it right away in your GWT app, but the library is also exported by the > library maintainer to JavaScript so that JavaScript people can also use it > right away by including a *.js file. > > In that case your app does not want to use -generateJsInteropExports > because it directly uses the GWT library which has @JsType(isNative = > false) all over the place in its Java files. If you would use > -generateJsInteropExport in your app, it would have a negative impact on > your code size because these @JsType classes would not be optimized/pruned > then. Now imagine you have several of such libraries in your app. > > -- J. > > > -- > You received this message because you are subscribed to the Google Groups > "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. > For more options, visit https://groups.google.com/d/optout. > -- Vassilis Virvilis -- You received this message because you are subscribed to the Google Groups "GWT Users" 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 https://groups.google.com/group/google-web-toolkit. For more options, visit https://groups.google.com/d/optout.