ifener / javachromiumembedded

Automatically exported from code.google.com/p/javachromiumembedded
0 stars 0 forks source link

NullPointerException in onLoadError method #91

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build the latest revision in win32
2. Run the application and load youtube
3. Click on any video link in youtube

What is the expected output? What do you see instead?
The video or search results should be loaded, the video loads for a moment and 
then the following error message appears:

null

Failed to load

What version of the product are you using? On what operating system?
JCEF Revision: 86
CEF Binary: 3.1750.1627

Please provide any additional information below.

NullPointerException in "onLoadError" method, seems "errorText" is null.

[0618/192803:INFO:CONSOLE(0)] "event.returnValue is deprecated. Please use the 
standard event.preventDefault() instead.", source:  (0)
java.lang.NullPointerException
    at java.lang.String.length(Unknown Source)
    at java.lang.AbstractStringBuilder.append(Unknown Source)
    at java.lang.StringBuilder.append(Unknown Source)
    at tests.detailed.MainFrame$3.onLoadError(MainFrame.java:194)
    at org.cef.CefClient.onLoadError(CefClient.java:665)
    at org.cef.CefApp.N_DoMessageLoopWork(Native Method)
    at org.cef.CefApp.access$14(CefApp.java:307)
    at org.cef.CefApp$5.run(CefApp.java:274)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

Original issue reported on code.google.com by arun.vc....@gmail.com on 18 Jun 2014 at 2:03

GoogleCodeExporter commented 9 years ago
This is not specific to youtube, loading any website and clicking on the 
URL/hyperlinks leads to this error.

null

Failed to load.

Handling null exception to errorText has failed and still the error message 
appears.

Original comment by arun.vc....@gmail.com on 18 Jun 2014 at 2:05

GoogleCodeExporter commented 9 years ago
Performing the following

search://something

even leads to the error message. Something seems to be wrong in loadHandler.

Original comment by arun.vc....@gmail.com on 18 Jun 2014 at 2:12

GoogleCodeExporter commented 9 years ago
Apologies,

Missed some necessary info

What version of the product are you using? On what operating system?
JCEF Revision: 86
CEF Binary: 3.1750.1627
Java: x86 (win 32) 1.7.0_60
OS: Windows 7 (x64)

Original comment by arun.vc....@gmail.com on 18 Jun 2014 at 2:16

GoogleCodeExporter commented 9 years ago
I'm not experiencing this problem with the 64-bit build, but it's possible that 
you're failing to load google.com and consequently ending up in onLoadError. 
Are you perhaps behind a proxy? Does checking errorText != null in onLoadError 
fix the NPE for you?

Original comment by magreenb...@gmail.com on 18 Jun 2014 at 2:22

GoogleCodeExporter commented 9 years ago
Possible NPE fixed in revision 87.

Original comment by magreenb...@gmail.com on 18 Jun 2014 at 3:26

GoogleCodeExporter commented 9 years ago
Hi Marshall,

This issue occurs only in win32 it seems. I have tested the win64 build and it 
works fine and the load error's doesn't occur and the NPE too didn't occur. But 
the same is still occuring with win32 build.

I have added the following

errorMsg_ += "<p>" + (null == errorText && errorText == null ? "" : errorText) 
+ "</p>";

for the fix. Still the NPE is thrown in the background, but the application 
continues to load the page.

Pls suggest me on this. Thanks for the Support.

Regards,
Arun

Original comment by arun.vc....@gmail.com on 19 Jun 2014 at 3:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
After the fix in #6, the application didn't show any error messages, but throws 
the NPE. is there a way to fix or should we ignore this? Just curious on why 
this occurs with win32 build alone?

Regards,
Arun

Original comment by arun.vc....@gmail.com on 19 Jun 2014 at 3:48

GoogleCodeExporter commented 9 years ago
@#8: What is the call stack for the NPE that you're getting now? Is it the same 
as before? Perhaps errorText is not what's causing the problem?

Original comment by magreenb...@gmail.com on 20 Jun 2014 at 3:02

GoogleCodeExporter commented 9 years ago
Yes Marshall,

The errorText is what causing the issue. Adding the null check didn't prevent 
from throwing the error messages in the win32 build, while the win64 build 
doesn't throw any errors.

Original comment by arun.vc....@gmail.com on 20 Jun 2014 at 4:40

GoogleCodeExporter commented 9 years ago
This error still occurs with the latest build of win32.

Original comment by arun.vc....@gmail.com on 13 Aug 2014 at 2:45

GoogleCodeExporter commented 9 years ago
The NullPointerException still occurs when i try to open pages or links even 
with the latest revision 110.

JCEF Version = 3.1916.1857.110
CEF Version = 3.1916.1857
Chromium Version = 35.0.1916.138

Original comment by arun.vc....@gmail.com on 29 Oct 2014 at 2:11

GoogleCodeExporter commented 9 years ago
//win32 bug with cef_binary_3.2171.1902_windows32, jcef r115 

errorText is instance of ErrorCode.

if((Object)errorText instanceof ErrorCode) {
                     errorCode = (ErrorCode)(Object)errorText;
                    errorText = errorCode.name();  
}

failedUrl is always empty string  

Original comment by yuri9...@gmail.com on 10 Mar 2015 at 8:43