Hi Johan, Thanks for reporting this. I agree, there are few areas which needs improvement in WebView component, error handling is one among them. Please file a bug.
Regards, Arun > On 04-Sep-2018, at 7:01 PM, Johan Vos <[email protected]> wrote: > > The WebEngine already allows to get information about the progress of the > underlying webkit via the onError() handler and the getLoadWorker() status > updates. > > However, there are a number of cases where things go wrong in webkit, yet > the status of the loadWorker is SUCCEEDED and no WebErrorEvent is generated. > > A simple case is where a small html page loads a large image. In this case, > URLLoader will call twkDidFinishLoading() which is a native call, which in > turn will invoke ImageDecoderJava.cpp::setData > > This call will invoke > WCImageDecoderImpl.addImageData (back in the java layer), but when that > throws a throwable (which it does, an OOME in resizeDataArray), it will > ignore it by calling CheckAndClearException (in ImageDecoderJava.cpp) and > the information about the exception is lost (that > is, env->ExceptionDescribe() is called which will print thread + exception, > but that's it). > > Hence, at this moment it seems impossible to detect a failure when large > images are loaded. While the status of the loadWorker will move to > SUCCEEDED, the image won't be shown. > > There are a number of ways to improve this, so if it is agreed that this > can be an enhancement, I'll file an issue for it. > > - Johan
