United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6661894 plugin2: printing code can be triggered unexpectedly
JDK-6661894 : plugin2: printing code can be triggered unexpectedly

Details
Type:
Bug
Submit Date:
2008-02-12
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-06-17
Component:
deploy
OS:
windows_xp
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b13)

Related Reports

Sub Tasks

Description
With debug and verbose tracing enabled, printing code can be seen in the trace messages if one navigates away from the applet by clicking on another tab.
Problem can be reproduced on XP with IE7.
Steps:
- open IE7
- have at least 2 tabs enabled in the same browser window
- load a simple applet in one tab
- click on another tab

The trace messages seen at the Java console and at the dos console are as follows:

From java console:
-----
Applet Status: Applet started
Applet Status: Told clients applet is started
PluginMain: processing SetAppletSizeMessage
PluginMain: setting size of applet 2 to (400, 400)
PluginMain: processing PrintAppletMessage
PluginMain: printing applet 2 isPrinterDC = false
PluginMain: processing PrintAppletMessage
PluginMain: printing applet 2 isPrinterDC = false
PluginMain: processing HeartbeatMessage
PluginMain: processing HeartbeatMessage
------


From dos console:
---------
IExplorerPlugin.SetObjectRects(cAxControl = 0x3712678, left = 12, right = 412, t
op = 67, bottom = 467)
IExplorerPlugin.OnDraw(cAxControl = 0x3712678)
JVMInstance for 1.6.0.10 sending print applet message for applet ID 2, HDC = 147
6465775, isPrinterDC = false
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
IExplorerPlugin.OnDraw(cAxControl = 0x3712678)
JVMInstance for 1.6.0.10 sending print applet message for applet ID 2, HDC = 147
6465775, isPrinterDC = false
JRE 1.6.0.10: [GC 2201K->1451K(5056K), 0.0030169 secs]
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
JVMInstance (1.6.0.10) processing PrintBandMessage
----------

                                    

Comments
EVALUATION

Problem is because when clicking back and forth between different tabs and the tab with the running applet on IE7, plugin's CAxControl receives the OnDraw signal.
Plugin also receives this same signal when browser requests to print applet.
(This means this problem is likely with OJI plugin and IE7 as well)
We may need to distinguish the two cases and treating applet printing request only by inspecting the handle passing to it via OnDraw for a printer DC (real or EnhMeta).
                                     
2008-02-12
SUGGESTED FIX

http://sa.sfbay.sun.com/projects/deployment_data/6u10/6661894.1
                                     
2008-02-12



Hardware and Software, Engineered to Work Together