United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7067049 Java plugin causes Browser crash when display JmolApplet on Linux/Ubuntu
JDK-7067049 : Java plugin causes Browser crash when display JmolApplet on Linux/Ubuntu

Details
Type:
Bug
Submit Date:
2011-07-14
Status:
Closed
Updated Date:
2013-11-05
Project Name:
JDK
Resolved Date:
2011-08-17
Component:
deploy
OS:
linux_ubuntu
Sub-Component:
plugin
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7u2 (b03)

Related Reports
Backport:
Relates:

Sub Tasks

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
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.
                                     
2011-07-18
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.
                                     
2011-07-18
SUGGESTED FIX

The webrev is at
http://sa.sfbay.sun.com/projects/deployment_data/7-client/7067049/
                                     
2011-07-19
Verified ok with jdk8 b112 on ubuntu 10.4 + FF23.
                                     
2013-11-05



Hardware and Software, Engineered to Work Together