JDK-6661894 : plugin2: printing code can be triggered unexpectedly
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u10
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-02-12
  • Updated: 2010-09-08
  • Resolved: 2008-06-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 6
6u10 b13Fixed
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
SUGGESTED FIX http://sa.sfbay.sun.com/projects/deployment_data/6u10/6661894.1
12-02-2008

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).
12-02-2008