JDK-7067049 : Java plugin causes Browser crash when display JmolApplet on Linux/Ubuntu
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux_ubuntu
  • CPU: x86
  • Submitted: 2011-07-14
  • Updated: 2013-11-05
  • Resolved: 2011-08-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8
7u2 b03Fixed 8Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

and

java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Server VM (build 21.0-b17, mixed mode)



ADDITIONAL OS VERSION INFORMATION :
Linux javatest64 2.6.32-33-generic #69-Ubuntu SMP Mon Jun 27 15:33:16 UTC 2011 x86_64 GNU/Linux

and

Linux javatest32 2.6.24-29-server #1 SMP Fri Jun 24 19:26:07 UTC 2011 i686 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
http://jmol.sourceforge.net/demo/atoms/

When i open the above URL with an Ubuntu 10.04/Java 7/Firefox, the browser
immediately vanishes with one single error message on the console

>> /usr/lib/firefox-3.6.18/firefox-bin:
>>     symbol lookup error: /usr/lib/jvm/java-7-sun/jre/lib/amd64/libnpjp2.so:
>>     undefined symbol: _stricmp

If i change the configuration back to Java 6, everything is fine again.

The effect is not limited to Linux 64bit systems. The same error
appears on my 32bit workstation:

>> ./firefox-bin:
>>     symbol lookup error: /usr/lib/jvm/java-7-sun/jre/lib/i386/libnpjp2.so:
>>     undefined symbol: _stricmp

Opera on Ubuntu doesn't crash but the Plugin gives the same error and refuses to work

>> /usr/lib/opera//operapluginwrapper-native:
>>     symbol lookup error: /usr/lib/jvm/java-7-sun/jre/lib/amd64/libnpjp2.so:
>>     undefined symbol: _stricmp


REGRESSION.  Last worked in version 6

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
http://jmol.sourceforge.net/demo/atoms/

Open the above URL in Firefox/Opera
with either /usr/lib/jvm/java-7-sun/jre/lib/amd64/libnpjp2.so
or /usr/lib/jvm/java-7-sun/jre/lib/i386/libnpjp2.so
configured as Java-Plugin

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Firefox crashes immediately
with Opera the JmolApplet refuses to display/work properly

ERROR MESSAGES/STACK TRACES THAT OCCUR :
/usr/lib/firefox-3.6.18/firefox-bin: symbol lookup error: /usr/lib/jvm/java-7-sun/jre/lib/amd64/libnpjp2.so: undefined symbol: _stricmp
./firefox-bin: symbol lookup error: /usr/lib/jvm/java-7-sun/jre/lib/i386/libnpjp2.so: undefined symbol: _stricmp
/usr/lib/opera//operapluginwrapper-native: symbol lookup error: /usr/lib/jvm/java-7-sun/jre/lib/amd64/libnpjp2.so: undefined symbol: _stricmp


REPRODUCIBILITY :
This bug can be reproduced always.

Comments
Verified ok with jdk8 b112 on ubuntu 10.4 + FF23.
05-11-2013

SUGGESTED FIX The webrev is at http://sa.sfbay.sun.com/projects/deployment_data/7-client/7067049/
19-07-2011

EVALUATION ParseColor.c make use of _stricmp and depends on the macro definition in StdAfx.h as precompiled header without include it. This supposely should trigger a compile error, but the build system may somehow inject the macro definition as we saw some related setting in JDK7.
18-07-2011

SUGGESTED FIX Make sure we have correect definition, and better to use same mechanism as JDK7. With that, _stricmp is MS specific, thus we will use it for Microsoft compiler. For other systems, we will use strcasecmp POSIX call.
18-07-2011